Archived

This topic is now archived and is closed to further replies.

evilchicken

laggy netcode

Recommended Posts

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?

Share this post


Link to post
Share on other sites