Ok!

As I mentioned in the last post, I’ve been working on this game for a while so I’ll introduce a different aspect of the game in each post. The whole thing is still a work in progress so anything I say could be changed eventually if I find a better way of implementing a mechanic.

The first thing I needed to do was build a map for all the game objects to live on. The game map consists of a set of 2D tiled hex cells. Each cell contains information on its level of topsoil, rock, organics, saturation, water, height and temperature. When combined, all these variables can be used to determine the type of ground currently present on a cell, which in turn will affect the types of plants that can grow and resources that can spawn there. For example, a cell with high topsoil levels will allow a tree to grow, while a rocky cell will be more likely to spawn boulders.

To determine the level of rock, organics and height in each cell, I’ve created a random map generator that uses Perlin noise. Behold the result:

080613a

As you can see, the worlds generated consist of dense forests with open rocky areas. It should be easy to generate other types of worlds by tweaking the random map generator. For example, a less forested world could be created by lowering the overall level of topsoil. I’ll get around to implementing other world types eventually, but for now this is a good foundation for the game. Next time I aim to post about the mechanics of water and water flow.

If you have any questions or would like to know more, please post in the comments!