2011-04-03 - Terrain generator

The terrain is currently just a premade height-map but I am working on a proper terrain generator. It assembles the terrain randomly from prefabs mixed with detail maps. It’s quite a substantial chunk of code and I can’t commit it until I fully integrate it otherwise it would just break what’s on gitt.

speed dials Basically a 32×32 tile will be blended with other tiles (with 8 pixels of overlap) to fit the layout of the map which may be a custom map or a randomly generated one (or a mix) and then depending on the terrain type a random detail heightmap from a pool for that type will be added on top along with a matching terrain type detail map. This is all done once when entering the map, it generates a conventional texture which is then used by the arena class to create the terrain mesh as if it was a premade one.

I also had some fun trying to redo the HUD in a different style but I didn’t like how it was going so I stopped. I think I went too far with limiting the resolution and the palette (64×128 with 32 colours). I think I’ll try doubling the resolution and create a common but bigger palette for the whole HUD.