#multiplayer
1 messages ยท Page 474 of 1
Don't clear the timer
Just let it run
Do the check for RemaitningTime > 0 before reducing it
But yeah it goes into the right direction
And then i got confused when you started with "The Server", Where am is starting this?
And then this in the GameState to set the value whenever you need to
By Server only of couse. Clients shouldn't change it
@gloomy sedge
DefaultTimer should ultimately be a Function and not an event
Cause things like "OldRemainingTime" shouldn't be a class variable, but rather a local variable
You can use "SetTimerByFunctionName" for that instead of "..ByEvent"
Okay, i'm pretty sure i understand the logic and how everything works, Thank you very much for your help
But just out of curiosity what does Force Net Update do? Never used this before
@thin stratus You amaze me https://gyazo.com/9bbb1830ff18e4643937b665cbfef28c
Hey guys, I'm trying to set up dedicated servers with Game Lift, and I'm able to connect to my servers with an IP address and Port. However, this skips over the typical CreateSession / JoinSession process. Some of my systems depend on the UE4 session interface. Is there a way to create a session with a specific IP/Port and then join that? Anyone set up Game Lift and have any experience with that?
I'm using OnlineSubsystemNull at the moment.
GameLift wouldn't use any Subsystem
As it's meant to be used to retrieve the data and tell the client to connect
Sessions are for when you don't have GameLift and you want online Servers
I see.
Damn
Ok, so I used to have voice chat in my game but without the session interface my voice chat doesn't work.
- GameLift Server Instance aren't actually supposed to run until you query a random one
That's tricky
You could enable Steam but Steam iirc is not using IP/Port
It only reacts to the SteamID stuff
Not sure how that is with DedicatedServers
So, enable steam but still connect via GameLift?
Well yeah you have GameLift for a reason
Sorry, this stuff is a little convoluted. Please bear with me while I get my head around it. So, with steam I'd have the server create a session and then the client would join the session via UniqueNetId or whatever else steam needs. You're suggesting that I re-enable steam, create session on the server, find/join session on client and then connect to gamelift via IP/Port?
So I would run Steam and GameLift in parallel?
Steam can communicate IP/Port just fine, won't do NAT punchthrough tho
or at least, not in any reliable manner
Hey @thin stratus , Sorry to bother you again, but i've changed the blueprint slightly, so that i have minutes and seconds on the screen and it works perfectly. My next problem is i cannot figure out how to reset the countdown once it has hit 0
It seems to reset on the server but does not replicate to other machines
Trying to follow by this tutorial https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux). Stuck on part 2. create the server shortcut and setup log options. When I am trying to run the server. TravelFailure: ClientTravelFailure, Reason for Failure: 'Servers can't open network URLs'
You would not do that in the timer though @gloomy sedge
You can just use RemainingTime as seconds
And when displying it use Time/60 for minutes and Time%60 for seconds
:P
@twin juniper Is your game calling any sort of "Open xyz" by default?
"Open xyz" I don't know what does it mean. I can call you and show what have I done
Na, your Server tries to connect to something, that's why it says it can't open network URLs
So whatever either your command line or code in UE4 does, it's causing that
@thin stratus I put like in tutorial, in level blueprint, when the game starts the next command. Open level and my IP
@thin stratus The problem is that I can't join to my server by the packaged project, as I understood I should be able to do this. May I call you and show it on my screen?
No sorry, I don't do calls
Yes, you can connect to your server via your IP
But you can't place that into the LevelBlueprint
Specially not if the DedicatedServer opens hte same level
Cause it will call that node too
And try to connect to the IP, which DediServers aren't allowed to do
Hence the error you get
@thin stratus Ok. I'll try it right now. Thanks for answers
Lol, Nevermind, just setting the Remaining Seconds/Minutes to Replicated solved my problem
@gloomy sedge Whatever yo uare doing that is not the solution
There is a reason they aren't replicated
And only the ones with the Replicated in the name should do that
Are you actually using the RepNotify function to update the non replicated varaibles?
And again, having Minutes and Seconds makes no sense
It's just double the work
/ 60 and % 60 does that for you already
I'm using the current method because I may want to have a 1 Minute 30 Second Round
And what keeps you from setting the time to 90?
TRUUUU
I think you are overthinking this :D
No
The Replicated one is only to sync the clients every 10 seconds
In case something gets them out of sync
ahh okay, So getting to the replicating of the timer. It counts down from 5 the first time and then when it hits 0 it does not go back to 5 on the clients but does on the server
Setting the Regular RemainingVariables to replicated solves this, but you say this is wrong
The code I gave you only counts down once, unless you call "SetRemainingTime" on the server once again
Which is what i do once the seconds has reached 0
Where exactly?
You should really change this back to only using seconds
It's really just complicates the code and makes it more open to logical errors
You are also only counting down if seconds or minutes is > 0
So how can Seconds ever be < 0?
Which you are checking
i wouldn't do minutes/seconds seperate as @thin stratus pointed out. you only care for seconds, you can convert seconds to Minutes/Seconds
you are making more work and more bug possibilities
- Prevents it from calling if Seconds is <= 0
So it will only call for 1 or greater
At 2., you are checking if seconds is, after reducing it, less than 0
Since this only ever calls for 1 or greater
seconds can only ever by 0 or greater
So that would never work in the last second
Or is that supposed to happen?
Maybe it is
You see, way too complicated to do it like that xD stick to seconds
Gotcha, Changed it back to Seconds only
I've never used % before, and i've realised how much better it is
So am i right in saying that this is the correct place to restart the timer? If RemainingSeconds is not greater than 0 (meaning that it is 0 or less) then increase the round and set the remaining seconds for 3 again
YAY! It works!!! I Have to say, you guys know your stuff! such a great help!
<@&213101288538374145> anybody know how to do multiplayer for a HTML5 game?
@onyx gale Only ping Moderators if there is an issue with the Server or its Members thanks.
Should ServerTravel be disconnecting clients?
if its not seamless, yes
Thanks! seems like that is the issue ๐ฆ
testing that is a pain though
Okay not as bad as I thought to test it (since steam would overtake my game with not in pie) using -nosteam
can someone help me i got this car im working on but for some reason the speed is going slower in the clients screen when he is using it but if the server uses it it works perfect
and idk what to do
How does one get Find Sessions to pull from a list of IP addresses?
Most likely write your own system
FindSession hooks into the underlying Subsystem
Whatever is active at that time
And if it's supporting "FindSession" it's usually using the Subsystems MasterServer to retrieve sessions
If you need something custom you gotta code that yourself
Can someone tell whether AWS Lambda or AWS BeanStalk is a better option for deploying middleware matchmaking game service? This service will be responsible for contacting servers and finding an appropriate game session then return that game session id back to the ue4 game client
Online subsystem null(LAN) on iOS works only iPhone to iphone not able to connect to windows or android. It just comes out of session as soon as it joins cross platform devices. Can someone help me with this
Hi guys. Ive been following this tutorial https://www.youtube.com/watch?v=XlqHG1egnn0&list=PLwmGmCVti_dDl8CMa_91FdwgZ0W010d5v&index=6 but I dont understand how I can make a player be the server and then make players join.
UE4 / Unreal Engine 4 Multiplayer Playlist: In this collection of videos, we will cover setting up a project for both local and networked multiplayer project...
when you open the map, the host will do ?listen
this makes that player a listen-server
Hello so I have 1 actor child component inside a character blueprint and I want it to be hidden to the player who posseses the character and to be visible to the others. I've tried many things like "set visibility" to false or "set owner no see" to true, but none worked. How can I achieve this?
Hi everyone, still no fix for UE-43969 (skip owner not working) in BP. Any workarounds for when replicating properties? Using it to replicate a state, not a one shot RPC.
Hi, I am having trouble with the NULL subsystem connected over LAN (Same machine) to hosted game. It seems to be connecting to the correct IP and going through the process, of connecting, but it does not connect to the correct Level. In fact, it seems to connect to an empty level. It just looks like a black screen, but when using the unlit, or wireframe view, you can see the character falling.
The server is working in the engnine but not as a packaged project^
OK. brain fart time.
I can't think how to expose a switch/bool in a material function.
Trying to expose this switch here to the parent material. So I can turn colour variation on and off
expose in a function param or a instance param? also why multiplayer =p
if its a instance param the image is right, a function param use a function input with bool type
with a normal switch, not a switch param
So the screen shot is showing a section of a material function
And I want the switch to be exposed here inside a material
Nevermind. I got it i think
lol looks like UE-19058 still isn't fixed? PlayerState is not reliable to work with.
hasn't failed me yet, and its been a few years
if you have a problem with ACharacter::OnRep_PlayerState having PlayerState as nullptr the first time it fires, that is common when there is a lot of network traffic
that OnRep fires when the Character replicates, before its BeginPlay
and PlayerStates have lower NetPriority then Pawns/Characters
nah the problem is that PlayerState sometimes is missing on clients, maybe... Feelsconfusedman
nmever seen that before either.
Haven't seen either, but well
it sometimes takes a while to replicate it
can take seconds even
if there is a lot of stuff to replicate at the start
that's weird yeah. maybe it was just a breakpoint bug. I didn't catch beginplay on some clients
Anyone recently did some object pooling for replicated projectiles?
We got some (obvious) bandwidth issues with not using a pool (the weapons weren't by far shooting that many projectiles when the original system was designed)
And I wonder how one would actually spawn a set of bullets (+ is there some math behind how many bullets one should spawn?) without having the initial replication of this whole pool break everything
Annoying @chrome bay cause you put yourself into the line of fire with all your Forum posts!
On another note: How much should I look at UT's Weapon/Projectile code?
Is it again too "Epic-like" or is it worth learning from?
what is the problem with pooling? just bandwidth?
how accurate do you want bullets to be?
I'm pretty sure I can code the whole pooling stuff. So yeah these two things are my problem:
- How to handle the initial filling of the pool so all these replicated projectiles don't cause a huge delay for a newly connected client.
- How does one math out the required number of bullets for a weapon with X ammo?
Generally as accurate as possible without investing weeks of time :P
I know UT has some method of spawning a fake projectile with unique id on the client
I don't dislike that
just spawn them on clients and server separately with no replication but take into account only server hits
so clients sould be kinda VFX
but if there are A LOT of bullets who cares
Then client bullets and server bullets are highly out of sync
because you replicates them at the moment
ok what about inventory hack?
spawn on both and after a while clients bullets will be adjusted from the server?
That's what UT does with a fake projectile and that's also all fine, my questions were about filling the pool initially
With replicated projectile actors
run math on both
I won't spawn any bullets runtime (unless the pool is missing one)
That's exactly causing our problems atm, so it has to be a prefilled pool
aah you precalculate pool?
That is the idea
hm yeah that's the question
Cause we have weapons that have 0.0125 seconds between two bullets
how do server and client pool differ?
And if you shoot them (with a magazin of 100) you are quickly at a point where other replication drops
The pool doesn't exist yet, I'm merely gathering info before I redo the pool in the middle of coding it
hold on why does replication even drop at first point?
Because if you shoot that weapon with 0.0125 seconds between two shots
It takes 1.25 seconds to spawn 100 projectiles
That all want to replicate
you press a button - call server loop of spawning right?
So suddenly unreliable RPCs are dopped. Location updates of pawns stop etc.
Yeah which is obviously bad. But the weapon is newly done like that, otherwise I wouldn't have done it without a pool
no matter how he does that 1.25 sec for 100 spawning replication is zero possibility to work
That's why I need the pooling :D
fake it man, no way you gonna have reliable replicated bullets
this is how i have done spawning without pooler
Reliable Multicast?
Wouldn't that just add to the network saturation?
Yeah that's not gonna happen haha
i'd replicate only fire command and spawn bullets localy
Also, Reliable Multicasts should be avoided. Some people at Epic even said that they didn't even want that option.
1.25 sec for 100 bullets no way player gonna notice the async
and apply pooling to the hit
not actors overall
if it doesn't hit anything why even bother replicating ๐
It's one of many weapons
There are others with less many shots
And they have to be in sync with the server
In ranked games, a client has to properly see their bullet and not something on their end that isn't even in sync with the server
well your transforms are sync. if you spawn the same way it'll be kinda synced
So even if I spawn the fake bullet to avoid the delay before the server bullet replicates, it has to be synced up afterwards
yes that's why I said pool hits
something stupid like retrig delay will work ๐
this topic is so huge honestly. every MP shooter suffers at this point
remember PUBG async yikes
Never touched that game :P
but for the love of god don't replicate bullets unless it's psysics-based ๐
I also have a question. feels stupid... How would you know when it's time to update data in your playerstate?
What data for example?
anything, just health for ex
I don't wanna mindlessly poll a playerstate waiting it spawned
there is OnRep_PlayerState but I'm ok with server case, maybe postlogin?
Hm, Health I don't even have in the PlayerState.
Lemme check
I use PossessedBy in the Pawn
Cause well ,everything else is too early
That's for the Server
And well OnRep_PlayerState for the Client
There's AController::InitPlayerState().
Yeah and that in the Controller
As well as another OnRep_PlayerState in the Controller
And that's, as far as I'm aware, enough for us to catch all players and having them execute functions with a valid PS
@worthy perch the thing with virtual functions you can't expose them to BP right away can you?
No, you'd add a simple ImplementableEvent
and i hate making event dispatchers
No need for a Delegate
you mean it'll work:
UFUNCTION(BPImplementableEvent)
virtual void InitPlayerState() override;
?
// Header
virtual void OnRep_PlayerState() override;
/** Called when PlayerState is replicated. */
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "OnRep_PlayerState"), Category = "Core")
void K2_OnRep_PlayerState();
// CPP
void AHLPlayerController::OnRep_PlayerState()
{
Super::OnRep_PlayerState();
HLPlayerState = Cast<AHLPlayerState>(PlayerState);
K2_OnRep_PlayerState();
}
yeah that's what I said ๐ yet another event
Well you set EventDispatcher :D that's something else
And no that's the only way of exposing it. Only other way would be modifying source to make that a BlueprintNative event to begin with
boilplates damn them
@thin stratus yeah I did pooling... it's difficult :/
But you also said "REPLICATE THE BULLET" @chrome bay
anyways seems like postlogin is ok for me at this point. I already had the event injected there
Well Postlogin is for GameMode
The other two we mentioned are for Pawn and Controller
So that's a tad diff
What I do was allow the weapon to spawn a small handful of them upfront, then it can add more to the pool as it needs them. I also dropped the replication frequency to 1 and make them use net dormancy as well
but, i def need a lighter system for more generic bullets cus it gets way to heavy after that
thx!
@chrome bay Right so you also have the issue that initally spawned bullets would replicate and the pool would break bandwidth when the client joins
So you spawned less and increase the pool over time
But I see that causing the same issues again, at least if that additional spawning happens quick
Well network saturation or whatever you call it
Yeah to be honest I haven't got as far as having clients join late etc. after a game is long underway.. so the bandwidth thing may well be an issue
Stressfull
For one I can't spawn 100 bullets in 1.25 seconds. And second I can't spawn 100 bullets at the start, cause the initial replication will be shite
To be honest, for actual bullets I plan to use a line-trace bullet thing of some kind, I just can't see anyway actors will scale to that number
hahaha
So you basically fake the bullet's travel time with a linetrace?
Cause I mean ,a hitscan is instant
A bullet can fly a bit before hitting someone
I can't find a single video/thread on how to get raycasting ot work with multiplayer. My rays just end up going through the other players and not detecting. Could someone help me undedrstand whats going on
That's not really Multiplayer related if they go through and don't hit
Also the word in UE4 is LineTrace
RayCast sounds like Unity
Yeah just create a bit of data, then step it forward over time.
Oh well the linetrace would hit and return everythign else it hit but the second it hits another player/client it would just pass through
Well the effects, not the hits as in hitresults
So it does hit its tjsut effects?
I'm talkinga bout my own problem between yours, sorry
wiat nvm thats somethingelse nvm me lol
It might be interesting to take a look at how Overwatch handles the bullets issue. Maybe open Clumsy and set some lag for Orisa's primary weapon.
how do they?
Because from my quick testing, Overwatch "bullets" are just vfx that are played instantly for the client.
aha see ๐
overwatch most likely uses hitscan weapons, like most games do
If your linetrace doesn't hit, then it's mostly a problem with the collision of what you are trying to hit.
Linetraces can be by object or channel and your collision primitive has to block that or be of that type of object. @fickle pond
for arena shooters travel time just doesn't matter
that's the most common solution
for games with larger engagement ranges though it starts to fall apart a bit
Yeah, I might need to convince my client to drop the projectile shit
For something like Pharah's rocket launcher, the "rocket" is client vfx but the explosion is then replicated.
Oh ythanks lol
The Rocket is also totally fine to spawn replicated
It's one single rocket
That can also be pooled if needed
as you might spawn like 10 of them
Yeah, that's true. But I mentioned Orisa in particular because she shoots 12 bullets per second.
Yeah.
I almost garauntee overwatch is using hitscan
Yeah they are
yeah, not a problem then in that case
At least for everything that is not an obviously projectile
They also have stuff like Arrows, Rockets, tripple shot shurikens or wavelike bullets
You can simulate everything other than travel time instantaneously anyway, we do bullet drop in HLL but all the weapons are still hitscan
Well, I wouldn't be surprised if they were hitscan. But Orrisa has very projectile-like bullets and they travel somewhat slowly.
travel time is the hardest part
while rotating them downwards over time
yeah, it's just parabolic trajectory
So the best idea is to have all often shot stuff be hitscan
and only have grenates and rockets be actual projectiles
That's what I'm gonna do
I mean UT spawns 9 flak canon shots
But for whatever reason that's fine
for (int32 i = 0; i < MultiShotCount[CurrentFireMode]; ++i)
{
[...]
// Spawn projectile
AUTProjectile* MultiShot = SpawnNetPredictedProjectile(ProjectileClass, MultiShotLocation, MultiShotRotation);
[...]
}
Yeah UT doesn't pool anything either and only sends the initial packet
prediction with pooling is where shit hits the fan...
currently I've got a replicated pool of "actual" projectiles, then the client spawns a separate pool for predicted ones locally
I though it hit the fan the second you start doing MP -_-
The prediction stuff sounds like a layer I can add later though
Like, the prediction really just feels like something you add so that the bullet doesn't appear 5 meters in front of the player once it replicates (spawned/location)
pretty much, that and so it appears instantly. As soon as you get a few ms of lag the latent spawn becomes really noticeable
Overwatch literally doesn't care iirc
They tested it and said "Clients/Players don't notice. Fuck it"
Like McCree can throw a stun grenade
The animation throws a fake mesh that just despawns
The actual grenade comes out of the middle of the screen
And is not predicted
You just don't see it
Only if you replay frame by frame
And the animations play immediately on the client.
Oh, I thought they would have hidden it until it exploded.
The anims in OW are so quick though, no wonder you dont notice unless your really paying attention
Yeah I think we are forced to go hitscan with a good chunk of things
I have a internal project for which I'm debugging efficient ways of having Physics simulated and shared by the Server
And just shooting a projectile into a pile of boxes without anything else happening (first person example) makes the ping spike and the boxes lag on the client
The ping spikes?
Initially at least
Went from 8 to 300
Normalizes it self but the box are still lagging
And thus all other things that might replicate in the scene
Non-reliable sfx rpcs, health replicating etc. etc.
Can predict all of that of course, but hey got better things to do
Maybe if the net gets saturated, the ping response is delayed.
So my 100 bullets in 1.25 seconds are probably not solved even if i pool them and solve the initial replication
Cause the transform replication alone will nuke everything xD
I've created AI controller which controls players characters when they disconnect, it uses player's player state for HP ammo management, in editor everything works fine, however when I package dedicated server I am getting access violation errors and crash, whenever i try damaging the AI controlled characters. Has anyone had this type of error before?
Is it possible to check bUseSeamlessTravel from command line in standalone?
morning everyone
I have what is hopefully an easily answered question. I'm working on a multiplayer game where clients control characters with click to move. What I'm doing is detecting the hit location on the client, sending an RPC with the location through the player controller and then calling UAIBlueprintHelperLibrary::SimpleMoveToLocation(). This works, but your own character is super jittery. Is this not the pattern I should be using for multipalyer navmesh movement?
@humble comet did you spawn the aicontroller with a own playerstate? or did you just assign the old one to the ai?
got the problem with assign the old playerstate during the player logout (same for timeout etc)
now i'm spawning the ai controller and add a new playerstate to the controller.
i added a "writetolog" function to debug the dedicated server and always stopped after the playercontroller was destroyed. (the playerstate was invalid / nullpointer)
the editor was working fine even without a log entry, so the playerstate was valid during PIE ^^
@south topaz I am spawning new player state and then copy properties from old playerstate, but eventually i found culprit, it was some widget reference causing the null pointer exception =_=
@south topaz the most annoying part is that it runs in editor without problem, and you get the problems after packaging
yep, for some reasons the PIE is more friendly for "fatal errors like nullpointer" ;)
got the same with some other things which worked fine in PIE and crashed hard after packaging :)
or better... sometimes the PIE holds the refpointers and the packaging version cleaned them up ;)
I think I found the answer to my question: https://answers.unrealengine.com/questions/34074/does-ue4-have-client-side-prediction-built-in.html
If you use the console command "p.netshowcorrections 1" you should see some logs and debug displays of corrected movement. If you set things up correctly, ideally you wouldn't see any at all.```
that fixed everything by calling
ServerRPCRequestMoveDestination(DestLocation);```
any recommendations on how to handle logging with only one character at a time per account?
im currently instantiating the player character based on the character's database information but I don't have anything to prevent logging that character many times, or logging with multiple characters with the same account, or both, how could I limit to only one character per account, and only one instance of such character (not instantiating the same character twice)
What do you have in terms of server 8nfrastructure?
well, I have a unreal dedicated server (wiki article), which makes server-side http requests to a node server that handles the database queries through http requests, this requests fill server side controller blueprint information about the logged in user, logged in character (which is their unique database ID), and will use this IDs to be able to make queries to the database
I only have experience with node so that's why im doing it this way, change's to the database in-game will probably be done through websockets instead of http requests, (if that didn't answer your question, maybe an example would help, as I said I'm a noob ๐ )
Just a quick question, are Montages just a cosmetic thing for clients to look at, or do the servers actually run through them.
Is there a way to know if a user is a spectator or a player?
Is GetSpectatorPawn a safe enough bet?
@Junko, dedicated servers can play montages. This is important because some things may rely upon anim notifies to be called on authority.
interested then i have something wrongXD
Oh, you have to enable Skeletal Meshes to play animations when not rendered.
where would this be?
@harsh lintel Why websockets intead of HTTP requests? Do you send information back and forth / or frequently send stuff?
How hard was it to set up websockets?
@spare glade, GetMesh()->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::AlwaysTickPoseAndRefreshBones;
Maybe EVisibilityBasedAnimTickOption::OnlyTickMontagesWhenNotRendered is better.
This one? OnlyTickMontagesWhenNotRendered ? This one didn't work for me.
It was a mistake on my end. Needed bone transforms refreshed.
I only have the login system setup so far (through http requests), I saw a websocket plugin (socketcluster client) and I plan to use it for in-game requests, as for why I want to use it over HTTP is because WS is more efficient
@harsh lintel with c++ you can override the prelogin(xxx) function and do your check here ;)
e.g. check all connected playercontroller if they have the login XY (variable of your playercontroller class) in the array... if yes, fill the errormsg.
if not found, leave the error msg and let him connect ^^
it's not the best way, just a fix thinking of a possible way ;)
you can add a own array of "loginclients" with strings of usernames or tokens or something.
just to check if someone already online :P
the ue4hub has a good post about the prelogin functions... "ue4 server password"
but don't send request to a external server if you have only async calls ;) (errr... blocking calls are not good too, so use something which works fast ^^)
the prelogin will make the call, but will not wait for the result.
that is why i suggested to check the playerarray (or something like this)
I've been testing my build but I can only connect between devices when I'm using my own dev devices. When I use spare devices to test the build, I can't connect to the listen server nor can I host a listen server and have a properly working device connect to it. I'm guessing I'm missing some kind of dependency that is used with UE4. I also get a prompt to install DirectX Runtime everytime I try and run the exe on a new computer. Has anyone experienced something like this?
Would you guys spawn pawns in Game Mode or Game State?
@glad sedge Game Mode
Cheers
Basically every beginning game actor within Game Mode, or just pawns specifically?
Pawns probably

After a seamless travel, some clients (not the server) crash with:
[2019.07.06-07.13.37:622][887]LogWorld: SeamlessTravel to: /Game/Levels/Menus/OSA_Menu_Level_SlotSelection
[2019.07.06-07.13.37:644][888]LogOutputDevice: Warning:
Script Stack (0 frames):
[2019.07.06-07.13.37:644][888]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2019.07.06-07.13.38:020][888]LogWindows: Error: === Critical error: ===
[2019.07.06-07.13.38:020][888]LogWindows: Error:
[2019.07.06-07.13.38:020][888]LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:Runtime\Core\Public\Containers/Array.h] [Line: 611]
[2019.07.06-07.13.38:020][888]LogWindows: Error: Array index out of bounds: 36 from an array of size 0
[2019.07.06-07.13.38:020][888]LogWindows: Error:
[2019.07.06-07.13.38:020][888]LogWindows: Error:
[2019.07.06-07.13.38:020][888]LogWindows: Error: [Callstack] 0x000007fefd31a06d KERNELBASE.dll!UnknownFunction []
[2019.07.06-07.13.38:020][888]LogWindows: Error: [Callstack] 0x00000001406dd7b7 OneStepAhead.exe!UnknownFunction []
This is the complete dump: https://drive.google.com/open?id=15ruCF6FKptwBgP662b5xmnzp140pk1Pp
This is a BP project. How can I start to pinpoint this issue?
first, instal editor symbols for debugging
then you can try acting with more information
@ember needle
not a pretty situation
you can try
starting a game, attaching the VS to process via Debug menu then reproduce the crash
that will also give only limited information, and VS in that mode is slightly unstable
but you should be able to figure out what was the last of your module functions that got called
odds are its one of your c++ functions
unfortunately no, i can show you these functions they literally just expose one boolean to BP
I can't really attach it, this is a crash in a packaged game over STEAM
not sure how to do that
you start the game normally over steam
you open the VS
you go to its DebugMenu and select attach to process
you find your game.exe on the list of runnign processes
and select it
VS will load symbols for a bit, then it will be able to catch a breakpoint when the crash happens
ah ok
will try that... thanks
then i'll ping back here to understand what to do with what VS tells me...
Could someone help elucidate some things I'm experiencing with PostLogin
- I have a dedicated server and 2 clients (Just the built-in multiplayer play mode)
- I have disabled "automatic login" for the multiplayer settings
- Post login is called twice - BUT I am not joining sessions or even finding them in code. Its happening automatically
Why is this happening? I'm trying to get game clients to just load the main screen, and only when 2 players click the "Find Match" button should them attempt to "Find Session".
its making it very difficult to simulate my mobile game
Hello I have a problem I can not define a variable of a client in a widjets I have the reference of the client
is it possible to define a variable of a client in a widjets ?
Is AGameMode::Logout guaranteed to fire when connection is lost ?
@hasty orbit he was asking a question i think
not responding to your widget question
Indeed
its called when the controller gets destroyed
so if the controller is destroyed, logout is called
so yeah seems its guarenteed to happening
happen8
could anyone help me?
@hasty orbit widgets are in no way, and should not be replicated in any way
same goes for your HUD, and your AnimInstances
and your GameInstance
@winged badger
how to define a variable of a precise pawn when I click on the button
that doesn't mean anything to me
your question, i literally don't have a clue what you're trying to ask or do
I want to make an invitation system so that the player when he accepts he teleports to the player
for that you need a ClientRPC in PlayerState is best that sends the invitation
and a ServerRPC back when the player clicks accept/decline, carrying a boolean
ClientRPC should carry the information about the player who sent the invite, probably a pointer to his own PS
same deal with sending an invite
ServerRPC carrying a pointer to PS of the player you want to invite
Client RPC sending you the response
and HUD class hooked into the PlayerState to handle the widgets
do you mean reliable rpcs or unreliable ones?
reliable rpcs being possible to drop at all is a serious bug that epic is refusing to fix/acknowledge
you can find it by just searching for that yes
if you got a source build you can make this change to fix it, comment out the nonsensical code clearing the view target on short inactivity
no view target means reliable rpcs even on always relevant objects such as the game state will not be sent to your client
discovered it when investigating a most curious issue where a user was missing chat messages when his game froze at just the right time
hmm I don't think that would be related, as those actors would be determined to be relevant and start replicating once the client unfreezes and the view target is set back to something sensible
(minimizing the game also should not freeze it, if it does you've got a whole different issue to solve)
Is there a trick to doing multiplayer with sublevels? I have MP working fine on a small test level, but when I try to load a level with sublevels instead, none of the players can see each other. Any advice?
Hey guys, sorry if this is a simple question but i'm working on my first game in unreal. I need to test something in a lobby but for that I need a player to join a few seconds after the session has started. I can't see to do this from PIE mode, and when launching as standalone it doesn't appear to connect to the host, but instead always try to imitate itself as the host. Cheers.
hi everyone rn im currently doing a summer till christmas project on creating server
rn i've done everything from this tut from eps 1 to 5 https://www.youtube.com/watch?v=h9YaStTbGFY&t=317s
In this video we setup our .NET Core WebAPI and build a data structure to store our player locations. We also add an API method to update the player location.
i also do bunch of things like smoothing the movement
rn i wanna know anyone know ways on making ded server talk to each other to handle load of a single map
I'd imagine having to create your own system for that, or using something like a webserver as a middle man to communicate between all of your servers. I'm not experienced with this so this is just my suggestion on what comes to mind. It's possible there is a much better way to do it.
like the server working togetehr to create smoother experience
Oh, you mean like sharing resources?
yeah like an mmo server like spatialos where they use several ded server to work together handling the loads
One way, I think would be to have it when you switch level/words you transfer to a different server. I'm think that most mmo's do something like this, where they have multiple servers and players are hopping between them depending on GEO location and your world location in game
Look at 3rd party solutions like SpatialOS
ouh i know bout spatials im not creating ded server for mmo or anything just a project to challenge myself
Ok I'll try this @winged badger
Hello,
I am still new to networking and I basically want to understand the standard flow for spawning the initial players. So the setup doesn't use spawned characters, just the default Pawn (with camera) and a Playercontroller
The issue I'm still getting sometimes with 2 players and dedicated server is that sometimes the 2nd client doesn't properly spawn the pawn and possess it
something that should be super simple - get the clients ping... Having some frustration
I found a ping variable in player state, it gives me a PIE ping of 3?
I previously was trying to use the ping from the PlayerController from the variable AverageLag (this is a custom pure C++ function exposed to BP, however this gives me 13 in PIE...
@lament cloak yes but they should start sending when it is set again, unlike rpcs which are lost
Btw, for anyone in the future, my issue was quite simple after looking at the Output Log (which I should have checked much earlier). My pawn was simply not getting spawned because it somehow was considered as colliding with something.
Hey anyone know here an event or something for when networked objects are ready? For example I want to do some code on the client, but I need it to run only once it is aware of all the networked objects in the world. Thanks
there isn't an event for "once it is aware of all the networked objects"
once the client has all the objects that were relevant for him at that time, nothing special happens, it just smoothly transitions to updating those and eventually replicating new ones that enter relevancy
you can kind of wait for specific objects by checking if they exist yet
like player states
Okay, my example is a lobby. When a client joins the server fires an RPC that tells that client to open the lobby UI, which then checks all the players and there replicated values and updates it as it should. The issue is I think the RPC is firing too early before the client knows about the other player objects. My server is fine and shows all the players in the lobby, but all the clients show none as if the playerstate hasn't been created on the clients yet
Hope that makes sense
why not open this ui immediately on the client when the map loads, then add widgets for the other clients to the ui as their player states come in?
making it live instead of waiting
That could work, but I still have no idea of the even for when a playerstate is added clientside
event*
I'm pretty new to unreal, sorry
could just use its beginplay, or I think there might be a callback for it on either the character or controller
ah yeah that could work
Create a static array containing all player, add/remove it's instance based on BeginPlaya nd Remove
well there is already an array keeping track of all player states in game state
Oh
there may be events for it being modified too
then you can just rebuild the ui whenever that happens
Thank you
Let's say that I have global data, an array for example that isn't relevant to either players specifically or a certain match. Where is data like that kept in a MP structure? Gamemode?
Like, I don't know, for example a Map of TeamNumber -> TeamColor
Hmm, I guess there is the question of whether we want only the server to have access to it or all clients?
Hmm, would it be correct to say that for global data that I want only the server to access and retrieve it should be the GameMode and for data that all can access freely the GameState?
Too many questions haha, but would it also be advisable to do a mix of the above? Where at the beginning of a match you set data from the GameMode to the GameState to be certain of data safety? Or is the GameState simply replicated from Server to Clients?
For team colors gamemode is only an option if you override iniplayerstate
And set the color in ps, andeve then... means you have to replicate it
Instead of having eadily accessible packaged data
Because for displaying team information, ps will be your context
You dont want to have to do 2 layers of indirection just to display color on a widget
Is there a function that gets called when an actor receives it's replicated location?
PostNetReceiveLocationAndRotation
So they are replicated together already?
It was my understanding that location and rotation were replicated independently of each other. At least to simulated proxies.
Custom NetSerializing FTransform seems like elegant way to do it
I'm running into a spectator issue when a player teleports through a portal (we have teleport functionality in our game) it appears that the characters location is replicating to the spectator before the new rotation.
Think of the game portal. So you go through a portal and your rotation can completely change. But we are seeing a flicker issue where it looks like the players location is replicating before the new rotation that you should have when coming out of the portal. So it doesn't look seamless to spectators
1 frame?
You should check what it does, might be leaving rotation alone for next frame interpolation
okay, yeah it does get called for simulated proxies. Will mess around with it
What did you mean by Custom NetSerializing FTransform?
Best eay to find that out
Id to breakpoint it while the game is running
Examine callstack
Its the path of least resistance, you Netquantize_Normal for rotations
Maybe compress location a little as well
And do not serialize Scale
Location and Rotation are replicated as part of FRepMovement so it's called at the same time
The function is just called from OnRep_ReplicatedMovement()
But yeah, it get's called for any actor, regardless of role
ACharacter overrides it for replay purposes
If I set SetActorTransform on the server for a character will it go through replicated movement?
Or should I be setting the actors position/rotation a different way to get it to replicate through that struct together properly?
yeah setting the transform will do it
GatherCurrentMovement gets called when the actor is about to be replicated, which is what ultimately replicates the transform (excluding scale)
Thank you James, appreciate it
Hey guys I have a default pawn set up, but when my game start it spawns the pawns but only on each client. For example the server pawn only exists on the server. Client 1's pawn only exists on client 1. Client 2's pawn only exists on client 2. Why would this be happening as it wasn't happening before? Thanks
I am spawning a widget on the map... then destorying it after... but it remains on the map after i respawn
this is how I am destroying it... any idea why?
and this is all running on owning client
You try using "remove from parent" on the widget?
@unreal pine yes, still same issue
it shouldn't be a replication issue atleast I don't think
yeah I don't think it is, but throw a breakpoint or a print string on it to make sure that destroy / remove is getting called
@unreal pine found the issue... needed a switch has authority ๐
and run it on remote
does that mean if you use a listen server, that version won't destroy the widget? ยฏ_(ใ)_/ยฏ
good to hear that you have a fix working though ๐
Q - client disconnections. I use listen servers and steam for nat punching and some particular clients seem to always get disconnected. Maybe it has something to do with their connections being unstable, but they report that other games (with dedi servers) don't do this. Does anyone have experience with this, or helping Ue4 / steam keep a connection alive despite dropouts?
Do you think it's possible to have good Netcode in Blueprint? I was thinking of setting up my own system for NetQuantize and sending as a Byte Array but I don't know if Blueprint is very good for this as you can only send via RPC, Guessing it will never come close to C++?
Hey guys I have a default pawn set up, but when my game start it spawns the pawns but only on each client. For example the server pawn only exists on the server. Client 1's pawn only exists on client 1. Client 2's pawn only exists on client 2. Why would this be happening as it wasn't happening before? Thanks
That would technically only happen if you disabled AutoConnect in the advanced play settings
Oh, maybe that's what it was. I'll take a look, thank you!
After checking this isn't the case. It is checked.
Also, I want to mention that the player states do network
a player state for each player exists on the server and each client
but the pawn only exists on the client it belongs, client 1's pawn doesn't exist in the servers world, but does in client 1's world.
So they must be connected some how for the player states to replicate right?
Yeah, so you spawn the default pawn through the GameMode?
yeah
I have a C++ gamemode
BP based on it
Set defauit pawn in that, and in the project settings
It was working for like a week, and then suddently stopped and I don't recall noticing when it stopped working correctly
Honestly, I have not done anything to mess with the spawning
GameMode and GameState classes both either Base or not Base?
Gamdmode is based of AGameMode, and state is based on AGameState
Hm
State i'm currently not doing anything in, it's just a blank class basicly. The gamemode the only thing i'm doing is firing an RPC on PostLogin
Not overriding any of the paw spawn methods etc
On the PC I assume?
And you think the Pawn only exists on one Player why?
Cause if it's really spawned through the GameMode default value, then that can't really be
Well, if I check in the editor hierarchy. There is only one blueprint for the pawn (the servers pawn) but no others for the other clients. When going into the player blueprint and checking the debug tool at the top, I notice that Client 1 has a single pawn, Client 2 has a single pawn, and the Server has a single pawn. They all only have there own pawn, none of the pawns exists on the other clients. How ever, the player states are valid on the server and other clients
Just not the pawns
Can you just print on Tick?
Yes
Print the DisplayName of the pawn or so
Prints 1 for server, prints 1 for client, prints 1 for other client. Tick is only called on the client that owns the pawn, it can't be called on the server versions of these as they don't exists for some reason.
One second, i'll do it now. You want me to print the display name in the Tick of the player pawn?
@thin stratus sorry for the delay, when putting GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, this->GetName()); in the tick for the players pawn, it's shows BPTerrorist_C_0 on all clients
So directly replicating a UObject isn't easy. Will it work if I wrap a UObject with a UStruct and replicate the UStruct?
No, you can only replicate a UObject through an actor via ReplicateSubObjects
As clients have to create the UObjects locally and assigned network GUID for them, so replicating a pointer to some arbitrary UObject won't work.
Okay, thanks!!
hey guys, how can i open multiple dedicated servers that are using steam on the same machine? they are trying to use the same port 27015, is there a way to make this auto increment like the port?
@nocturne berry you have to set the port in the config file of each installation
it is set to 27015 in the config file
Yeah so to run multiple instances on the same machine, you need to create multiple installs / folders with a copy of all the server files in
Then in each install, change the port for that particular instance.
oh man, that won't work with my setup because i am using amazon gamelift
I'm not sure on the specifics of gamelift, we're using g-portal and I'm fairly sure that's what they do
hmm
any idea if there is a way to change the port in code?
yea that's what i'm trying to figure out
but can't find how to, or if it is even possible
Well you can specify anything you want on the command line and then grab it from the game instance in the Init() function
WithFParse::Value(FCommandLine::Get(), ...)
Thing is though... won't running copies of the exe be fighting each other over file/folder ownership etc? I'm thinking in terms of logs etc. Maybe gamelift does something for that
It's a pretty common thing.. there must be some documentation on it somewhere
@nocturne berry - Yeah there's already a command line option for it
QueryPort=
Check OnlineSubsystemSteam.cpp Line 665-671
(in 4.21)
There's also Port= for normal game-traffic
i will try to see if maybe gamelift has something for that, and see if changing the port with the command line works
@chrome bay thanks for your help!
Hello guys,
Question, is pre-defined static data held in Manager objects in the GameInstance for example safe?
I'm trying to figure the best way to structure and store my pre-defined data in a MP structure basically
I know there's the singleton, but I usually like to split my data structures and their relevant functions into separate "managers"
I think 4.20/4.21 added a new system for creating managers
someone mentioned in recently
Might be 4.22.. I can't find it now
Oh it's 4.22 - Game Subsystem
okay found out that gamelift has the option to open each game instance with a different parameter, so i just specified the port i need for each
sweet. Yeah I figured there would be something
now my problem lies with finding the specific session that i created on the server
it seems that the filtering in the Find Advanced Sessions is not working?
it's ignoring anything i put as a filter
is anyone using the advanced sessions in 4.22?
@nocturne berry We never needed to manually change or set the port when working with GameLift.
Each instance should automatically roll over the port
7777, 7778, 7779...
are u using steam with gamelift?
Not for match making or server browsing no. Purely for distribution
hmm, well that's kind of what i was trying to do before
but when i put my game on steam, i wasn't able to connect to the server anymore unless it had steam and i joined via Join Sessions
Seems normal if the game was created through sessions
We use Gamelift directly and simply OpenLevel with the IP it returns as part of the process.
trying to connect with OpenLevel kicks the players right away
because the client has steam, while the server doesn't
so the server rejects the connection
Why wouldnt your server init steam?
it is currently initializing steam
is urs initializing steam?
if it is then it shouldn't let you connect via OpenLevel
No we are using GameSparks subsystem.
at least that's from my experience
Client uses Steam for overlay and distribution only
did u have to setup anything in your .cs files to achieve this?
Im not sure i wasnt the engineer that set it up. I did all the Gamelift integration though
Win at the moment. Its on my todo list to build for linux
Yes
would it be possible to check with the engineer who integrated steam? i'm really curious to know how, because i would like to remove steam's integration and keep it just for distribution
exactly as u have it
DM me quickly so i remember, im in bed on my phone ๐
yup
Yeah those 2 are generally all you need
does anyone knows how can i shutdown fleet that is in ACTIVATING status?
u'll have to wait for it to activate
You cant.
or give an error (after 1 hour i think)
Yeah you have to wait for it to timeout if it was in an unstable state
You can DM me as well if you like
DM me as a reminder i dont have access to it right now. I will in the morning.
no problem
@fossil spoke why is this happening? when i create fleet
it runs everything 2 times
It has to run the installer to setup any dependencies your game might have
Those are the additional files you upload with the server files.
One after the other yes
ok, make a sense
A question - when can I spawn pawns before I get Player controllers entering the match?
Why do you want to do that?
I have a strange issue. In the network profiler I get a massive amount of updates from a certain class called BP, yet I can not find this class inside my project anywhere? What could be going on here?
Oh ok that makes sense, is it normal that the total is called BP?
How do you name a server in blueprints?
ah ok
I don't think it does total them.. it must exist somewhere? Possibly a redirector?
using advanced session plugin
or maybe in the root folder?
any way I can pinpoint the blueprint?
try searching just in the windows folder for it
ok
If it's a little 1kb file it's probably a redirector
Although that would be mega annoying if that is the case
hmmm If I search my content folder in windows I can't find any file named "BP"
all my files have BP_something
could this be an Unreal engine blueprint?
The level BP maybe
yeah that could be ๐ค
I think that gets the level name? Could be wrong though
not from a plugin or something is it?
@velvet parcel please dont post in multiple channels ๐ฆ
sorry
its just kinda going crazy thinking that naming a server is impossible in blueprints lol
You have to be kidding me if this is a limitation LMAO
@velvet parcel Advanced sessions is a community plugin, and people who do multiplayer usually dive into C++ pretty much immediately
Using UE4 with Steam has never been easier! We've made several improvements to usability and quality of life for developers of multiplayer games on Steam.
Dedicated Servers on Steam can now receive custom names (up to 63 characters) with the new "-SteamServerName" launch argument.```
My project is done in blueprints so for now I guess all servers will be called "Server"
LMAO
Use the command
Read the quoted message just above
Listen server? That looks like dedicated server
also farily certain that the lan functionality is busted too
maybe
LAN works fine for me
so the blueprint session thingy seems borked?
It probably isn't
though LAN doesn't work if you're set to Steam
Which is not an engine or BP limitation, but Steam not supporting LAN
It shows ping it shows connected clients it seems to be working I just need the session thing to take a string and I am good to go
I am not using steam yet
And I see no reason to use C++ either. This should probably be fixed imo
Go ask the community that maintains advanced sessions
Yeah you would figure advanced sessions would have this fixed but even they dont apparently
there simply is no way to do it for some really weird reason
The create session node should literally have a string entry right there and be done with it.
Is there something super complex about this I am not understanding?
Well, yeah
Sessions don't have a concept of name
IIRC if you want a name you have to add it yourself through the key/value system that you can optionally add to
"Extra Settings" in advanced sessions
"Settings" in https://api.unrealengine.com/INT/API/Plugins/OnlineSubsystem/FOnlineSessionSettings/index.html
Container for all settings describing a single online session
And then you can look that up when fetching the session
So it's fully exposed to BP, just not in the nice-and-easy way you'd like
Yeah this should be fixed
The idea naming a server is not one of the first basic functions is insane to me.
Especially considering that literally everything else works fine XD
This works fine too
Not everyone needs a session name
I definitely don't
Anyone who doesn't have a dedicated server probably doesn't either
I should not need a plugin that adds 5000 additional options to barely be able to name a server
You don't, use C++
If you want to avoid using C++ for your multiplayer game, then you need the plugin, which works fine and provides the feature you need
Its pretty jacked LOL
Ill be naming every server "Impossible to name servers" for now HAHAHA
I mean if you're having this kind of reaction to using extra settings, I sure hope you don't need vehicles
I can do vehicles myself
I can script pretty much anything. Except making a server name LMAO
Good luck with the multiplayer vehicles
Vehicle is easy to do XD
Right
Naming a server, thats hard
Sorry, I didn't catch you were being ironic ๐
I am joking around at this because this is literally the first limitation I have actually run into and its the dumbest thing ever
I have been using Unreal 4 for years now and this was the one
My mind is fucking blown that THIS was the one thing I finally found
And yes I can blueprint script a vehicle. But thats beside the point
I'm pretty sure the things you need to make a proper Networked Vehicle are not available to BPs
But yeah, Session stuff is not much exposed
What kind of crappy vehicles do you have to make for it to be considered easy
You can do a pretty decent vehicle in blueprints. Probably do it better than most games.
Lol
Its not insanity to figure out how to get something that acts reasonably well.
Whose gonna tell him...
I think you just volunteered
hahaha
I am in the middle of building my current project which is a full blown in game multiplayer level editor with mod support
but yeah making a half decent vehicle is not insanity
Clumsy is fantastic for showing you why your code doesn't work https://i.drowningdragons.io/uQ9y8A4LJ.png
If I decide to make vehicles in the future ill keep this in mind.
This is for literally everything you make
Not vehicles
When you have 0ms latency things that don't work appear to work, and most newbie devs believe their code functions
Why do you think the Character has a C++ MovementComponent with a literal shit ton of code in it?
Cause it's so straight forward to do an even more complex vehicle in BPs?
Coz they made it poorly
basically:
- Good Physics
- Multiplayer
Pick one
๐
Even if it's not poorly
basically:
- Good Physics
- Multiplayer
- PUBG vehicles
Pick one
haha
We live in an industry where the first Halo probably still has better vehicles than most modern games. ๐
Yeah but the first Halo also wasn't limited by BPs
Unless its literally a car game maybe
to be fair player-driven physics and networking is still an unsolved problem from the 90's
And they had incredibly skilled devs
Its not just a few mid level people hashing together a game like most projects people around here work on
Making halo one vehicles is 100% possible XD
Don't get us wrong, BPs are amazing and you can do a lot of stuff with them.
Just be aware that Multiplayer and PlayerInput/Physics is a shithole
Yeah
fuck man sounds terrible
Basically if you hate yourself, do physics
hahaha
You can fake a lot of physics with proper vector math
And that's not even the issue
You can probably tell some of us are battle scarred from dealing with this nonsense
Wonder if Chaos will make everything better ๐
Even if it was, I'd like to see someone writing readable BP code that deals with that..
take fortnites approach and go client-auth. It feels dirty and wrong, but if you want semi-decent collision it's the best we got atm
:D I just don't want you to spend hours on a BP vehicle, just to sit in a corner, crying and eating icecream cause you realize it's not a thing for BPs
tbh I take some comfort in knowing that literally the most popular game in the world doesn't even do it properly
At that point you gotta simply accept your game will get hacked
Id just jam together an actor with custom movement and be done with it for most shit and players would never know the difference.
a car only moves forward and back
So does a Character
I can show you a 2D Dot that lags if you don't code it properly :D
You say it like its a bad thing, what's wrong with eating icecream in a corner and crying?
@grand kestrel It's the times you feel most alive
I feel like the physics should only be used for cosmetic stuff and the vehicle is pretty much fine just being a fast running character who can only move forward
or float in the air
Hoho
I bet you players wont know or give a crap XD
Welp, good luck :P
I envy your thought process
In fact a shitty setup like that will be less buggy where your car can freak out and fly in the air ect
I can't sleep at night if I don't code everything 100% correctly
I am all about smoke and mirrors and getting it to work ... Perfection is murder
And the end result? Look at the Horse in Witcher 3..
I think that's how you end up with a game that runs fine on the surface but has enough edge cases to make people throw the controller at the TV
The horse in Witcher 3 is exactly ^
BOTW is Witcher 3 except your horse doesn't bug out constantly
"Look at how much effort it took to make Roach this buggy"
@velvet parcel Yeah, using character will yield you a Blueprint , MP capable vehicle - but a terrible one tbh
No angular velocity, no suspension, and I'm not really sure how well it handles collisions at 100kph
le stop
yeah
Well while my players are flying and ridding it around killing shit your will still be player game dev dark souls
XD
Make him suffer XD
He likes it
I'm just hoping chaos makes life easier in some respects but I'm not hinging my bets on it right now
This ^
At least the networked destruction will be nice
Being able to just simulate one object at a time in the context of the main scene would make life a billion times easier
We were developing our own solution for networked physics just when they announced it
Er networked destruction
Immediate Mode for PhysX was a step in the right direction... until I saw Epics integration of it with the rigid body node
I don't feel like the physics guys at epic ever really won the debates
Yeah that much is definitely true..
Lets spend hundreds of grand to pay one dude to waste countless hours every year so the next time a car touches a tree stump it can fly 100 feet in the air causing the player to go into epileptic seizures
LMAO
No that is every AAA studio !
That's actually the result when you do it with smoke and mirrors
But it doesn't seem that you are open to guidance at all
my version just kinda bumps into it
LOL
It looks like shit but its not flying 100 feet in the air
That's also not what we were talking about
This is more fun XD
ยฏ_(ใ)_/ยฏ
I can see CMC being just about moddable enough for acradey physics
But.. within a lot of restrictions
That's pretty much the extent of it
I'm happy my drones hover properly by now
@chrome bay Speaking of which, have you added angular velocity to CMC?
Still need to get a mode working where gravity works based on what surface you are closest too ;-;
Not to CMC directly but to my vehicle-ly version of it
Ah rightyo
Yop
I had a nice version with PIDControllers
But wasn't suitable for replication >.>
Any reason why GetPlayerPawn always return null on the client?
guessing they have no pawn ๐
Ah I have a 'nice version of it' too, its the prediction stuff that I don't have working 100% ๐
Called on what class?
Yeah, it was getting correct too much
Now I'm just Interping the UpVector
I've been basically copying velocity
Calling UGameplayStatic::GetPlayerPawn
Epic's integration of Velocity, I mean
In the player state
Yeah I apply my angular rotation/self-righting as acceleration so it's not applied as a rotation directly
Then what do you use in lieu of acceleration
Been there, had trouble stabilizing it
Then #legacy-physics peeps threw random stuff at me
Never understood how James did that properly xD
I'm feeling sharey...
AngularAccel += AlignmentDamping;
const float ScaledTrackingTension = GetHoverMovementProperties().AlphaTrack * ThrustRatio;
const float FrontStr = (FVector::DotProduct(FVector::CrossProduct(FlattenedTerrainNormal, Front), Up)) * ScaledTrackingTension;
const float RightStr = (FVector::DotProduct(FVector::CrossProduct(FlattenedTerrainNormal, Right), Up)) * ScaledTrackingTension;
AngularAccel += FVector((Front * FrontStr) + (Right * RightStr));```
Basically that's what works out the self-righting angular acceleration
Yeah the Damp part was something I never got correct
The bit that really messed with me for ages was the Dot/Cross product combo
Without that, as you spin around the Z axis it starts going crazy unstable
Yeah but that's pretty smart stuff
having your face buried in it for years will do that ๐
What I like is it's just two values to balance now, damping and spring strength basically
Yeah that's how it's meant to work if you got the physics part right
I just never got this to work for Multiplayer
The correction just happened too often and I couldn't find out why
Replaced it with a relatively simple Interpolation
I had a funny one, where using the CenterOfMass for the find-floor trace would cause the tank to jump up and down
I had no idea why, changing that to using the component location or even a socket location stopped it
that plagued me for months
And only for clients too, which made it wierder
const FQuat ControlQuat = HoverdroneOwner->GetControlQuat();
const FVector ControlRight = ControlQuat.GetRightVector().GetSafeNormal();
LastUpVector = UKismetMathLibrary::VInterpTo(LastUpVector, NewUp, DeltaTime, DefaultUpVectorInterpSpeed).GetSafeNormal();
const FVector NewForward = (ControlRight ^ LastUpVector).GetSafeNormal();
const FQuat FinalQuat = FQuat(FRotationMatrix::MakeFromXZ(NewForward, LastUpVector));
Quat = bDisableRotationAcceleration ? ControlQuat : FinalQuat;
Yeah solved most of the issues we had
What I still have to do is some sort of Dynamic Gravity mode
Where you can drive on nearly every surface
Yeah that I haven't ever considered
It's straight forward as I have a custom Gravity Direction
If I change that it instantly works
BUT, there are some quality of life things that hurt
Like driving up a curved wall
The Drone mesh has to rotate fast enough
OTherwise your snoot hits the wall
Shit like that
That's why the code above had that "bUsesDynaGrav" stuff for the interp speed
Ah yeah i had that with hills and stuff initially if the tank moved to fast - I do a trace out in front of the direction your moving then average that with the floor below the craft
Sadly wasn't a solution
Which I can just about get away with if the lift spring is fast enough
Yeah tried that too but we had no proper underlying collision for the level