Hot answers tagged

1

Unfortunately, there is a flaw in what you're suggesting. If ClientA starts the session, does stuff, then gets disconnected for any reason, then ClientB joins the session, who's going to send the stack to ClientB? You should store the stack on the server and send it to the clients as they join. This will have also the advantage of preventing around with ...


1

None of the options you listed is really a good choice. Nagling is turned off by default so each packet you send will be an individual packet. A good rule in game networking is to find a send rate and don't go over that. That is perform your own nagling of packets. Essentially don't send 30 individual packets one after another for individual points. (You'd ...


1

I would suggest making a separate buffer for each player that is responsible for squashing commands together. Basically, it should reduce a set of network packets into an approximation of user's input, which is sampled only once per game update that should result in equally significant change for every player. The question is, what should be sampled from ...


1

Your game shouldn't depend on the speed at which the packets are sent as it will vary depending on your internet connection regardless of what rate you attempt to send them. Instead your server should move the character depending on the user actions (e.g. while they are pressing (sending) W move them forward, or if you are counting mouse clicks then send ...



Only top voted, non community-wiki answers of a minimum length are eligible