Strategic Primer: Technical Challenges: Map complexity Mark II

I talked earlier about the technical challenges posed to the design of my strategy game, Strategic Primer, by the size of the world. I’ve managed to get my graphical clients to render the world map at close to real-time speeds (it turns out drawing a colored rectangle is a lot faster than resizing and drawing an image from file), but there are some further changes I’d really like to make to my conception of the map. First, in the campaign version I’ve been letting explorers “search” tiles they go through, each a quarter of a square mile in size, without slowing down, but I haven’t implemented vision beyond a single tile. In the original version, before the map was tiled, it was at least a couple of orders of magnitude or so bigger, and it kept that size until this campaign (as I mentioned in my earlier post, I reduced the size of a tile from eight or so miles across to a half-mile across), and units had a rather sizeable vision range. I would like to return to a non-tiled map (or one with tiles a few feet across) and to make vision important again.

Second, in the computer version, I’m at an impasse between having a tile (or fortress) contain zero or one modules (at present units, fortresses, or “features”) and having it contain zero or more modules (with no restrictions on which player owns them, either). What I really want is for a location to be able to hold a sensible number of modules, with units able to pass by but generally not through each other.

The map is at present defined as an array of tiles, each of which contains a certain type of terrain: desert, plains, ocean, boreal forest, temperate forest, tundra, jungle, or swamp. Each tile is mostly its defined terrain type (which would permit rivers, themselves “ocean,” on other tiles, as well as clearings in forests, groves in plains, and oases in deserts), but at present I only have that kind of detail for the tiles the players started on. On the other hand, while “ocean” (water), plains, desert, swamp, and “tundra” (ice) are fairly straightforward as terrain types on a smaller scale, forests (temperate or boreal) and jungle don’t work nearly so well at that level.

A rather neat solution to my difficulties (keeping track of relative minutiae in such a large map would be to make the map recursively procedurally generated and only store the ways the players have changed it (and any features I don’t use the algorithm for, and players’ units, etc.). However, since I want to avoid having the code to generate the map become the size the map is now, I need to somehow come up with a recursive algorithm that will approximate the map and match certain essential details of the tiles the players built their headquarters fortresses on.

Comments? (Any ideas?)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s