Jump to content
  • Advertisement
Sign in to follow this  
Turtlebread

Client updates in Client/Server Model

This topic is 4638 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

Hey all, I've recently started designing a networking architechture for an action, FPS style game. I've been doing a lot of reading on the subject, and I think I have a pretty good grasp of how I want the client and server to communicate. The server will send out periodic updates (7-10 times a second) that informs the client of everything that has occured since the last recieved update. However, I am not sure how to handle the client-side sending of input to the server. Should I send a packet to the server the instant the user presses a key? Or should I only send client updates periodically and just send a list of moves done by the user? If I only send client updates periodically, how do I handle the case of a user moving forward, then firing, then jumping in the correct order on the server side? Thanks for your help.

Share this post


Link to post
Share on other sites
Advertisement
You can put ordering information into the packet you send to the server. Ie, send a packet saying "at time T, the user ran forward; at time T+d, the user fired, and at time T+d2 the user jumped."

However, because clients upstream typically aren't as scarce as client downstream (because there's only one player's data, not N players' data), feel free to send a packet much more often than you'd send a packet from the server.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!