In games like Half-Life 2, Team Fortress 2 etc, when you play against other players online, your local game communicates with a game server.
If you’ve built one of these games, what sort of information is sent by your local game to the game server, and what sort of information is sent to you by the game server?
I recall reading that in Team Fortress 2, the computer tracks the trajectory of every projectile including every bullet, rocket. It seems like that would generate a tsunami of messages, yet my game works reasonably well over distinctly average broadband.
I’ve noticed gaps in the magician’s curtain when severe lag occurs. Sometimes other players “teleport”; they’re not where I think they are. Other times, I can peer around a corner and be killed when there’s no-one there; except shortly after I see the other victorious player.
So roughly, what is being communicated over the network to create the illusion of real time.
I’m generally interested in simulation games but have never built one. I’m just trying to get a feel for how it’s done.
If you could direct me to other articles to read about all of this, that’d be great.
Let’s start with
- The position x, y, z, speed, and direction of every player.
- Player switches weapon
- Player fires/stop firing.