Hacker News new | ask | show | jobs
by gamblor956 4883 days ago
Most RTS games, including Starcraft 2, only update the simulation every 100ms or more. Older RTS games like SC1 and AOE2 used "ticks" of 200-250ms. Essentially, every "tick", player input would be received by the server and distributed back to players after validation for processing or display on the next tick (depending on whether processing is done server-side or client-side). The lag is hidden by visual or auditory cues acknowledging the input (i.e., "Yes, sir!" or "For the Horde!").

This greatly reduces the bandwidth requirements because you have extra time to transmit the data to the user; you only send some of the unit data in each packet. Moreover, you can limit the data to units within X radius of the player/camera and simulate any ships outside of this radius, transmitting only major events like the destruction of a ship. (By simulate, I mean the game could just create random ships and explosions client-side to give the effect of a major battle without actually transmitting or receiving data about those ships; they would be eye-candy only.)