Movement Shooter
- 5 Devlogs
- 40 Total hours
a multiplayer movement inspired by karlson, titanfall and ultrakill
a multiplayer movement inspired by karlson, titanfall and ultrakill
Weapon test, sway and bob
didn’t learn how to design and model weapons yet so I used the Phantom from VALORANT as a test
I’m done with client side prediction and reconciliation, input buffers etc.
I think I got it to work really well, on localhost you get about 3 frames of peeker’s advantage with 120fps clients which is around ~25ms, which is close to what CS2 gets - with 64 tick rate servers, you can’t really get lower than this
I’m moving onto implementing lag compensation
Here’s a video showing the peeker’s advantage
so uh turns out netcode is hard
it took me a lot of time to get the movement working on poor network conditions
i also reworked the movement
the game can withstand ping jitter and packet loss
i tested with 100ms ping, 30ms jitter and 10% packet loss, it functions amazingly
finally implemented client side prediction and reconciliation
i first tried doing this 3 years ago with no success
now the server doesnt trust clients blindly with their position, the client first predicts its position, sends its input to the server, the server performs the same inputs, sends back the position that it thinks the player is at, client checks if its at the same position, if not, it corrects itself
this was very hard
in the video the red capsule shows the latest position the client has received from the server. once i enable 50ms simulated ping (100ms rtt) you can see that the server position falls behind while the client continues moving immediately thanks to prediction
started working on my multiplayer movement shooter
first i implemented TCP and UDP connections between clients and a dedicated server
i followed Tom Weiland’s old networking tutorials for the basics, but fixed a few things because i felt there were some design issues with the original implementation
after that i added my own modified version of Dani’s Karlson FPS controller from an old fangame i made
right now players can connect to the server and see each other moving around correctly