A new way to generate worlds (stitched WFC)

490,643
0
Published 2023-03-21
If anyone out there is interested in going to school for gamedev check out my sponsor SNHU:
snhu.edu/wattdesigns

This is my first time messing with Wave Function Collapse and I think I've got some tweaks to make, but it looks pretty good so far. Make sure to stay until the end for the music sample!

Speaking of which, here's all of Ricardo's stuff:
linktr.ee/rmdcompositions

I also want to link some useful WFC stuff. Here’s where the cool animation came from, lots of great open source resources: github.com/mxgmn/WaveFunctionCollapse/blob/master/…

0:00 - Intro
0:28 - What's Wave Function Collapse?
2:23 - Implementing WFC
3:19 - Sponsor
4:06 - Making it faster
6:05 - Blending biomes
7:15 - Generating Dungeons
8:19 - Future Plans
8:31 - Music Sample
10:05 - Outro

-SOCIALS:
Steam: store.steampowered.com/app/1688640/Cleanup_on_Isle…
Patreon: www.patreon.com/WattDesigns?fan_landing=true
Discord: discord.gg/TM8n7ENJPa
Instagram: www.instagram.com/watt.designs/
Twitter: twitter.com/WattDesigns
Isle Goblin Website: islegoblin.com/
Personal Website: www.kilowattgames.com/

All Comments (21)
  • @WattDesigns
    Hey everyone! Just wanted to clarify after getting some comments, MANY have used wave function collapse, I do not claim to be the first. I do think my application here (creating chunks with different patterns, then using a third pattern to stitch them together) to allow multiple different input types is new. Feel free to correct me if I’m wrong though! Sorry for the confusion :)
  • @krazymeanie
    Watching indie devs discover wave function collapse for world generation is always interesting to me for some reason lol. Its becoming so popular.
  • @TomNCatz
    part of the value of waveform collapse is that you do NOT need to generate the entire final island one go. So long as you have fed it inputs that are not prone to collisions you can just pick a starting point and run until you have a large enough plot for starting out. then you can continue to run the waveform collapse in the background as long as needed
  • It was super fun to work on it! Im glad that the music works well and great work with all of the updates! Can wait for more! 😊
  • @empresslithia
    Another algorithm that's essentially the mother of WFC, (or, to put it another way, WFC is a specific case of it), is graph rewriting. If you represent your world as abstract nodes within a graph, suddenly you gain immense power in generating your world, and can do anything from generate levels with complex rules, to procedural loot generation, to managing your quests and dialogue. Graph rewriting works by representing everything as either a node or a path, then creating rules for how those nodes get joined together by paths. A great example of this is the game Unexplored, which used graph rewriting to generate all of its everything, but its levels in particular are very well done, as they're complete with traps and puzzles in a way that makes intuitive sense. Graph rewriting is the mother of all procedural generation, and it's only the difficulty in using it (you have to be very creative in designing your systems) that stops every game ever from using it for everything ever. EVEEEEEEER. TL;DR: Graph Rewriting is really cool, and supercedes all other procedural algorithms in both capability and difficulty of use, but is well worth the effort if you're smart enough.
  • the world generation stuff is cool but that demo from Ricardo is OUTSTANDING and he nailed every bit of input you gave him
  • @thebe_stone
    this game looks really good, and the new biome generation is something i've never seen before. the character design is super cute, but i think it would look better with hats that you can choose. one of the hats could be a potato hat. edit: i noticed armor was next on your list, that sounds like the perfect time to add hats and maybe a potato hat
  • @J_Stronsky
    I know it'd be a lot more work, but if your concern is biome boundaries why don't you create 'transition biomes'. If you're making a rule that says only specific biomes can be next to one another, then you can create a special biome that looks like a smooth transition between the two and use that blender method you mentioned to stitch them together. So beach > water = shallows, beach > grass = dunes, grass > trees = scrub, etc, etc... Because you've limited the number of zones that will be in contact you don't need to worry about the huge number of variations that would arise otherwise and you can make the transition zones vary in width to make it more seamless.
  • @masha8770
    Great progress! I wouldn't throw the unintentional idea of wood dungeons quite out yet. On a smaller scale & with a different pattern I can see human forts as small outposts perhaps? Something that pops back up even after "clearing" an area for longevity? Also love the new music! I hope the full soundtrack will be a thing added to the steam store once you're doing the full release.
  • @chadzulu4328
    The game is looking awesome. I love the music too...the composer nailed it.
  • @maxoeller9613
    Im in love with the music, definitely gives off that terraria/stv vibe and in my opinion fits pretty nice with the game
  • @ash12181987
    I have been thinking of using wave function collapse in my RTS project, and I was going to use ECS as my whole project is built in that already. So thank you, for at least indicating I'm not entirely barking up the wrong tree. The game looks great, I'm going to go check out your other dev logs, and I look forward to following your progress.
  • @shrimp381
    Just been catching up on the Dev logs and was really surprised to find an upload minutes after I finished the other one! This is whole game and your Dev process is fantastic. Keep it up.
  • That was a great explanation and visualisation on how the wfc works =D! I have a good friend who absolutely loves proc gen and I learned about the wfc initially from him. It's a really cool rabbit hole to Fall down to! Seeing you figure out the System, optimization and such was fun and I'm looking forward to more =) (The music sounds great as well! Feels like it fits your project =))
  • @Bargeral
    in your last video you talked about multiplayer and the difficulty sharing the map. If you can make your random level gen consistent based off of a seed number than you can just share the seed. Maybe do a checksum on the generated level as a validation.
  • @VinciWare
    This was honestly one of the most interesting dev blogs that I’ve watched so far!
  • @argore9709
    honestly the best timing possible I'm super interested in procedural generation and the like, and was actually thinking of how WFC could be used to make terrain like this like a week ago amazing video, keep it up!
  • I love the tight corridors makes it feel like if you rush your gonna have a bad time But I also think you should make the loading screens just little gobby helping around town or building houses
  • @Gorbukoki
    Thanks for sharing your methods of developing your landscape! The shared snippet of music was excellent and felt spot on.