The most basic RTS networking

Started by
0 comments, last by hplus0603 13 years, 6 months ago
I wanted to try my hand at some network programming, and I thought that making a basic network structure for an RTS would be a good place to do it. I've been playing around with raknet and it seems perfectly powerful enough for the task, I'd like to know something about the basics of networking an RTS game.

As far as I can see, you have two kinds of datagram to be send wrt an RTS game. The first is an event which every client must recieve. The second is simply an incremental update, whereby if one does not arrive, the next one will contain a newer set of data and so its not a problem.

What does the basic RTS network architecture look like, with this in mind?

I'm thinking that as the player gives a command to a unit, each command given requires "guaranteed" delivery. This will go to the server, which will do the task of resolving what each unit on the battlefield should be doing. Then, on each server tick, all clients recieve an update of where units are, where they are currently headed to (in the form of a map grid) and their basic stats such as health.

Does this sound sane?
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
Advertisement
The Forum FAQ contains a link to the Age of Empires lockstep networking article ("1,500 archers") which is a description of the canonical lock-step system used by most RTS-es.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement