Tile based isometric game networking model

Started by
3 comments, last by weasalmongler 13 years, 9 months ago
Hi all. I am developing a multiplayer isometric view strategy game and I've come to the important time of choosing a networking model and was hoping to get some input from people here about which would be the best to go forward with.

Firstly, here is some information about the game:

- The game levels are fairly straight forward. There are a number of tiles, the game is played on a 2D grid containing certain obstacles.
- Each player (up to a total of 4 players) controls a squad of up to 6 men. There are also a few other AI controlled units in a level, probably not more than 20.
- I am using TCP for networking.


Now I think I have 2 options when it comes to the networking. I can either go with a standard client server model, where the server receives input, runs the game and sends out positions of visible things in the world to each client. Alternatively I can go with one of these "locked step" implementations that I have been reading about. This would mean running an identical simulation on every client at exactly the same time.

For my situation, which solution do you think would be more appropriate? I am leaning towards client-server as it is simpler, but given the number of units in the game do you think this would be too slow?

Thanks in advance.
Advertisement
Both would work, but one is more hassle than it might be worth.

While the "locked step" model effectively lets you have unlimited units, it's also unforgiving - and a lag spike for one player means lag for all. Ofc you could also do away with the "locked" part of it, and rewind and fast-forward the simulation if you recieve events belonging to earlier simulation steps - but that quickly becomes cpu intensive.

You have a low number of units (under 50, and only a fraction of which are probably even visible to each player at any time?). It seems perfectly reasonable for a standard client/server setup be able to handle that. It's more fault tolerant, and forgiving of packet loss and of players having variable latency.
Quote:Original post by Brian Sandberg

While the "locked step" model effectively lets you have unlimited units, it's also unforgiving - and a lag spike for one player means lag for all. Ofc you could also do away with the "locked" part of it, and rewind and fast-forward the simulation if you recieve events belonging to earlier simulation steps - but that quickly becomes cpu intensive.


Since such simulation will run at low rate, rewinding last 20-50 states isn't likely to be a problem in most cases - it may just be annoying due to warping and jitter - but simulation can still run on for a second or more without syncing.


Real world example.
I'm aware of AI War - it's well done and shows just how far you can take that setup.

But it doesn't sound like the it allows for messages to arrive late? If you're rewinding and resimulating 20-50 steps, the simulation part of your gameloop will have a peak with 20-50 times its normal cpu usage?
Thank you for your input. I will go with the standard client-server model. If things don't work well then I will consider the other one.

Thanks again.

This topic is closed to new replies.

Advertisement