Monday, 19 October 2015

Hex Terrain Pics

It's very crude right now, but here's my hexagonal terrain system at work.

The current script creates a 20x20 randomised-height map with random cell state selections from (dark green woodland, light green grassland, brownish scrubland, grey shale). Then, when update is clicked I run a cellular automaton with mods for things like grass growing better near forests, everything growing badly on heavy slopes etc. Finally I run it twice for each update (to avoid the tick-tock cycling problems that make cellular automata look a bit weird and unnatural). All done in lua, then rendered by Irrlicht from the lua registry I made for Jump Point.

This is one result after 6 iterations (3 clicks of "update").

(Font and "FPS Touch Bar" controls are from the ProtonSDK demos, as usual.)

The grey areas are basically dips in the ground. Once I make regions blend into one another and make the height something a bit smoother than Math.random(-4, +4), the transitions should look rather a lot better.

I should note that the "This Is A Label" and Update button were both also added from script.

Next up - a slider bar for rainfall (which will involve adding slider bars to the GUI scripting) and add in tree rendering for the "forest" tiles.

I should probably mention I still have no idea what kind of game I'm going to make with this. It's still mostly just an experiment/toy :)

No comments:

Post a Comment