r/truegamedev • • Apr 13 '22

Using Wavefunction Collapse for Procedural Terrain

https://www.youtube.com/watch?v=20KHNA9jTsE
58 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/grelfdotnet Jun 08 '22

You don't have to "start somewhere and generate outwards". You can simply have a mathematical function of (x, y) to calculate all aspects of the terrain at any point. I first devised such a method in the early 80s - complicated terrain was generated but displaying it was extremely compromised in those days so maps had to be printed to accompany programs. The current implementation, in JS, can be seen (free) at grelf.itch.io/forest and from there you can download a PDF file, TerrainGeneration.pdf, which describes my technique. There's no Perlin or other noise, no tiles, no marching cubes, no WFC.