Live data from Hacker News

Building a Procedural Hex Map with Wave Function Collapse

felixturner.github.io

91–92 of 92 posts

Re: Building a Procedural Hex Map with Wave Function Collapse

#91
post #83

It's beautiful. But also pretty unsatisfying in a way. Roads don't make sense. Rivers barely make sense. There's no higher-scale structure - the reason why most games with incremental procedural generation usually feel stale after a while, and always static. Every planet is different, yet feels the same. (Dwarf Fortress is the one procedural game I know - besides maybe its more faithful clones - which isn't static. B…

Noita is also procedural, but not static, although I'm not sure if that's what you're talking about.

Noita uses herringbone wang tiles where each wang tile pixel is 16x16 simulated in-game CA pixels, with tiles selected from a per-biome pool and the ability for biome-specific scripts to override certain areas too. As part of expanding each wang tile pixel into 16x16 pixels, some noise is applied to terrain to add the curvy look, with another layer of (thresholded perlin?) noise that controls which bits of inner terrain get variations (gold veins etc).

Source: working on a Noita-like so have spent a bit of time looking at prior art. Noita wiki.gg will explain a lot of it though (warning: many spoilers).

Re: Building a Procedural Hex Map with Wave Function Collapse

#92
post #67
post #45

The demo runs at 5 FPS on my laptop (11th gen Core i5 and Iris Xe graphics, Chrome Latest as the browser, with the GPU being the bottleneck). I was hoping for something rather more efficient given the write-up saying it ran at 60 fps on mobile. The maps are pretty, but the per-tile build constraints of the WFC build approach means that pretty unnatural generations end up happening because non-local influence is diffi…

You should be able to use chrome://gpu/ or about:gpu to tell if Chrome is doing software rendering.

I said in my comment that it was GPU bound. Task Manager was reporting 100% GPU usage from the browser, which went down to 0% after closing the tab.

It looks to be that the demo has been fixed since I initially looked. Testing today showed much improved performance.

Post reply on HN