Launch Character in networked games.

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.

Any help is much appreciated!

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 ! )

An absolute gem is this GDC session by David Aldbridge, he explains how networking is done in their game Halo Reach,
the challenges they faced and how they went about solving them:
http://www.gdcvault.com/play/1014345/I-Shot-You-First-Networking

Not only is it an amazing presentation, they also use familiar Unreal terms; replication and authority!

Just a food for thought.

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.

Hope this helps!

Hello, I’ve tried to call it from the client and then from the server but it still lagging. Can you show a blueprint example?

Thank you for that link! David Aldridge’s GDC talk gave such great context to network challenges! THANK YOU!

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.

https://answers.unrealengine.com/questions/679250/launch-character-in-network-game.html

you are guys! This worked for me!

This is 2 years old, but we’re running into the same issue.
This issue is from 2015, but doesn’t have a solution. Reducing server position corrections/increasing error tolerance - Blueprint Visual Scripting - Unreal Engine Forums
@LoN The YouTube video doesn’t exist any more, so I can’t see what worked for you.
I’m working in C++ rather than blueprints, so a code solution would work best for me.

@isopropanol Sorry, I don’t even remember what I was working on at that time, can you describe the problem you are facing?