Maze generating algorithms
19:06
8 ай бұрын
Creating a 2D platformer in PyGame
2:09
Пікірлер
@gamalielgerona2391
@gamalielgerona2391 22 сағат бұрын
woah
@GameJam230
@GameJam230 12 күн бұрын
One really interesting algorithm I saw recently on KZfaq was used for a Minecraft randomly changing maze, but it wasn't generating a NEW maze from scratch, but instead had the ability to convert any EXISTING perfect maze into another one, only by needing to change the properties of two adjacent cells. It worked by representing the maze ad a tree structure with a root node, and having all other nodes have exactly one path to navigate back up the tree towards it. This means there are no loops, and no isolated areas. Starting with a maze of this format, you look at the root node and choose one of its adjacent cells (not diagonals). You go to that cell, and if the tree node representing it has any other nodes pointing TO it, you wall off that connection. Then, you make the OLD root node point to it, and now this node is the new root node. Every time you run this algorithm, one perfect maze becomes a new entirely valid perfect maze, and you get to choose how many times you run it. It could be as fast as O(1) if you choose to only run the algorithm a fixed number of times, but if the maze is significantly bigger than the number of times you run it, your maze might look extremely similar to previous versions, so I believe the creator recommended running it about 10 times for every cell in the maze if I recall? Maybe less than that, but ultimately it's up to the user.
@thedaedliest
@thedaedliest 13 сағат бұрын
This is very good info! What was the name of the video? Edit: I think i found it: kzfaq.info/get/bejne/sMiIfsZ1u7yYd2Q.html
@GameJam230
@GameJam230 13 сағат бұрын
@@thedaedliest Yes, that's the one!
@eduardopozos5022
@eduardopozos5022 15 күн бұрын
Do you know how to create custom libraries?
@papapspe5662
@papapspe5662 17 күн бұрын
Best
@buriedbones-nh9xr
@buriedbones-nh9xr 23 күн бұрын
Just because a game has a generated world that doesnt make your game more unique or interesting I mean how much does it make a difference if the tile is a grass texture tile or a tree I think indie game developers are still struggling with what makes a game interesting
@kcvinu
@kcvinu 24 күн бұрын
Nice video. It is really helpful. Is there any option to use Visual Studio to create a dll file with MASM64 ? I am using VS 2022.
@yelle8647
@yelle8647 24 күн бұрын
At 09:50, sorry, but I don't quite get why we add extra +1 to size_x, size_y. What we have seen before? At what minute I should have seen it.
@CodingQuest2023
@CodingQuest2023 24 күн бұрын
To know which terrain tile you need, you need to have 4 noise values for each of the tile corners. So if you want a world with NxN tiles you need N+1xN+1 noise values. I hope this helps 😊
@sunnynayak9444
@sunnynayak9444 Ай бұрын
THANKS A LOT I WILL USE IT IN MY CS PROJECT
@kevnar
@kevnar Ай бұрын
I once used wave function collapse for a procedural melody maker about 15 years ago. I didn't even know the algorithm existed. I just set up a system that decides what notes can come next, based on the current note. For example, if it's the 4th note in the scale, it has a higher probability to go to the 1, 5, or 8th note, and a lower probability to go to 2, 3, and 6. And so it just kept plinking along through the endless melodies. Great things happen when you're bored and curious.
@xCCflierx
@xCCflierx Ай бұрын
Just started watching and I'm already inspired. Putting a limit on how many times a tile can be used would mean only a certain percentage of the map will ever be that tule, and only if the condition to place that tile is correct. So if I want a small building I would only make 4 corner tiles, top tile, bottom tile, left tile, right tile, center tile. It only makes sense for them to connect to each other. And then I'm thinking the algorithm would look beyond just what's next to each square, otherwise i might start a building that cant be finished
@teamredstudio7012
@teamredstudio7012 Ай бұрын
Fascinating! Ik ga dit zeker eens proberen gebruiken. Een ander interessant algoritme is met Perlin noise, maar dit lijkt simpeler.
@squareski
@squareski Ай бұрын
I quite like the hunt and kill algorithm, but it doesn't seem to generate any crossroads. I noticed this with the depth first algorithm too. Both 'carve' corridors so wonder if this method means it never generates a crossroads (that is a cell with 0 walls).
@indieBen
@indieBen 2 ай бұрын
Somehow, looks like an improved version of the Minesweeper game :)
@TheRawi
@TheRawi 2 ай бұрын
No idea why MSVC doesn't support inline asm64 :/
@connorjosh2088
@connorjosh2088 2 ай бұрын
5:48 wouldn't this be 3d not 2d? X, Y and brightnes?? GREAT video btw thank you 🙏
@timonix2
@timonix2 2 ай бұрын
You did not go through any back tracking. If it cannot find a solution it needs to undo some amount of assumptions
@iloveblender8999
@iloveblender8999 3 ай бұрын
I really like this video and will use the algorithm in godot.
@iloveblender8999
@iloveblender8999 3 ай бұрын
So if you have n tiles and m possible values, that would be m^n possible combinations, but we want to find one that satisfies the rules. I have heard of that. CSP?
@bloggy6465
@bloggy6465 3 ай бұрын
can this be used for biomes cus it doesnt seem like it would?
@matt8ress
@matt8ress 3 ай бұрын
yall make this sound too simple, took me 4 months to make my own implementation. nonetheless, all videos i watched were great, but this one stands out to me because its about wfc and wfc only. 👍
@andewprod
@andewprod 3 ай бұрын
Thanks so much for this video! Greetings from germany :D
@tsogbayarsambuu9826
@tsogbayarsambuu9826 4 ай бұрын
Thank you very much
@Masemiliano_
@Masemiliano_ 4 ай бұрын
Continue with these great explanation videos!
@frontbro9571
@frontbro9571 4 ай бұрын
Is there any way I could contact you directly ?
@CodingQuest2023
@CodingQuest2023 4 ай бұрын
@saminegamme
@saminegamme 5 ай бұрын
Is it in python ?
@CodingQuest2023
@CodingQuest2023 4 ай бұрын
Yes
@SwapChain
@SwapChain 5 ай бұрын
Thank you very much! We need more content in this series!
@SwapChain
@SwapChain 5 ай бұрын
Great work! We need more of this win32 asm lessons!
@InCognite
@InCognite 5 ай бұрын
Thank you for uploading this video! Now I finally understand how wave function collapse works both in theory and code and managed to port it into my own project.
@podecol9714
@podecol9714 5 ай бұрын
best explaination so far
@papapspe5662
@papapspe5662 5 ай бұрын
Classs!
@user-yf7pi9hy5b
@user-yf7pi9hy5b 5 ай бұрын
This is something I would find very interesting to implement using F#. I am developing a simulation program in .NET for a research that I'm conducting, and generating terrains with diverse and realistic environment factors is one of the main problems I have to tackle. This video gave me great insight!
@GoobNoob
@GoobNoob 5 ай бұрын
Not a fan of this one, because you don't explain how to actually get those windows/views for debugging the registers and step through on VS2022
@DxXNA
@DxXNA 5 ай бұрын
- Run Your Program to a Break Point. If you don't know how to breakpoint you can right click any line in your code -> Breakpoint -> Insert Breakpoint - Click on Debug at Top in VS 2022 -> Windows -> Registers -> Memory -> Watch
@francescopiazza4882
@francescopiazza4882 6 ай бұрын
Very interesting, thanks !
@markmanning2921
@markmanning2921 6 ай бұрын
had to stop watching when you said "implemented in python" because i literally spent 3 months trying to learn that and i just rejected everything about it outright. can you do it again in C??? :)
@hunglam2680
@hunglam2680 6 ай бұрын
Thank you so much for the course. I was struggling with the core concepts of assembly, but you came to save me!
@arejaybee
@arejaybee 6 ай бұрын
Spent an hour debugging because I made my direction enum NORTH, SOUTH, EAST, WEST instead of NORTH, EAST, SOUTH, WEST. I'm kinda glad I did because I got a very deep understanding of how all of these functions and maps are tied together. Thank you for this! I got it working in kotlin :)
@RadGH
@RadGH 6 ай бұрын
it is difficult to understand your accent and the captions are awful :/
@Kitsuneko111
@Kitsuneko111 7 ай бұрын
This ended up on my recommended and I decided to bite the bullet and learn about the big scary name algorithm at 3am. This video explains it so clearly and cleanly at such a nice pace I think I already understand it perfectly which is amazing! I already summarised it to a friend as “it’s like doing a jigsaw by looking at the similar sides and then picking a random piece that seems to fit” 😂
@erikeriknorman
@erikeriknorman 7 ай бұрын
Why did they bot farm boost this?
@brownie3454
@brownie3454 7 ай бұрын
This is Pokemon
@jamesbogart3334
@jamesbogart3334 7 ай бұрын
I wish you had gone over building that dict more. It's the more complicated part then the code
@Oscar-vs5yw
@Oscar-vs5yw 7 ай бұрын
Could you like combine this with perlin noise or some other "smooth" noise function to modify the random number generator in order to modify terrain type to create "smooth" transitions between "biomes?" Also the O(n^2) traversal to find smallest element was pain, you could just keep an array of length max entropy and then add and subtract to indices of that array to keep track of the counts of each entropy
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
Yeah I suppose Perlin would be perfect for making a smooth biome map. Good solution to improve the performance of finding the lowest entropy tiles 👌
@darkfrei2
@darkfrei2 7 ай бұрын
Thanks, I've made one WFC algorithm too, maybe not so good as your, I have no backward steps to solve unsolvable situations.
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
I also didn't need the backward steps. It depends on the tile set you are using. Sometimes you just cannot reach any deadlock situation. Or you may be able to add another tile to the tile set to avoid deadlocks.
@darkfrei2
@darkfrei2 7 ай бұрын
@@CodingQuest2023by the Coding Theain was an implementation of WFC, it makes circuits and it cannot have any transitions, some of them are impossible.
@NosAltarion
@NosAltarion 7 ай бұрын
Fantastic work. Thanks a lot. One of my student is a lot into game dev and I'll be sure to redirect him towards your video so he's motivated to dig a bit deeper in his coding classes
@spartanfoxie
@spartanfoxie 7 ай бұрын
it seems like if this was used in a chunk based game similar to minecraft it would generate terrain differently based on the direction you approach it from right?
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
Yeah, I assume you want to destroy the chunk again after a while? In that case it will re-generate differently depending on the neighbor tiles on the edges of the then existing neighbor chunks.... even if you would save the random seed. It would only regenerate the same if you start generating with the same tiles on the neighbor chunks (and the same random seed(
@spartanfoxie
@spartanfoxie 7 ай бұрын
@@CodingQuest2023 thought as much I ended up going with overlapping perlin noises one for height and like 4 for which biome, then a seed based on the x and y coordinates of the chunk so its guaranteed to be identical no matter what direction you come from
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
Yeah Perlin noise should only depend on the random seed. But with a per-chunk random seed, will Perlin not give you a mismatch in terrain height at the chunk borders? I suppose for Perlin you use one random seed for the whole world?
@jasonbelstone3427
@jasonbelstone3427 7 ай бұрын
Oh, well thanks for changing the universal constant, you douche. Are you proud? Are you proud of ending reality and atomic bonding as we know it?
@jorenvangoethem343
@jorenvangoethem343 7 ай бұрын
Tell me you're a hollander without telling me you're a hollander 😂
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
It's that obvious? 😅 North or South? Can you guess the city also?
@umgeburstet8161
@umgeburstet8161 7 ай бұрын
You have just presented a world gen algorithm to me that perfectly fits a game idea i had a couple years ago. I should implement that instead of working on my bachelor thesis.
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
You should! But after working on your bachelor thesis 😉
@tr1p1ea
@tr1p1ea 7 ай бұрын
A good video but this has nothing to do with wave functions, entropy or collapsible states ... So unfortunately all that is 'tech clickbait'. What's being referred to as entropy is closer to the complete opposite of entropy for example.
@CodingQuest2023
@CodingQuest2023 7 ай бұрын
Thanks for liking my video! 😊 I had some similar feedback already. Just want to tell I didn't invent this algorithm or came up with the quantum physics analogy. 😅
@saustin98
@saustin98 7 ай бұрын
Thank you! This exactly the right level of detail and pace. Well done!