Map Generator 3.0 - Please Critique!

I suppose I do have 1 update that never really made it into this thread. A few months ago I basically implemented what I was talking about in this post: Map Generator 3.0 - Please Critique! - Blueprint - Epic Developer Community Forums The river system was rewired to use breadth first search combined with the height map.


Notice how the white hexes are mountains, and the heightmap forms around them. Red has a high cost which lowers as you move towards green. This naturally leads the river to find the easiest, most natural looking path to the ocean when combined with the pathfinding algorithm. Also notice how mountain ranges will naturally have rivers flowing from both sides to opposite oceans, and very rarely through them.

I also changed river placement from an edge tile setup to be center tile, since that significantly cleans up the river logic and also makes the river more central to what is happening on a given tile. My only misgiving with that is that it could be harder to handle tile improvements with a river front and center. Worst case I figure out a way to slide the river to the edge, while keeping the logic centered on the tile. Generally a visual problem and not one of map generation.

I may give a more detailed rundown of what is happening in the blueprints at a later date. Generally this system is much less complicated than the old river system, which is good for many reasons.

So apart from that, here is a rundown of what has happened to the generator over the past few months/year that haven’t really been discussed here:

  • Moved generation to spread out over tick instead of locking the program up while billions of iterations are processed.
  • Took the primary map generation blueprint apart and split it up into functional areas such as Climate, Tectonics, etc. The blueprint was well over 100MB and compile times were getting stupid, so this was a good move. The old map generation blueprint now acts as the controller for all things map related.
  • Made the generator more flexible, such as being able to regenerate climate/tectonics/etc on the fly. This is key for the map editor, as well as future features such as global warming. The cool part with the map editor will involve being able to alter settings and regenerate specific bits of the generation. If you like the tectonic layout, you can regenerate landmass until you get it how you like it, and so on down the line. Moving to get this into the UI, and then add single tile updates to the map editor capabilities.
  • Implemented a save/load system.
  • Put work into the UI and centralized UI functions into a UI controller.
  • Various other minor improvements and changes that I can’t think of right now.

So work on the Map Editor is the current focus, with unit pathfinding and a unit controller being next in line.

Aside from that, here are some of the things that remain to be worked on with the generator:

  • Seed Options. Right now there is only 1 generation type; tectonic. This basic system can be used to make a large number of your standard generation types just bey controlling where you place the seeds. For instance, Continent generation would simply work based on the player selecting the specific number of continents, the system evenly dividing up the map to cover each continental plates plus any specified ocean plates, and then properly placing the seeds in their zones and setting the tectonic boundary types to be conducive to the formation of standalone continents(divergent). Pangaea would be similar, but you would only have to place 1 continent in the middle of the map. This could even be an option in the continent generation where the player only chooses 1 continent, thereby removing the need for an additional setting.
  • Player balancing. Currently things generate pretty randomly(based on seed dispersal), which could make for rather unbalanced starting conditions. 1 player starts on a decent sized landmass, and other starts on a small island chain. When player start positions are put into the game some work will have to be done to inject the player start position into the generation process for consideration. This is a little easier if you are doing a 2 continent setup with 2 players, but other generations will at least need a setting to increase player balance if that is what the player wants to see.
  • Map generation of other planets. When you reach the space age a small moon map could be generated which you would kind of zone to and fight over as if it were another piece of your current map. Could do the same thing for the rest of the solar system, other solar systems, etc. I see this a the natural progression of a civilization game, as opposed to ending it in the year ~2050 as seems standard. :slight_smile:
  • Historical Development. This isn’t exactly map generation, but it would be similar in implementation. If players want to start in the medieval age, they won’t necessarily start with a naked settler or small starting city. The game will generate and grow civilizations and history up to the starting point, which would give the world a feel of being lived in prior to the game starting for the player. This could vary from vaguely simulating what the players/ai would have done to reach a certain point, to actually having the AI play the game with the giving starting conditions up to the specified era.
  • General iteration, polishing, and bug fixing.

That doesn’t sound like you would need overly complicated pathfinding which would make the pentagons less of an issue. Though, there are a few areas of my actual generation that would simply not work with the pentagons, such as when I am counting tiles across a continent to determine how deep a mountain range or weather pattern should penetrate.

It seems like you would need a much more spatially oriented generation system than the more tile oriented system I have. You would do more measuring of distance from A to B and less counting tiles. The only time I measure distance is for the Voronoi generation, but many of the systems rely on specific tile “Manhattan distances” which would probably be thrown off by a pentagon. You could possibly account for them, but it would take some work to get that implementation right.

1 Like