🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Multiplayer Turn-Based Tile Strategy Game - Help?

Started by
6 comments, last by EdR 23 years, 2 months ago
I was wondering. Since the game I''m working on, Planitia Colonies, allows the player to modify terrain in-game. Therefore, sending the map once won''t work. Will I need to send the map while the people play it constantly? I.E. Player 1 goes Player 1''s computer sends the map to Player 2 Player 2 goes and so on. I was thinking, if the game sends the map constantly (and the map can get pretty big, up to 1200x600 tiles, each with its own ID number and terrain tile byte) it will be really laggy. So will I need to have the computers constantly send the map or not? Thanks for your time.
http://edropple.com
Advertisement
Ermm, you could just send the changes instead of the entire map. For example:

It''s Player 1''s turn. Player 1 makes 5 changes to the map. As he makes the changes (or when he ends his turn) the changes are sent to Player 2. Player 2''s map is updated to reflect the changes.

This way, you only need to send 3 (minimum) numbers per change; the x and y coordinates of the tile and the change that gets made.

Hydra
I guess so. There''s already about 50 KB going around a second, after all.

http://edropple.com
I guess so. There''s already about 50 KB going around a second, after all.

http://edropple.com
Moreover, you could send not the map changes, but the events
that caused these changes.
Assuming you know what events may happen in your game (explosions, etc) and how do they alter terrain.

For instance:

Player 1''s turn: Fires at location (X, Y).

data transmitted to Player 2:
explosion: location(X,Y), damage range(d) ...

Always transmit the highest possible level of info.

Moreover, you could send not the map changes, but the events
that caused these changes.
Assuming you know what events may happen in your game (explosions, etc) and how do they alter terrain.

For instance:

Player 1''s turn: Fires at location (X, Y).

data transmitted to Player 2:
explosion: location(X,Y), damage range(d) ...

Always transmit the highest possible level of info.

Geez...I tried that, jroger, and it crashed the game - I guess trying to play it to localhost isn''t smart...

http://edropple.com
Well it seems you have a choice. An event base network model, where you send pertient events, or a state based network model, where you basiclly send states (the world, etc..), of course you can mix them too.

However for your problem I dont think it will be fesible to send the map constantly, at 1 byte per tile, a 1200x600 map will take up 720K, or about 3 minutes of download time for a 56k modem. However if you only send the difference between maps it should be much smaller. So for your map problem it would be fesible and simpler to send the deltas.

You can minimize your bandwidth consumption using a event proprogating method, where events are replicated through out the peers.

For turn base games, there are alot of internal as well as external events which have to be synchornized. The external events are things like user created events, such as issuing commands, etc.. The internal ones include things like random number request, internal state verification etc.. Also these events may not be one way. Its best to plan for this event methodology from the begining.

Well Good Luck

-ddn

This topic is closed to new replies.

Advertisement