Skip to content

AbdullahRasheed/multiplayer-client-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multiplayer-client-prediction

A Client Prediction multiplayer game model.

Let GameLogic be an implementation of the game's working logic, and let lc and ls be instances of the game logic from the client and server respectively. Then, upon any input, the client will execute this input with lc and send that input to the server, which will simulate the same input with ls. The server will then periodically (every ~33 ms in this code) send every client the game state (including player positions, velocities, states, etc.) as determined by ls. Then the client will 'replace' its own game state with the server's by backtracking its buffer of game states (sometimes a practice of interpolation is used instead). This is called reconciliation. In between the reconciliations, lc is still running which allows the client to render its current game state (essentially predicting the next game state based on the previous reconciliation).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages