jumpy icon indicating copy to clipboard operation
jumpy copied to clipboard

Procedurally generated maps

Open erlend-sh opened this issue 3 years ago • 3 comments

In short, what we’d like to do is not to generate new maps entirely from scratch, but rather remix maps that players have already made with the in-game level editor.

We want to let users quickly put together a rough version of their initial idea, and then let them hit the “randomize” button to be presented with ~20 variations of the map they made. The generated maps won't even have to be 100% error-free, because they’re generated at the editing stage where broken maps can be manually fixed or rejected before putting them into play.

0A042EB5-E1BC-4E96-B97C-699535294E2C

This is particularly useful for map makers on Console devices without mouse and keyboard: It’s not so important to place every tile pixel-perfect (which is hard to do on a gamepad) because that stuff can be smoothed out in the procgen versions anyhow.

erlend-sh avatar Feb 13 '22 16:02 erlend-sh

Maybe Wave Function Collapse could be a nice technique for generating the maps? The user input can then be a small combination of input tiles.

tversteeg avatar Feb 15 '22 18:02 tversteeg

I think the best way to do this, would be to somehow resolve segments, based on platforms and rooms, and multiply randomly, maybe along a centered y-axis, that connects it all, or something like that

olefasting avatar Feb 16 '22 11:02 olefasting

Maybe Wave Function Collapse could be a nice technique for generating the maps?

Aha, looking at WFC again now with this use case in mind, its applications are much more clear to me.

What @olefasting suggests seems like a more simplistic and less math-y (I.e. better for an initial implementation) way to do roughly the same thing, right?

Anyhow, might indeed be worth exploring down the line. There are some some good Rust libraries for it as well. Maybe some of the maintainers could chime in here:

https://github.com/gridbugs/wfc @gridbugs https://github.com/AustinHellerRepo/WaveFunctionCollapse @AustinHellerRepo https://github.com/frederickjjoubert/bevy_ecs_tilemap_autotile_example (explored WFC in Unity) https://github.com/madwareru/simple-tiled-wfc @madwareru https://github.com/madwareru/ply-generator https://github.com/Descrout/lemutate @Descrout

(bottom two are actual level generators).

erlend-sh avatar Feb 16 '22 11:02 erlend-sh