Hey guys, so I want to use a bashing attack in my game and I am using ‘Launch Character’ for this. It works perfectly fine, except in networked games. The server is all good. The client however does not work properly. What I am doing at the moment is, if I’m client, I tell the server I want to Launch Character, and the server does it for everyone. Is this the right way to do it? If so then I get a tiny bit of lag/jerk towards the end of the launch. It looks fine if you slowly launch it, but I want a quick launch and in that case, the clients all see some jittering towards the end of the launch.
Hello !
First of all, my experience in that field very limited,
but I thought I’d share something I stumbled upon some time ago.
It’s always a good idea to hear what the big companies are doing to optimize their networking,
for example, instead of immediately executing a player action you can “hide the lag” by
having a power-up sequence and let the server predict when the client is going to execute that action.
In your case, instead of letting the server launch the character “before” the client, **perhaps **you could have a variable bCanLaunch,
and launching the character on the Client if bCanLaunch is true - this way you get the security from performing the action on the server
and the instant feedback from executing the action on the client.
( notice the fat perhaps, it needs a lot of trial and error ! )
Hopefully I understand you correctly, but if you are only letting the server do the launch, then I’m not surprised you are seeing lag on the client. Since you are not doing anything on the client, the server launches the character and then later realizes that the client is not in sync with the server (too far from a small error tolerance), so it then corrects the position and velocity of the client to match the server. This is the latency you are seeing.
You can fix this by locally triggering the launch on the client, and then also calling it on the server.
Tueurdudimanche did you ever find a solution that worked for you? I’m scripting a player dash and having the same issues. I posted a new question to try and revive this discussion.