🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

laggy netcode

Started by
-1 comments, last by evilchicken 22 years, 8 months ago
hi, this is my first attempt at network coding and I got a simple space sim running on a client server model setup. this is how it is built so far. on the server, the game logic updates 20 times a second. all players are updated with its current velocity. xpos = xpos + xvel; ypos = ypos + yvel; the server and client sends snapshots 10 times a second. when the server recieves a snapsnap from the client, it calculates the clients new position with (server and client clocks are sync''ed) xpos = xpos + xvel * time and updates the velocity. the client is done in the same way. however on the client I linearly interpolate the positions of the clients 60/sec. however, the game is very choppy. is this a good way of doing things? any recommendations?

This topic is closed to new replies.

Advertisement