Advertisement Jump to content
Sign in to follow this  
polyfrag

Streaming turn-based strategy

This topic is 1888 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

Any ideas on how to stream a turn-based strategy map? Need to take care of other player movements happening in client's view.

Share this post


Link to post
Share on other sites
Advertisement

What do you already have, and what do you want to accomplish?

"Stream turn-based strategy map" makes little sense. If it's turn-based, why not batch download the map at the start of the game?

"Need to take care of other players movements" also isn't clear -- players are not maps, right?

Finally, "happening in clients' view" is also unclear -- if there is a client, is there also a server?

Share this post


Link to post
Share on other sites

I think what polyfrag is asking is how to deal with the moves other players make, going from their client to your client. All you really need to do is send through what happened, like the unit at (4, 7) moved to (7, 8) and then fired, or unit Q was made at (3, 2). Come up with a few commands or keywords you pass through with coordinates.

Share this post


Link to post
Share on other sites
I need quick download times and can't have the whole game world downloaded each time players log in. It's a mobile game.

Share this post


Link to post
Share on other sites

I'm not sure how your game works, but for me when I'm playing a TBS i like to know what the entire map looks like so I can plan my moves and not put myself into a corner or bottleneck. Perhaps download in chunks, first where both players are, then the in-between areas, then expand outward. Download just the current map, keep it on the device, and when a new map is played on, get rid of the old one and download the new one.

Share this post


Link to post
Share on other sites

I need quick download times and can't have the whole game world downloaded each time players log in. It's a mobile game.

 

How large are your maps? Mobile phones download huge hi-resolution images all the time, and a saved map file is smaller in size than a large photograph, if it's properly compressed. Don't save your maps as text files.

You can also procedurally generate your maps - you can then distribute your maps as a single integer - the procedural generation 'seed' - and re-generate it on the phone from that seed. Using a mix of the two, sending map files to mobile apps shouldn't be an issue.

 

You can make your map fit into amazingly small sizes, if you think about it long enough.

Share this post


Link to post
Share on other sites

I tried sending 2.8 megabytes of height map data (packet headers included) in 98304 individual packets for 6 maps and it took several minutes. Could it be blockage if I'm trying to send and receive such a large number of packets in one frame (reliable UDP)? I'm no longer making the height data modifiable and just need to send the buildings, units, etc. 

Edited by polyfrag

Share this post


Link to post
Share on other sites

First: Are maps randomly generated, or pre-built? If pre-built, then you can install them with the main program and download nothing.

 

If they are randomly generated, then you have two options to improve download speed:

1) Send just the seed, and re-randomly-generate the map on each device, using a deterministic algorithm.

2) Figure out a better way to compress the data.

 

Also, trying to download bulk files (such as static maps) over reliable UDP is a poor match for the technology -- this is what TCP is for!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!