Important
There is a much simpler and more reliable solution for prediction-rollback - Masssive ECS
It was an interesting experiment, but there are many problems with it. So, DO NOT USE IN PRODUCTION!.
Deterministic prediction-rollback netcode library for fast-paced games.
Library does not reference Unity Engine, so it could be used in a regular C# project.
P.S. currently, only samples references Unity Engine.
- Responsive controls with no delay
- Unlimited session length with late-joins
- Easy client-side coding with Unity (no ECS)
- Clean and simple OOP architecture
- Cross-platform determinism
This is a library, not a framework. Thus, the user controls everything that happens.
Implemented features:
- Prediction-rollback with zero GC allocations
- Live command timeline - make changes in the past and see immediate effect upon the future
- Distributed simulation - killer feature, allowing for many great things
- Algorithmic command prediction
- Input replication
- Input decay (fading out)
- Snapshots memory recycling on demand
- Replays with command history
TODO:
- Commands serialization
- State serialization for late-joins
- Actual networking
Here is some simple shooter with prediction-rollback features.
Input prediction sample. When there is no input from the player, the movement is fading out, and the shooting repeates in the last direction.
movie_017.mp4
Live simulation replay sample.