I'm working in a group with 2 friends on our Gr. 12 final project for programming. We're making a multiplayer RTS game. I've been assigned to the networking section of the game, and none of us have any experience doing network programming.
We've established that we'll have the server process everything such as path finding, build queues etc. The client will receive packets from the server, which will contain information such as HP, x, y, etc of each unit/building (Well, the server will send a packet whenever a unit/building's state such as losing HP, movements etc is changed).
The problem is identifying which unit the packet contains information for. I've thought of generating a number as an ID for each unit/building, and storing the units in a map data structure, where the key is the ID. Is there a better way to do this? How do most RTS games do it?