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 :)
Yeah it was weird to hear you say that as this function was made for a game, its not wave function collapse from quantum physics after all. Thus you cant learn about this without learning about the demos it was used in. Soooo yeah
@@TinkerWorX that’s just WFC. They chose a few points and solved it from there, all one input pattern I’m creating one block with pattern A, another block with pattern B, and stitching with a special stitching pattern C. That sample there only uses one
It's so strange i've seen so many people go "wow WFC Is so cool look you can use it to make maps" since it's not a new thing at all. Like, do indie game devs have sort of ethics code that forbids them from looking up other peoples' work?
@@TourFaint no i dont think so its more like with more devs more devs without a cs degree exist so they have to learn everything themselves which is a lot
The music sounds amazing my guy! Im an aspiring composer myself whos only written music for solo piano and some string instruments thus far. I have no experience writing videogame music but I would love to get into it and im totally inspired by the music you provided for this video, what advice would offer you to someone looking to learn and get started?
Hey@joyfulfishman5445 of course! i can't really give advice on say, networking and getting a project without knowing how you personally prefer to work, online, in person, location etc... regardless one thing i always would advice is, people first. That no matter who you work with, be sure to enjoy working with them, chances are if you do, you will be much more motivated, invest more of your energy into it and end up with a better work for it! Hope this helps 😁
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
This. Was intrigued by the whole "stitched" version he was talking about and thought he was going to talk about some improvement to generating part-by-part stitching on new parts.
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.
"Stitched Wave Function Collapse" sounds like something a scientist would assure you is safe 20 minutes before you're fending off headcrabs with a crowbar
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.
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
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.
Yep. I use wfc in my game to make not only dungeons but also buildings. The input image for buildings should be less tunnels and more of a boxy contained shape. I want it to be very user moddable and its like Dwarf fortress where you can edit the raws (mine are JSON since thats easy). I have a json file for structure generation with paths to the files. It isnt fully fleshed out yet but it will work like this: JSON file contains data for different structures and how they generate A secondary JSON file contains the path for the WFC input image and what the different colors represent. when generating structures it loads this image into the WFC, takes the output, then uses the colors data to fully process it For example, i have a catacombs template where it is mostly straight tunnels. The base color is black, with tunnels being white. Along the sides of parts of the tunnels are purple squares, which signify tombs. Then I have a few small rooms with a central tomb - these are more wealthy tomb owners. Some have a orange tile coming off which is a door and it separates a blue tile room which is treasure. There are also some red rooms that separate the treasure which are trapped rooms.
I always have great respect for artists that nail the theme and feel of what the games intent is. The pixel art and that music, so magical it brings nostalgia to me that I can't pinpoint where or why exactly. 10/10
There is a guy named Martin Donald on youtube that made a video about wave function collapse already for world generation, so while this is not the first video on this topic, it is good to see what other people can come up with and explain.
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!
Glad you reached out to Boris, his Tessera asset makes it really easy to implement WFC for those of us that either don't have the coding skills or just don't want to bother implementing everything themselves.
This is really cool, great job! One thing to point out is that WFC is not deterministic in the same way that a noise generation algorithm is, so be careful if you are planning pseudo-infinite worlds (something akin to minecraft). For example, if you wanted to teleport to a location 10,000 units away a noise generation algorithm can start calculating the terrain instantly at that location, and it would be the same each time you recalculated it based on the seed. For the WFC algorithm you would need to start generating from the origin until you eventually filled in the section you are trying to teleport to, which may take an extremely long time or your computer would run out of memory. Because of this I would recommend keeping your worlds to a reasonable size, and perhaps if you want bigger maps make a break between each of these large sections so that they aren't continuous. Anyway this is my first time seeing your project and it looks great! Good luck, I'll sub to watch your progress and root for you.
I know absolutely NOTHING about coding, but I'm pretty sure an app that spews out a "random" hexmap (using the mentioned wave function collapse) for old-school roleplaying would be incredibly cool!
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.
Determinism is easy in a linear algorithm, but much harder in a parallel ones, as you have to ensure the scheduling of each task is also deterministic, which is usually handled by the OS optimized for performance so that is likely going to make it slower again
@@powertomatomake a seed that is shared, have the seed generate a seed for 8 parallel threads. And each thread itself can easily be deterministic. So for wave function collapse it is that easy if you generate the full map or use a seed like seed + xTilePos + yTilePos this should make a deterministic seed per tile no matter what parallel task works on it.
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.
You can apply Waveform Collapse at multiple scales. So you could simply look at letting your stitcher work on a smaller scale than your regular biome placement algorithm: maybe 2X2 or even 1X1. That would break up a lot of the "blockiness". You can also look at the more complicated version of waveform collapse that looks at 3X3 or larger patches and actually overlaps it's collapses to constrain the macro pattern more. Finally, you can tweak the probabilities of certain tiles on the border of other biomes by hand to make hard transitions less likely.
I didn't know it until I just watched your video, but I used this wave function collapse algorithm at work to optimize a test framework for the operating system I used to work on. The system ran 10s of thousands of tests, scheduling the OS to be tested on different hardware for different features. We originally used a matrix to test almost every combination, but this began to take too long. Instead I proposed a system wherein we had constraints on how many of what kinds of tests needed to be run on different hardware, and then the system would schedule tests randomly based on the constraints that were still remaining, picking the tests with the fewest options first. Nice video!
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 =))
Seems like a lot of dev's are getting interested in WFC as a way to generate worlds. I saw a video 11 months ago called ' Why I'm Using Wave Function Collapse for Procedural Terrain ' and I got such deja vu. 🤣 Always awesome to see more people pick up this method.
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
A key benefit of procedural over manual, especially for solo devs or small teams, is the time to having *something* to iterate on is much faster, and is the time per iteration, even if the starting standard is lower. Obviously you can only achieve that by giving up artistic control, but that's why you iterate to reintroduce it
Grab a list of XY positions and tie the hotbar to the enemies so that it just jankily floats up and down the entire screen all the time lol, snapping to the next enemy as it dies.
Now imagine giving a bunch of sound bites to a WFC method to generate music. You could associate ground tiles to sounds / ambience and have the music match the terrain dynamically as a player moves through different biomes! The sample of music you played was great.
The goblins should live on a dungeon-like goblin fortress imo. It wouldn't be their only place but having it like this would help you separate them from the human invaders that would settle in the current style
I love optimisation videos so much. Like it's so funny to hear someone say, "it took 5 minutes to generate this large map, so I optimised it and now it takes 4 seconds!" It's like the Matt Parker video where someone made his algorithm something like 70000% faster or something insane.
I just started this video but my immediate reaction was to do it with machine learning because I'm a data scientist, but then you kinda described a manual and simple model type thing that really functioned more like a single chemical chain reaction. Then as you explained more my brain got excited cause I was recognizing the bones of basic machine learning, before you said it found the rules on its own and is basically machine learning. But then you mentioned it only takes an input size of one and my little coder heart broke because of the horror that is such a small database of probably only like a couple thousand pixels 😭. It was a great rollercoaster of emotions for only a few minutes in, but imma go watch the rest now 😅
I immediately thought similar. Specifically, feeding it a map of our world so that it learns the rules on what goes where and extrapolates those out onto a generated map.
My man. Calling you are going to talk about the sponsor and then marking that as a topic in the video so we could skip it? You just got a new subscriber. Thumbs up! Gonna watch the ad twice now after watching the whole video!
The game is really cool but it could be cooler if it had seasons like winter and stuff, might be a little laggy but i dont know. Im excited to see if this idea gets added or not!
For the odd patches of the wrong biome, maybe you could add a cleanup pass that removes any clumps of tiles smaller than a certain size and replaces them with an adjacent biome's tiles.
Its very nice to see more devs use WFC and it generally coming into light. The possibilities are huge & there are quite some interesting angles/approaches that can be taken with this which eventually would lead to original types of world generation & games!
WFC algo concept is very easy to understand, what becomes less easy to implement is backtracking when the algo gets stuck, and additional rules like guaranteeing paths between points etc. Tessera is a pretty good asset for that.
The music actually sounds pretty good. It was a little loud to me in the video but it honesty made me think of Zelda. Like with all games that look fun to me. If it ever comes to Switch I’ll get it. Don’t have a computer currently lol.
First of all, I love what you're doing with the game. I will also say, at the beginning of your video, you said this was a new way to use WFC, but i think a lot of game creators have used WFC like this. It kind of make you look like you arent aware of what other creators are doing in your space. Perhaps your vewers arent watching other videos on this topic so it probably doesnt matter that much. Also i think it would be cool if you shared some of the resources that you used for things like WFC, some source citing.
I did some digging and didn’t find anyone creating patches like this (using different patterns) and stitching them together with stitcher patterns. I’m willing to be wrong here though! A lot of people seem to think I meant WFC itself is new, I should have been more clear. I’m well aware it’s been around for a while I mostly used Boris’s stuff, maybe I should have stated that, I figured mention of going to him for help would be good enough. Next time!
@@WattDesigns I suspect there are quite a few people doing this in isolation like me. I admittedly skimmed the video but I'm curious as to if you only included the tile rules required for the biomes you were generating, as will drastically speed things up. another optimization is to resolve categories of tiles first, then resolve the varieties afterwards, the lower number of possible tiles you have in each WFC iteration the better obviously.
Been interested in wave function collapse and been toying with it myself. When you started talking about your school commute and parking, I agreed because I had the same situation. It wasn't until you showed the picture of the walk up the hill that I knew exactly what school you went to because I went there as well. I walked up that hill too but the one to the engineering building was worse.
That was the best sponsor spot I have ever seen. "Don't need to leave your precious cave." 🤣 If programming doesn't work out for you, you should definitely consider advertising!
This is really good keep up the work, Cant wait to play the game, Its like 3d terrarria but youre the goblin and the terrarrian is invading, Like the style!
just found your channel, dev logs are so much fun ^^ its interesting to understand how much work a game actually needs. also maybe the music could be a bit slower...
Really great progress! I remember watching a similar video on a guy using wave function collapse to generate maps for his game as well (ua-cam.com/video/TO0Tx3w5abQ/v-deo.html) I always hear about people using perlin noise, so it's nice to see people using other techniques like these :)
This is what I needed. Thank you so much! I will use this to design how procedurally generated homes and populations for cities will be by describing the rules for what a NPC needs to "live" an in game life. What kind of home they would have, and how having a family effects the rooms a home needs or can have, and what items rooms should contain, and how item quality is effected by different social classes. This, mixed with NPCs who can talk to you with AI and have dynamic knowledge about in-game topics they "hear" as news should make for an interesting background, and be a relatively easy way to populate a larger space procedurally, so I can spend my human efforts working on polishing rather than hand crafting everything. Unreal 5.2 looks like it will be super helpful here too!
I am willing to guess that you will want to add some sort of tradesman eventually. I think it would be really cool if he were a kobold. Also, making a port/dock on the beach be something that he needs as a prerequisite to come visit, and the more prosperous your isle is, the more and better resources he will bring to trade. Just an idea. (Also, making the port/dock could make a fishing-inclined villager eventually start work on their own little dinghy so they can go a bit off shore to fish and get better products to sell and a higher quality of life.)
I been watching you for a long time now and never really commented. I know game design is niche but I would have thought you'd have more subs. Then I check to see you've only been doing this for a year. It feels like I've been watching you for 2 at least. Congrats on nearing a million views in any case :D Video was also helpful as well, thanks .
I have an idea to possibly improve the quality of the wave function collapse generation but idk if anyone else has thought of it yet… I’m gonna call it Layered Wave Function Collapse for now, since I don’t know if it already has a name… Basically you run WFC in multiple layers. For starters you have your base layer WFC, where it picks the actual tiles to place and directly effects the world. But before you run that you go up a layer, have a grid of biomes and perform WFC on that, then the base layer WFC will fill in the tiles using those biomes to determine the tile set. So as an example say you have 3 main biomes: mountain, forest, and ocean. You would also need 3 additional biomes for the borders, beach, mountainside, and cliffs. It’s fairly straightforward to do standard WFC to place biomes to fill a map area. But each biome has an associate tile set and rule set. And for each cell in the grid you perform wave function collapse, possibly even in parallel with each thread only running WFC on a single biome. You get smoother borders because you define entire areas as a border that performs WFC to get from one biome to the next. I just had this idea at like 5am and I’m currently working on a different project so I won’t be able to try implementing this for a while, and don’t know if it would even work or give better outputs. That’s all a hypothesis that I can’t test right now…
8:50 - I think this might actually be the most interesting gamedev insight you've shared, surprisingly. Even if it's just a tidbit, knowing the sort of phrasing that goes into commissioning BGM is pretty demystifying. That's not really something I've ever come across.
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.
Sending them good vibrations... Wave function collapse looks interesting. Current game I'm working on is pretty linear but sure will come in handy on a future project! Overall looks like the project is coming along nicely, good job :)
As a huge dwarf fortress fan, five whole minutes for world gen is pretty tame. If the world generated is interesting enough, players will gladly wait around watching the simulation unfold for hours before realizing it's not quite right and restarting the entire process.
'Realising it's not quite right, and restarting the entire process'. Ah... I'm guilty of that for just about any game that has any form of random map. It's weirdly enjoyable to 'explore' and witness an entire new world, a new canvas becoming a new composition you've not seen before, only to go 'I wonder what the next one would look like' even if what you already have is basically 90% what you wanted.
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 :)
great video, sadly you aren't first person to do that either. you are prob best at explaining it though!
Yeah it was weird to hear you say that as this function was made for a game, its not wave function collapse from quantum physics after all. Thus you cant learn about this without learning about the demos it was used in. Soooo yeah
@@TinkerWorX that’s just WFC. They chose a few points and solved it from there, all one input pattern
I’m creating one block with pattern A, another block with pattern B, and stitching with a special stitching pattern C. That sample there only uses one
@@WattDesigns This exists in the Blender game engine as well. If you ever want to step into 3d procedural generation.
@@lizelive Im just now noticing this response - do you have some links to where it’s been used this way so I can add it to the description?
Watching indie devs discover wave function collapse for world generation is always interesting to me for some reason lol. Its becoming so popular.
It's so strange i've seen so many people go "wow WFC Is so cool look you can use it to make maps" since it's not a new thing at all. Like, do indie game devs have sort of ethics code that forbids them from looking up other peoples' work?
@@adamluhring2482I know youtube doesn't like links but do you have the name of the website or something so I can find the page?
@@TourFaint no i dont think so its more like with more devs more devs without a cs degree exist so they have to learn everything themselves which is a lot
@@TourFaint nah, majority of indie devs are just bedroom coders without strong pro background hence you can't expect too much from them.
@@VincentPride1986Why do you think they're indie devs? Use your brain
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! 😊
The music sounds amazing my guy! Im an aspiring composer myself whos only written music for solo piano and some string instruments thus far. I have no experience writing videogame music but I would love to get into it and im totally inspired by the music you provided for this video, what advice would offer you to someone looking to learn and get started?
The music is spot on! excellent work
Hey@joyfulfishman5445 of course!
i can't really give advice on say, networking and getting a project without knowing how you personally prefer to work, online, in person, location etc... regardless one thing i always would advice is, people first. That no matter who you work with, be sure to enjoy working with them, chances are if you do, you will be much more motivated, invest more of your energy into it and end up with a better work for it!
Hope this helps 😁
The music is brilliant really loved it, fits so well! great work!
Amazing music (: it matches the game just perfect!
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
This. Was intrigued by the whole "stitched" version he was talking about and thought he was going to talk about some improvement to generating part-by-part stitching on new parts.
As long as you do not care about the result being repeatable, that is.
This does break repeatability, meaning the same seed will generate different results
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.
thank you very much for this insight.
the world generation stuff is cool but that demo from Ricardo is OUTSTANDING and he nailed every bit of input you gave him
Seeing a sponsor segment for my local university was a surprise.
The game is looking awesome. I love the music too...the composer nailed it.
Im in love with the music, definitely gives off that terraria/stv vibe and in my opinion fits pretty nice with the game
"Stitched Wave Function Collapse" sounds like something a scientist would assure you is safe 20 minutes before you're fending off headcrabs with a crowbar
just making your pants vibrate, nothing to look at here.
thx for the clear explanation in the theme, it was very easy to understand.
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.
For that specific list of music requirements, I'd say the composer nailed it
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
yes potat hat
potato hat
throw in a terraria easter egg in there with them hats?
I must second my erudite friend here. yes potat hat
potarto hat
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.
Yep. I use wfc in my game to make not only dungeons but also buildings. The input image for buildings should be less tunnels and more of a boxy contained shape.
I want it to be very user moddable and its like Dwarf fortress where you can edit the raws (mine are JSON since thats easy). I have a json file for structure generation with paths to the files. It isnt fully fleshed out yet but it will work like this:
JSON file contains data for different structures and how they generate
A secondary JSON file contains the path for the WFC input image and what the different colors represent.
when generating structures it loads this image into the WFC, takes the output, then uses the colors data to fully process it
For example, i have a catacombs template where it is mostly straight tunnels. The base color is black, with tunnels being white. Along the sides of parts of the tunnels are purple squares, which signify tombs. Then I have a few small rooms with a central tomb - these are more wealthy tomb owners. Some have a orange tile coming off which is a door and it separates a blue tile room which is treasure. There are also some red rooms that separate the treasure which are trapped rooms.
I was really digging the music, it sounded great
9:24 I am really a fan of this music, I totally see myself vibing to the music while building a little home for myself lol
I always have great respect for artists that nail the theme and feel of what the games intent is.
The pixel art and that music, so magical it brings nostalgia to me that I can't pinpoint where or why exactly.
10/10
There is a guy named Martin Donald on youtube that made a video about wave function collapse already for world generation, so while this is not the first video on this topic, it is good to see what other people can come up with and explain.
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!
Glad you reached out to Boris, his Tessera asset makes it really easy to implement WFC for those of us that either don't have the coding skills or just don't want to bother implementing everything themselves.
This is really cool, great job! One thing to point out is that WFC is not deterministic in the same way that a noise generation algorithm is, so be careful if you are planning pseudo-infinite worlds (something akin to minecraft). For example, if you wanted to teleport to a location 10,000 units away a noise generation algorithm can start calculating the terrain instantly at that location, and it would be the same each time you recalculated it based on the seed. For the WFC algorithm you would need to start generating from the origin until you eventually filled in the section you are trying to teleport to, which may take an extremely long time or your computer would run out of memory. Because of this I would recommend keeping your worlds to a reasonable size, and perhaps if you want bigger maps make a break between each of these large sections so that they aren't continuous.
Anyway this is my first time seeing your project and it looks great! Good luck, I'll sub to watch your progress and root for you.
YT Algorithm brought me here, love the enthusiasm and open-mindedness you show towards the project. Hope all the best.
That music is 🤌
I absolutely adore the fact that the music sample's rythm matches the taps of the little goblin's feet haha. So good.
I know absolutely NOTHING about coding, but I'm pretty sure an app that spews out a "random" hexmap (using the mentioned wave function collapse) for old-school roleplaying would be incredibly cool!
Glad more people are learning about wave function collapse. It's honestly the nicest way to solve a constraint system problem.
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.
Determinism is easy in a linear algorithm, but much harder in a parallel ones, as you have to ensure the scheduling of each task is also deterministic, which is usually handled by the OS optimized for performance so that is likely going to make it slower again
@@powertomato Goddamn, you're letting your COMPSCI degree show. Very true, though.
@@powertomatomake a seed that is shared, have the seed generate a seed for 8 parallel threads. And each thread itself can easily be deterministic. So for wave function collapse it is that easy if you generate the full map or use a seed like seed + xTilePos + yTilePos this should make a deterministic seed per tile no matter what parallel task works on it.
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.
You can apply Waveform Collapse at multiple scales. So you could simply look at letting your stitcher work on a smaller scale than your regular biome placement algorithm: maybe 2X2 or even 1X1. That would break up a lot of the "blockiness". You can also look at the more complicated version of waveform collapse that looks at 3X3 or larger patches and actually overlaps it's collapses to constrain the macro pattern more. Finally, you can tweak the probabilities of certain tiles on the border of other biomes by hand to make hard transitions less likely.
I didn't know it until I just watched your video, but I used this wave function collapse algorithm at work to optimize a test framework for the operating system I used to work on. The system ran 10s of thousands of tests, scheduling the OS to be tested on different hardware for different features. We originally used a matrix to test almost every combination, but this began to take too long. Instead I proposed a system wherein we had constraints on how many of what kinds of tests needed to be run on different hardware, and then the system would schedule tests randomly based on the constraints that were still remaining, picking the tests with the fewest options first.
Nice video!
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 =))
Seems like a lot of dev's are getting interested in WFC as a way to generate worlds. I saw a video 11 months ago called ' Why I'm Using Wave Function Collapse for Procedural Terrain ' and I got such deja vu. 🤣 Always awesome to see more people pick up this method.
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
the music from ricardo is amazing and it perfectly fits the vibe of the game
(or in my terms, the music is absolutely banging)
As a rule of thumb, procedural generation is never easy, and there's always a tradeoff between performance, and intensive tweaking.
A key benefit of procedural over manual, especially for solo devs or small teams, is the time to having *something* to iterate on is much faster, and is the time per iteration, even if the starting standard is lower. Obviously you can only achieve that by giving up artistic control, but that's why you iterate to reintroduce it
You have a natural gift for explaining complex concepts! Thanks for sharing it with us.
You should make the hot bar moveable from the bottom to the top
agreed! Just played a game that doesn't have this feature and this is sooo annoying when enemys are behind it, and just won't move >.>
Interesting, I’ll add it to the list!
I’ve never have had such I liked comment
Grab a list of XY positions and tie the hotbar to the enemies so that it just jankily floats up and down the entire screen all the time lol, snapping to the next enemy as it dies.
Now imagine giving a bunch of sound bites to a WFC method to generate music. You could associate ground tiles to sounds / ambience and have the music match the terrain dynamically as a player moves through different biomes!
The sample of music you played was great.
The goblins should live on a dungeon-like goblin fortress imo. It wouldn't be their only place but having it like this would help you separate them from the human invaders that would settle in the current style
I love optimisation videos so much. Like it's so funny to hear someone say, "it took 5 minutes to generate this large map, so I optimised it and now it takes 4 seconds!"
It's like the Matt Parker video where someone made his algorithm something like 70000% faster or something insane.
I just started this video but my immediate reaction was to do it with machine learning because I'm a data scientist, but then you kinda described a manual and simple model type thing that really functioned more like a single chemical chain reaction. Then as you explained more my brain got excited cause I was recognizing the bones of basic machine learning, before you said it found the rules on its own and is basically machine learning. But then you mentioned it only takes an input size of one and my little coder heart broke because of the horror that is such a small database of probably only like a couple thousand pixels 😭. It was a great rollercoaster of emotions for only a few minutes in, but imma go watch the rest now 😅
I immediately thought similar. Specifically, feeding it a map of our world so that it learns the rules on what goes where and extrapolates those out onto a generated map.
My man. Calling you are going to talk about the sponsor and then marking that as a topic in the video so we could skip it? You just got a new subscriber. Thumbs up! Gonna watch the ad twice now after watching the whole video!
The game is really cool but it could be cooler if it had seasons like winter and stuff, might be a little laggy but i dont know. Im excited to see if this idea gets added or not!
That forest music track is truely incredibly-well done! I'd be very proud to have that is my game! 😅
For the odd patches of the wrong biome, maybe you could add a cleanup pass that removes any clumps of tiles smaller than a certain size and replaces them with an adjacent biome's tiles.
Its very nice to see more devs use WFC and it generally coming into light. The possibilities are huge & there are quite some interesting angles/approaches that can be taken with this which eventually would lead to original types of world generation & games!
WFC algo concept is very easy to understand, what becomes less easy to implement is backtracking when the algo gets stuck, and additional rules like guaranteeing paths between points etc. Tessera is a pretty good asset for that.
Nvm, I see you mentioned Boris the brave, so you def know about Tessera ^^.
This was honestly one of the most interesting dev blogs that I’ve watched so far!
The music actually sounds pretty good. It was a little loud to me in the video but it honesty made me think of Zelda. Like with all games that look fun to me. If it ever comes to Switch I’ll get it. Don’t have a computer currently lol.
Very cool generation tool. Also, great choice of music composer! It sounded great. :)
First of all, I love what you're doing with the game. I will also say, at the beginning of your video, you said this was a new way to use WFC, but i think a lot of game creators have used WFC like this. It kind of make you look like you arent aware of what other creators are doing in your space. Perhaps your vewers arent watching other videos on this topic so it probably doesnt matter that much.
Also i think it would be cool if you shared some of the resources that you used for things like WFC, some source citing.
This was 100% my thought also. I only know about the WFC algorithm because of people using it for world generation.
I did some digging and didn’t find anyone creating patches like this (using different patterns) and stitching them together with stitcher patterns. I’m willing to be wrong here though! A lot of people seem to think I meant WFC itself is new, I should have been more clear. I’m well aware it’s been around for a while
I mostly used Boris’s stuff, maybe I should have stated that, I figured mention of going to him for help would be good enough. Next time!
@@WattDesigns I suspect there are quite a few people doing this in isolation like me. I admittedly skimmed the video but I'm curious as to if you only included the tile rules required for the biomes you were generating, as will drastically speed things up.
another optimization is to resolve categories of tiles first, then resolve the varieties afterwards, the lower number of possible tiles you have in each WFC iteration the better obviously.
Been interested in wave function collapse and been toying with it myself. When you started talking about your school commute and parking, I agreed because I had the same situation. It wasn't until you showed the picture of the walk up the hill that I knew exactly what school you went to because I went there as well. I walked up that hill too but the one to the engineering building was worse.
This game is gonna be so cool once it releases! I will definitely be getting it once its out!
Gorgeous music composition!
My girlfriend was bobby around in a very cute way to the music, so 10/10
A good level/map feels meaningful at every corner
Interesting stuff! The dungeon gen is going to need some wider hallways though. I was getting claustrophobia just looking at them.
That was the best sponsor spot I have ever seen. "Don't need to leave your precious cave." 🤣 If programming doesn't work out for you, you should definitely consider advertising!
This is really good keep up the work, Cant wait to play the game, Its like 3d terrarria but youre the goblin and the terrarrian is invading, Like the style!
this is developping my interest towards game design and i love it
I think it would be better if you had multiple samples for each biome because that would add more variety and make it feel more random.
Everything's looking so great! Thanks for the detailed info on the procedural algorithm's. I Found it super helpful :)
I love seeing WFC in more games. So much better than noise in most scenarios.
I swear I've seen multiple videos about this and the sudoku example really clicked for me, thanks!
just found your channel, dev logs are so much fun ^^ its interesting to understand how much work a game actually needs.
also maybe the music could be a bit slower...
Love the music sample! Ricardo did a great job with the prompts
I did not expect to see a quantum physics concept pop up in game design. Boundary conditions are amazing!
Really great progress! I remember watching a similar video on a guy using wave function collapse to generate maps for his game as well (ua-cam.com/video/TO0Tx3w5abQ/v-deo.html) I always hear about people using perlin noise, so it's nice to see people using other techniques like these :)
This is what I needed. Thank you so much! I will use this to design how procedurally generated homes and populations for cities will be by describing the rules for what a NPC needs to "live" an in game life. What kind of home they would have, and how having a family effects the rooms a home needs or can have, and what items rooms should contain, and how item quality is effected by different social classes. This, mixed with NPCs who can talk to you with AI and have dynamic knowledge about in-game topics they "hear" as news should make for an interesting background, and be a relatively easy way to populate a larger space procedurally, so I can spend my human efforts working on polishing rather than hand crafting everything. Unreal 5.2 looks like it will be super helpful here too!
I am willing to guess that you will want to add some sort of tradesman eventually. I think it would be really cool if he were a kobold. Also, making a port/dock on the beach be something that he needs as a prerequisite to come visit, and the more prosperous your isle is, the more and better resources he will bring to trade. Just an idea. (Also, making the port/dock could make a fishing-inclined villager eventually start work on their own little dinghy so they can go a bit off shore to fish and get better products to sell and a higher quality of life.)
That forest theme is fantastic it’s tickles my brain right
That music immediately brought me back a transcendant memory of playing RuneScape
Thanks for sharing your methods of developing your landscape! The shared snippet of music was excellent and felt spot on.
BRO THE MUSIC BOPS PERFECT FOR THE GAME'S THEME!!!!
oh oh, I do love the music. it creates the perfect ambiance. congrats, as it is a pretty important part of a game, sometimes neglected.
I been watching you for a long time now and never really commented.
I know game design is niche but I would have thought you'd have more subs.
Then I check to see you've only been doing this for a year. It feels like I've been watching you for 2 at least.
Congrats on nearing a million views in any case :D
Video was also helpful as well, thanks .
I have an idea to possibly improve the quality of the wave function collapse generation but idk if anyone else has thought of it yet…
I’m gonna call it Layered Wave Function Collapse for now, since I don’t know if it already has a name…
Basically you run WFC in multiple layers. For starters you have your base layer WFC, where it picks the actual tiles to place and directly effects the world. But before you run that you go up a layer, have a grid of biomes and perform WFC on that, then the base layer WFC will fill in the tiles using those biomes to determine the tile set. So as an example say you have 3 main biomes: mountain, forest, and ocean. You would also need 3 additional biomes for the borders, beach, mountainside, and cliffs. It’s fairly straightforward to do standard WFC to place biomes to fill a map area. But each biome has an associate tile set and rule set. And for each cell in the grid you perform wave function collapse, possibly even in parallel with each thread only running WFC on a single biome. You get smoother borders because you define entire areas as a border that performs WFC to get from one biome to the next.
I just had this idea at like 5am and I’m currently working on a different project so I won’t be able to try implementing this for a while, and don’t know if it would even work or give better outputs. That’s all a hypothesis that I can’t test right now…
Cool way of using WFC and I really like the results. But dang I really loved the forest music. Cemented the soul into the game.
OMG THAT SOUNDTRACK IS PERFECT AND JUST SUPER EPIC-NICE!
Thanks for the video, I am building a top-down game and your game's style inspires me!
Wow, I just watched your newer aseprite video, your sound design has improved in just 2 weeks!
Very interesting subject to talk about to!
that music is AWESOME!! Feels almost nostalgic.
The goblin theme is so beautiful, I love it
That song at 9:07 sounds like a song that would be in Terraria! Very cool.
Wow the world generation is looking great and I can imagine just how varied a world your game could have now! Good luck with those future tasks.
I really want the greatest luck for this game, is really interesting how you are making all of this.
8:50 - I think this might actually be the most interesting gamedev insight you've shared, surprisingly. Even if it's just a tidbit, knowing the sort of phrasing that goes into commissioning BGM is pretty demystifying. That's not really something I've ever come across.
There is another game dev who I saw using this strategy a bit ago. Super clever on anyone's behalf who does it!
I’ve never seen wave function explained so simply, great video!
I can´t express how good the music sounds. It´s epic.
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.
Good job! I think the world generation is much better now. Also the soundtrack is amazing.
This was extremely satisfying to watch. Finding more efficient ways is a talent, very nice
That music was pretty rad. It might be interesting to use wave function collapse on sound, too.
That music hit the brief exactly. Wow. Proper
Sending them good vibrations...
Wave function collapse looks interesting. Current game I'm working on is pretty linear but sure will come in handy on a future project!
Overall looks like the project is coming along nicely, good job :)
9:43 I really like the little wooden sounding taps in this song
Nice progression with the landscaping, love the music!
As a huge dwarf fortress fan, five whole minutes for world gen is pretty tame. If the world generated is interesting enough, players will gladly wait around watching the simulation unfold for hours before realizing it's not quite right and restarting the entire process.
Going to be honest, I do this for games like Minecraft and Terraria. I'll sit there for as long as it takes to generate a map I'm happy with.
'Realising it's not quite right, and restarting the entire process'. Ah... I'm guilty of that for just about any game that has any form of random map. It's weirdly enjoyable to 'explore' and witness an entire new world, a new canvas becoming a new composition you've not seen before, only to go 'I wonder what the next one would look like' even if what you already have is basically 90% what you wanted.