Frogboy Frogboy

The art of map generation

The art of map generation

Ever noticed that most games don’t have randomized maps? There’s a reason for that.  Doing them very well is really hard.

Probably if I had to do it over again, I’d be tempted to not have random maps. But as a gamer, I just find random maps to be too important not to have. It’s a big issue with me that I feel like each game is a new game.

Since Stardock is closed for the 4th of July holiday, a few of us are just working on stuff that we enjoy.

My long time friend, Paul Boyer, who is in charge of art, is making cool new stuff for the Fallen this holiday.

As for me, I’m playing around with the random map generation which is admittedly in pretty rough shape (i.e. a LOT of hard coded values in there).  For instance, in your build, there are 40 goodie huts on a map. No more. No less. Regardless of size.  The bigger the map, the more boring it will get.

Of course, have too many goodie huts and it robs the game of challenge.  Too few and the game feels boring.

Same for resources. Starting location is just too important to live to chance. The area around a given player’s start MUST have some useful, balanced stuff around it (and in beta 3, there just isn’t).

The map generation and starting setup are things that I suspect I’ll be playing with for the next couple of years. It’s just something that can just keep getting better and more interesting over time.

79,936 views 36 replies
Reply #26 Top

I am extremely pleased that you've insisted on having a RMG. Undoubtedly, most people would find the lack of an RMG a reason to complain about the game from the get go. Myself, I believe it's a very important feature for this type of game, as the replayability facvtor is limited without an RMG. RMGs tend to make this sort of game a timeless classic. Thanks again for going to the effort for the premier build of Elemental!

Reply #27 Top

Good on ya Frogboy keep at it because random maps are ftw. Static maps get boring and there is no adaptation to the evironment. Strategies become fixed and regular. I like the challenge of working with the terrain in games like this and the dynamic results. Curious why not go with hexagons for the map layouts? Anyone at Stardock working on spherical worlds? :)

Reply #28 Top

Quoting Tormy-, reply 23
Froggie....just a note: The starting locations of the players on the random maps must be balanced somehow, or the multiplayer games will be imbalanced. Example: It wouldn't be good if player X would start near 3-4 special resource sites, while the first special site for player Y would spawn 20 tiles away from the starting location.

I am sure Frog understands that but I would agree with Tormy.

I would assume that for a generator to assure even distribution, any map would first take the # of players and the given Map size selected, and would then generate the base Map. With the base in place it would then break that Map into a # quadrants equal to the #of players. With that it would generate an equal amount of resources, Huts etc. per quadrant, based on the Move distances available from each players starting position, radiating outwards.

That would not account for all the Player created SoV's differences (moves) but each Map would at least start out provided some semblance of equality based solely on generation.

Reply #29 Top

Are we going to be able to build custom map generation scripts?

Reply #30 Top

For map generation, here are some tools you want in your toolbox:

1.) The diamond-square algorithm is excellent for generating coastlines and altitudes. Do not underestimate the usefullness of knowing a tiles altitude! Even if altitude plays no part in the game, you can use it for eye candy and for running a realistic river network. In my latest project, I've been working with Perlin noise and I may be liking that better than diamond square for its controllability. You can check out my latest app for Dwarf Fortress here, It's a stand alone app so you don't actually need to mess with DF if you don't want to risk that kind of addiction. It's still fun to play with on it's own.

2.) Get a good seed fill algorithm for map analysis. I use one from the original 'Graphics Gems' book. This lets you determine how the continents are configured and what their sizes are. It lets you efficiently find unreachable map tiles. It lets you fill in lakes below a certain size. It's something I use all the time for various map tasks.

3.) Learn about betweeness centrality. This will help you know what areas of the map are the most important for mobility. This is especially useful for the AI, so it knows where to set up choke points on land or at sea. The algorithms for finding this can have an exponentially increasing cost, but there are useful ways to approximate this by not throwing every map tile into the pathing network.

4.) For setting certain thresholds, for example let's say you want a map to be 15 percent mountains, you can put the map tiles in the list and sort the list by altitude, then make the top 15 percent of that list into mountains. This way everything is relative, so that if your generation methods are not consistent min max wise, it doesn't matter. It's much easier to generate altitude for every map tile, than it is to try to generate the right amount of 'mountains' somehow.

Like Laurent said (LDiCesare) let us mod the map generator, and we'll take care of it. In fact you couldn't even stop us!

P.S. Dont give up on the rivers! Although, where do rivers come from on a dead world? Hmmm. dunno. 

 

Reply #31 Top

I wish for 2 styles of RMG.  One is almost symmetrical, another one is real-world like.   The first one is mainly for balanced play amongst players, the latter is used for players who need to figure out how to get out of an disadvantagous (or advantagous) starting surroundings.  The latter needs not be balanced, if you are the only player that stuck like the Japanese, so be it.    Both has its reason of existence.  both style is important that should be a controllable attribute of the RNG, which this setting sadly is missing in most existing RMG.  

For the "style" above, I mean from the view point of chokepoints; like non-passable mountain, non-passable river, deep ocean, distance and distribution of important resources.   For human being, what make a map symmetrical/balanced also depends on how easily it can protect or attack its surrounding opponents when chokepoints are considered.

River for example can be important chokepoint.   Troops should sail downstream easily but not upstream unless later technology is available or magic is used.

====

Ring world, spherical world, normal edge to edge map is another RMG option that is highly appreciated.

Reply #32 Top

Climber's right. You need balanced (MP) maps and realistic (SP) maps.

It's hard to manage something balanced and Earth-like, and furthermore I don't want the SP games to be too balanced (good when one ai is at an advantage and can be a good opponent late-game), so we need at least these two settings.

Reply #33 Top

So I'm a bit confused: are random maps in Beta 3A, because I keep starting in the same place on the same map, and I'm now wondering if that's a bug, given the request to report odd starting locations (which would be unlikely if the map is fixed).

Reply #34 Top

What would be really nice is if the Random map generator could use alrady created maps in it's rotation of picking out maps. So lets say if I had downloaded 30 custome maps from the modders I would love to have the random map pick from these as well.

Reply #35 Top

I'm wondering about the randomness of maps in beta 3C now. It's the same map every time, but I guess that's how it's supposed to be now? 

Reply #36 Top

i think the resources should be nice and random, but i think that a fertile land tile should be used for the starting tile for the sovereign.  basically when you start the game, the game places you on a random fertile tile.  that's your start location.  i don't want the game to always give me a bunch of good stuff, nor do i want the game to evenly distribute stuff across the map.  you should have to make due with what you get, and build a strategy around it.