Tuesday, 8 November 2016

Game Maker Progress 20: Hex-Based Map Generator

Hello everyone,

As I've shown on a preview on the blog Facebook page - I have been working on a Hex-Based Map Generator. This partially began with the notion to work with a pre-set terrain generator - however; I felt this was more critical and more promising to try my hand. I will be using this generator on a project I will be working on from today to January which will likely be a (most likely) small 4x game.

I've been toying with the idea to try my hand at a project of this type - I decided to go for it after being given details on a study unit in the masters programme I am participating in. Now onto the generator!



The generator itself begins with a single tile and expands outwards as you can likely tell from the above .gif. As more and more hexes are generated - the chance for the next tiles to further spawn more tiles is further reduced; creating the above 'island' or 'peninsula' effect in some of the generations. Tiles are also assigned a biome - depending on a setting - players will not only be able to determine the size of the map but also the size of biomes on the map itself. 

Biomes themselves are more likely to cause their adjacent hexes to be of the same type - if the biome size is set to a larger setting. Likewise if set to small - they are likely to be small biome sizes. I am planning on adding more 'behaviour' to the ways biomes are determined (For example, Tundras spawn to the far north and far south). I will be experimenting on that later on. 

Up to this point - I am quite happy with how the generator is working - however I do wish to add ways to switch the generating behaviour - so rather than what looks like an island sometimes is spawned - the generator will instead create continents for example and so on. 

Until next time!
Dylan

No comments:

Post a Comment