Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7752429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:47:55+00:00 2026-06-01T11:47:55+00:00

I am implementing networked asteroids over UDP. I was going to limit the user

  • 0

I am implementing networked asteroids over UDP. I was going to limit the user input messages the the client sends to just state changes. So only send a message when there is a key down or up on the arrow or space keys. This would greatly reduce the amount of packets sent from the client.

However, now that I have re-read Gaffers article on networked physics and his more complex one about making the UDP messages reliable I am rethinking. He states:

The key to making this input stream tolerant of packet loss and out of order delivery is the inclusion of a floating point time in seconds value with every input rpc sent. The server keeps track of the current time on the server and ignores any input received with a time value less than the current time. This effectively drops any input that is received out of order. Lost packets are ignored.

So it is not caring if a packet is lost. Now I am thinking that the vital packet that indicates keydown to thrust the ship forward could be the one to be lost, and never resent, thus breaking the game.

Am I therefore right in saying that the client is instead forced to send more regular (up to every physics update, 50 times per second) dumps of actual keyboard state rather than state changes to fit in with this scheme that is tolerant of packet loss? Or is there a more noble way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:47:56+00:00Added an answer on June 1, 2026 at 11:47 am

    Based on a response to an identical question I asked over on gamedev: https://gamedev.stackexchange.com/questions/26840/send-regular-keyboard-samples-or-keyboard-state-changes-over-network the concensus seems to be to only send keyboard state when it changes (at the time of key down or key up only). This generates hardly any traffic. It necesitates ensuring that these messages are reliable. This will be a challenge to achieve as the messge is time critical. i.e. even though the client can proceed to move their own player (ala client side prediction), the other clients need to be informed of the change in the state of their competitor, via the server, and in “real time”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a network client that sends messages to a server. The messages are
I am implementing a user-space network device that makes use of the Linux TUN/TAP
I'm implementing a java TCP/IP Server using ServerSocket to accept messages from clients via
I'm implementing a network server that processes udp packets. I want to avoid replay
I'm programming a network protocol over UDP, using C/C++ in Linux. The protocol must
I'm currently implementing a IP-to-country feature for a client in the US. The problem
I'm implementing a simple TCP client and TCP server in Java at the moment,
I'm interested in implementing a 'user data' backup facility for the core data sqlite
I am implementing Backbone.js, and I am just trying to understand how the sync
I'm implementing a Windows Explorer Shell Extension for a networked file system on Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.