Heightmap handling for ProcGen

I am coming from a pretty low entry point for this, but wanted to use the opportunity of PROCJAM this year to do some procgen. I have an idea to create a tool/toy that simulates the growth of a tree that has been carved into - y’know, initials and a heart, then the tree grows, the scar deepens and walls up.

I think I mostly understand the programmatical solution: I should have a flat colour image on which I overlay a heightmap that is influenced by user input, then updated a bazillion times with some rules. My problems start wher I can’t quite figure out how what the heightmap is. Just a .lua full of user change tables? An actual sprite? How do I adjust sprites at runtime (I know how to replace one with another but I don’t think that’s the solution here)? Is that even what I need to do?

Since I haven’t used shaders or materials before (in Defold, Blender is okay) it’s a all quite mysterious, and I know I am in for a steep learning curve but there’s nothing for it. Can anybody help point me into the right direction to get started? Any handholding is appreciated.

Okay, so I am busy researching. @WhiteBoxDev ‘s videos came up and look great. The GitHub repo of the Fractal Nose geenration doesn’t run on current Defold (e.g. downloading and hitting F5 results in no generation as far as I can tell), tips to use the example today?

Been using a tilemap so far to draw on screen. Currently stuck on the bloody screen to world coordinates that I should know by now but can’t get to work for reasons.
Then I am not sure how to continue. Probably run some noise thing over the tiles drawn.

(I would like to re-ask the devs to add an editor field for tilemap size, pretty please.)

We are talking of this feature request btw: Define tilemap size in properties (DEF-1779) · Issue #3518 · defold/defold · GitHub

1 Like