netplayjs icon indicating copy to clipboard operation
netplayjs copied to clipboard

Add Delay-based Netcode

Open rameshvarun opened this issue 3 years ago • 1 comments

Lockstep netcode allows you to synchronize a deterministic game over the network even if you cannot serialize / restore it. This is used in the physics demo. However lockstep is not really practical, since a stall-free experience requires latency < timestep.

Delay-based netcode adds input delay to allow additional time for inputs to resolve.

I think the best move is to add this as a new class. Trying to implement delay as a parameter to LockstepNetcode could make the lockstep code too complicated.

rameshvarun avatar Apr 10 '21 15:04 rameshvarun

I think input delay would also be useful to apply to rollback netcode, in my opinion about 2 frames of input delay usually makes rollback a better experience. Without a few frames of input delay, player will see more 'warping'.

ryanodd avatar May 16 '22 05:05 ryanodd