Jump to content
  • Advertisement


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


laggy netcode

This topic is 6095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!