Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Data structure design

This topic is 7212 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know that one of the keys to efficient network programming is proper data structure design. However I am not sure how to aproach the task in the context of game development. Does anyone know of any good examples of, or docs on multiplayer data structure design. In paticular, structure design in realtime strategy games. The amount of information that has to be sent to keep game sessions in sync seems to be quite large, but I know that it can be minimized. (all of the other RTS games can do it so why can't I?) Any resources on methods to minimze data across the network would be apreciated.
We are at the start of our development cycle so now is the best time to think about this stuff.

Thanks in advance.

[This message has been edited by bstach (edited July 23, 1999).]

Share this post

Link to post
Share on other sites
I actually have some experience in this, but it's with a client-server setup rather than peer-to-peer.

The only part of the syncing that's truly "large" is the initial setup, getting everybody on the "same page" essentially. After that, you only need to send and process changes. And most of these changes are pretty straightforward: Create Unit, Damage Unit, Move Unit, and so on.

In the client-server model I'm used to, the client only knows about those parts of the map the player has "eyes" in. In a peer-to-peer, though, I would assume that every peer has to know the entire map and all units on it and what they're doing. The end result isn't really that different, though, and it comes down to the peers keeping each other up to date.

Also, if you can afford a few milleseconds of extra latency, you can look into possibly compressing the information sent using one of the non-patented freeware compression algorithms (such as the one in zlib). The time saved in reduced transmission time usually more than makes up for the overhead of the algorithm. But that's something for *after* you have the rest of it working. =)

Samu Games

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!