-
Notifications
You must be signed in to change notification settings - Fork 459
Client-side Prediction with Reconciliation - I have an implementation - pull request? #2413
Description
Is your feature request related to a problem? Please describe.
As the official roadmap says;
Instead of always waiting for the authority of the network to provide your client players a new position or state change, this feature would allow clients to apply player inputs immediately in attempt to predict what changes will happen in the near future.
Describe the solution you'd like
Me and my team are currently working on a new multiplayer game where we had to implement this missing feature. The current solution is a relatively small modification to the existing NetworkTransform class, mostly adding new methods and logic to handle the prediction and reconciliation.
Our solution fully supports the common "Replay and Rewind" strategy, is ticking at a constant rate (the network tick rate actually) and is tolerant to jitters and package drops (partly from the internal interpolators already implemented).
It also supports making Unreliable RPC's to the server to make it even more suitable if you are making a more intense FPS game or what not.
Describe alternatives you've considered
We initially tried an inheritance approach, inheriting from NetworkTransform, thus needing no modifications at all. But due to some access restrictions it was not fully suitable. However, it is possible to create an inherited version, but that requires to change some private members to protected and such (accessing the interpolators and ReplicatedNetworkState for example).
Additional context
I guess our question is really if this would be something you'd be interested in to take a look at and maybe integrate it officially? Regarding modifying the NetworkTransform by adding new logic, or going for the inheritance approach works either way - it's up to you what you'd prefer.
If you are interested, how do we share these modifications and code the best way? Do we make a pull request and we can take it from there or how would you like to go by? :)
Thank you in advance!
Cheers!