Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411502 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 03:33:35 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Client-Side Prediction with PvP Knockback
Pages: [1]
Print
Author Topic: Client-Side Prediction with PvP Knockback  (Read 603 times)
sky-coding
TIGBaby
*


View Profile
« on: February 26, 2018, 09:01:19 PM »

Hello, I have a high-level question about networked game architecture. I have a simple 2D client-server multiplayer game which uses client-side prediction and server reconciliation. When client A knocks back client B, client B experiences snapping/popping (reconciliation with server) because it is unable to predict client A's knockback. This is noticeable as client B has predicted itself incorrectly moving without being affected by the knockback, so it has to adjust a large distance to catch up.

What is the best/most common/standard/easiest way to mitigate this?

I've considered having knockback effects instead apply a "debuff" that does not apply velocity until ~100ms has passed, allowing the client to receive this debuff in the next packet and then predict the velocity change in-sync with the server.

I'm also considered interpolating the client through the snap which would make it less jarring, although it would still allow to client to predict itself in a position that the server never acknowledged, possibly leading to downstream snapping - what if the client predicted hitting/touching something it never actually reached before being knocked back? Raising my tick rate up from 10Hz might help minimize this scenario.

Thoughts and suggestions are greatly welcomed, thanks!!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic