I am creating 2d scrolling mmorpg using winsock and C ++, and I wanted to ask how to program client-side prediction and correction? Well, especially the correction, because the prediction basically just runs the physics code that you use on the server on the client. The server sends patches every two seconds. These messages contain positions X and Y and speed X and Y, and the input is left 0, right 1, jump 1 ...
Edit: Is it normal that I do the same for other clients? Therefore, instead of sending snapshots of position and speed, I send only the changed input, and the local client will predict where other clients are going. The server sends patches every 2-3 seconds.
Thanks a lot!
source share