How does procedural generation work? | Bitwise
Vložit
- čas přidán 29. 08. 2024
- I'm a professional programmer who works on games, web and VR/AR applications. With my videos I like to share the wonderful world of programming with everyone!
How do games such as the Binding of Isaac generate its dungeons? How do games like Terraria, Minecraft and No Man's Sky generate their enormous worlds? In this video we'll discuss how random generation and procedural generation works.
Music in in outro:
Besus y Abrazor - Rolemusic: freemusicarchi... available under a Creative Commons Attribution license creativecommon...
I'm back with a new video!
Thank you all so much for your support watching these videos, you reinvigorated my love for making videos! :) More video's will follow: we're back in action!
Nice. :)
OMG, like a mouth ago I discovered your channel and I was very sad that your last was upload 2 years.
I am very excited about your return to CZcams.
Good Luck
Really glad you are back, your videos are amazing! One question, did you delete some old videos? I thought you had videos about Hotline Miami or am I wrong?
Yeeees! Keep it up!
Glad to see you're back! I found your channel not long ago and watched a bunch of videos, then got sad when I saw you hadn't uploaded in a while.
If you're looking for video ideas, one thing I think might be cool is how a game's save system works. I'm thinking of games like Minecraft, Elder Scrolls, or Breath of the Wild where it has to remember changes you make to the world and world objects in an efficient way, and even choose when to "forget" something (like blood moons)
4:26
Perfectly synced villager “hmm?”
That's definitely intentional. If it's not then my right foot can run for president :D
@@GraySlicerAnimations Funnily enough: it wasn't intentional initially, but during editing it accidentally lined up like this so I decided to double down and exaggerate it a bit!
@@GraySlicerAnimations Sooo… Left foot for president?
@@DigiDigger Well I'm glad you did because the result was funny. Also, I'm glad to see that you're back. I found your channel and was thinking to myself: "It's a shame he doesn't made videos anymore..." Then a little bit after that I saw your post and comments saying that you were back! Keep up the great work! :D
@@lavaman4919 My left? I said my right. Either way I've got a campaign to plan :D
“In the future, entertainment will be procedurally generated”
weedeater
@@DudV2 WEEDEATER
blue watermelon🇩🇰📀
It already is.. have you heard of pop music?
PICKLE
I was calling my dungeon generation procedural, but it was actually random. Thanks for enlightening me!
@Almost blank If you have to do it often then try building a flexible system for it. At least that's how I like to work, every task that I have to do multiple times I try to automate
@@dercoder015 The problem with that is that, as far as I know, every part of a game made for a jam has to be made during the timeframe of when the jam is going on. So, doing that would be considered cheating.
@@roshibomb4247 I've not done a game jam but some hackathons, surely external libraries are usable right? Not coding game engines from scratch in a weekend I expect. Make a system and open source it so you can use it at the next one should be within the spirit and the rules of a game jam (I think, obviously check the specifics of your event).
@@Athaman136 I've never done one either; my coding experience boils down to a few Scratch games, haha. But from the many videos I've seen on it, it looks like you *do* have to build the entire game from the ground up. The only allowed prebuilt things I know are things like unity and whatnot. I personally also feel like creating something before the jam, while convenient, goes against the very core of the idea of a game jam. The whole point is to create an entire game based around an idea within a set time frame. Having prebuilt tools (by yourself no less) to speed it up feels a bit odd to me. But that's just my two cents. Maybe I have my whole thinking backwards, lol
@@roshibomb4247 quite a few gamejams allow libraries, if you have a bunch of generic functions that you use often, having them handy is probably a good idea.
the rules often are similar to:
Use any tools, engines, frameworks or libraries that you own or have licensed.
You are free to use any assets or content that you own or have licensed.
in theory, if you have a game that fits the theme, you could use it, but you'll probably still need to make quite a few adjustments, and probably make art for it.
digi you barely made the January 2020 deadline!
really glad to see a video after 2 years
"you use a random seed generator to randomly select the number in a sequence"
"ok so how do you randomly generate a seed?"
random number generator used to randomly generate a seed: *sweating*
Usually something like system time and other easily accesible data that is somewhat random.
I think some games used mouse position, but that one is probably not a good choice.
nah the seed isn't generated with random number generator, the seed is the current system time
@@spyrex3988 no, the seed is generated by a random seed generator.
@@vlusky_husky You might be messing up the terminology a little. Only initializing a rng is called seeding. After that typically the previous result acts as the next "seed" equivalent, but it's afaik not usually called that.
In most implementations i know of (basically everything except retro console) as soon as the generator is initialized all future outputs are already fixed. The function is just spitting the next number in line to you.
In other words, seeds are your input, they aren't generated. Sometimes if you don't specify system time is used, but regardless of whether you do it manually or not you only seed once.
@@randomnobody660 Calm the heck down, im making a joke.
wow, now I understand how no man's sky has certain bugs with regards to base building and terrain interaction.
Somtimes you would build a base , where you've carved out terrain and such and then next time you loaded the game the terrain has seemingly returned except it's now inside your base.
It must have something to do with the order in which the base modules and terrain edits are loaded in whilst the map is being generated. Shame they've never managed to fix it though.
@@chopholtz4950 NMS also saves changes to the terrain, just some larger updates in the past might have broken it I guess
i was avoiding this video, dismissing it as another one of those mundane tutorials on youtube that takes forever to explain a simple point. But i was wrong.
You, my beautiful man, Have got me hooked on this content. Seeing as i always wanted to try and become a programmer or developer of sorts in my future, This is fascinating on how all of this actually works! Keep up the amazing work and i wish you only the best!
Be warned, this is a very misleading video -- he really tells very little, and a lot of it is opinion and misdefinition of terms. If this really interests you, you might need to read a book about it and start experimenting on your own. I doubt you'll find one of those "mundane tutorials" on this subject; procedural content is too much of an art to make a cookbook tutorial on.
@@BlackJar72 why's that? Can you point out for me one the misleading and wrong things he said in the video? I know nothing about this subject and I'm genuinely curious. I will study it more on my own so I can truly learn how this works
@@BlackJar72 8 months later and still no reply as to what was wrong with the video. Just vague statements dismissing the content when what is described seems reasonable and I'm not sure why it wouldn't work.
@@foobars3816 one thing maybe, he mainly used time to change the image of perlin noise so unless your redrawing every frame you would use one seed but never update the noise its very costly
My main point is the fact that perlin nosie is loaded once not at depth of point traveled
Welp. That worked.
*_Throws the Necronomicon away_ *
Another channel back from the dead.
*_Catches Necronomicon and stores it_
Hey dude, we might need that again somewhere else, don't lose it!
@xd ZwanzwaN You're fun at parties.
@@marcoshalberstadt7646 we need to use it again
Super cool to see this channel revival, The content here is top notch my dude!
wtf man, its been 2 years, i subbed a few months ago and loved your explanation of portal and terraria. i was gutted to see that you havnt uploaded in 2 whole years! thought you died, im glad youre back, im looking forward to loads more content from you!
Recently found the channel and was super happy, until I thought it was abandoned.
Seriously, your channel explains this in the most comprehensive way for people who have no clue. Also loved the critique videos, because it doesn't just gloss over what one feels as a player, but actually breaks it down into classic design theory. Keep it coming!
Oh all the visualizations are so great! Thank you so much!!
☺
I've been trying to understand Procedural Generation for so long now, and you managed to explain it perfectly in one entertaining 13 minute video. I'm absolutely stunned. THANK YOU!
You returned! I discovered your channel by your portal video, keep it up man!
Same, I discovered it some days age. Seems to be the peefect time considering the reboot of this chanel.
I'm glad there aren't any people trying to "debunk" this video like the terraria one. That got really annoying to me, and I'm glad you stuck through it!
@@fibre0690 I totally agree with that, but it just really annoyed me when people are saying he shouldn't make videos if he will spread misinformation. Obviously this needs improvement; it's his third video in this style.
It's definitely not the best on CZcams, but I think a lot of people need to realise, this is just a dude making videos, not some master out there with the intention of informing experienced programmers on complex topics, he's just making what he wants to make.
I'm not really arguing with you, just getting a little annoyed over the comments on the previous video lol
Welcome back! I'm so glad you decided to continue.
I saw your video on terraria in my recommendations today, watched it and really liked it. The comments said this was a dead channel, so I got a bit bummed out then saw that you had a video posted 6 days ago. After a two year gap...
I clicked so fast just so CZcams could get off its ass and hopefully recommend this.
Got it recommended to me, thanks ;)
Recommended
Just got recommended
Fantastic video! I’m glad I discovered your channel a month ago instead of 2 years ago!
Please do not stop creating these videos. You help and motivate a lot of people. I am new to programming, just started with C#, and the motivation that I got from these videos is insane. The fact that you can create infinite universes and all that good stuff is driving me crazy.
I really just want to say *thank you* , thanks *a lot*
I’m glad to see more content from this channel; you somehow manage to always make a video on some game-development-related topic that I’ve wondered about for a while :)
I remember back in the '80s, after wondering if RNG was related to the system clock, I wrote a small BASIC program to display a random number upon boot of the system. The system (an Acorn BBC Model B microcomputer) did not have a real-time, battery-backed clock, so only used the system bus clock to time its operations, meaning that the bus clock started from a fixed state each time the computer was turned on. Unsurprisingly now, the program produced an identical number every time it was auto-run whenever the computer was cold-booted. From that point on, I never accepted the idea of true randomness in computing.
I learned so much from your video. As a math teacher, I can appreciate much of what you are talking about. My mind is blown. I understand this in a much deeper way. My kids will love this!! Thank you!
Always wanted to learn a bit about procedural generation but never really committed to it. However, I am very interested now! Thanks Digi!
I just want to say, the production value of your videos is way higher than what kind of recognition you are getting. This content is some of the best that I've ever seen when it comes to explaining complicated concepts in games. You do an amazing job of simplifying the content just enough so that it is understandable, but not boring to watch. You deserve so much more than what you're getting and, if you stay motivated to keep putting this content out, you are definitely going to find success.
Ah, Minecraft and Terraria, the perfect pair of games for explaining procedural generation.
Your videos always fascinate me and I always learn something new! Thank you so much and keep up the great work😁
Randomly suggested your videos on Portal and Terraria and watched this one, didn't realise until the end that you made the Terraria video 2 years ago. Cool videos, keep it up. New subscriber.
Wow, a 2 year break but you actually uploaded the next episode as if no time had passed at all! Great work, this is a great explantation of technical information in a less technical way. Much easier to understand.
Really cool video, with some awesome visuals to match. I'd like to further stress the importance of things like perlin noise. You can't have a sequence that's the same every time but requires starting at the beginning to calculate it. Pi is actually a good example of this. While it's random and goes on forever, you can't just pick a digit to start at without calculating the digits prior. Perlin noise lets you jump to any position and get it's value without caring about the values around it. This is key when developing a procedural generated world. Water running down a mountain might pool somewhere as a lake, but when a player finds this lake you can't have it figuring out where the water starts first to determine said lake. It's just not performant. Of course the scale of what you're trying to generate will determine how important this is. Spawning flowers around a tree isn't out of the question, but spawning a tree based on it's proximity to other trees might get you into trouble quickly.
Not gonna lie, this poped up in my recommended. Many comments saying you haven’t been uploading. Idc, you’re part of my major and dream job, I’m learning here more than my CSIT classes I get in college. I subscribed and hope you upload more. This is a great channel, I want to know more please!
It's great to see you back and making videos, they are so fun and interesting and I learn so much when I watch them. They are very inspiring and give me the push to keep going. Thank you for taking to time to make them, they are appreciated so much!
as a very bad coder, things like this just fascinate me. its just awe-inspiring how a large series of numbers and letters can create entire worlds!
I LOVE YOUR CONTENT AND IM SO HAPPY THAT YOU REBOOTED THIS CHANNEL!!! KEEP UP THE GOOD WORK PLZZZ
I've had some knowledge of how this was done...I love open world and procedurally generated games - but I never watched a video where anyone attempted to explain it with a bit more digestible detail. Thanks!
the way you explain all the way from the interpretation of "noise = annoying sounds" to complex 3D cave systems is amazing! Your visual demonstrations are on point
A really high quality of content, loved the videos and the way you explain them. You are really great at breaking down complex and technical subjects and teaching them part by part!
Keep up the good work!
Finally, the time has come.
I’ve been studying programming and game developing for a year and never heard of perlin noise before. Because of your video, I’ve learnt a new concept and I’m going to study how to use them now!
You should check out Simplex noise too/instead. It's newer and less visibly grid aligned. Not entirely sure why the content creator didn't cover it (let alone make it the focus), but I find it to be the better choice most of the time.
9:44 "Argumented reality sandbox" - This looks nice.
Aside from that: Nice video, thank you for producing and sharing. : )
What a great video! This answered so many questions for me. Looking forward to more videos from you in the future.
I only subscribed a few weeks ago after watching your old videos, I thought you’d disappeared for good. I’m glad you’re back, loved the video!
Please keep putting out videos! I've just discovered your channel, and though I've only watched the most recent stuff, it's all been super interesting!
I watched this video while wearing a pickle rick t shirt. The first second was shocking. Randomness just got squared!
Please keeping creating videos. You are a great educator honestly.
He's back!! Awesome video as usual, super helpful
Two years later, this video is still fantastic. Thanks a bunch, I look forward to the rest of your content.
Thanks for coming back with more info on procedual generation! :)
I learned about a new noise today, thanks to you. "Ridged fractal noise"
and welcome back, community needs you :)
Thank you for this. I absolutely love preceduaraly generated world's and this video was great and easy to follow. I am just starting to learn how to code, so many there will be a procedurally generated game in my future
Hey man, really love your videos, nice to have you back :)
Finally a new video from this gem of a channel! I totally forgot to set notifications.
It's been a while since I watched the previous video about terraria and in the video you said you would talk about this topic, if I'm not mistaken, but then I saw that there were no more videos for 2 years. Today I just got this in my recommended videos. Nice surprise
12:35
change da world
my final message. Goodb ye
_* _*_Windows 95 Boot-up noise_*_ *_
As always, the quality of your content is above all expectations! Thank you for your videos, btw I am about to finish my first game)
Finaly , after 2 years you came back , this channel is a tresure !
Using pseudo-random numbers in the generation of a game world is super important, because being able to exactly reproduce a game state based on a given seed makes it possible to fix errors or prevent the creation of for some reason unplayable worlds. This would be impossible with true random numbers.
Great video, especially the Perlin-noise section was fascinating.
Wellcome back :)
This video was awersome
Great video! Also, I'm glad you're back :D
I thought this channel was dead an it made me so sad. Very, very glad to have you back!
It's nice to hear someone with technical knowledge talking about videogames.
Good job and keep going
enjoyed your way of presenting all the info! good job!
This channel is pure gold. Do not disappear please!
glad you're back, and amazing video btw
man i am so glad that you decided to upload more let me tell you
i am really glad
I love your videos! They're so informative! Geweldig!
Glad to see you uploading!
For the seed to create your Perlin texture, add to the system time the square root of the product of the cpu fan speed and gpu fan speed (as integer,neither dismissing decimals or dismissing the coma). For the displacement strength of white pixels, you use the full degrees of the cpu temperature plus the decimals*10 of the gpu temperature and for the displacement strength of black pixels use the full degrees of the gpu temperature plus the decimal*10 of the cpu temperature.
great and easy to understand explanations. love it!
The potential of this channel is huge, the content is captivating. Here's hoping for some more regular videos!
Gooood looord, duuude. I was searching for this explanations of procedural generation for my world generator. Thank you so much!
You should use Simplex noise and not Perlin noise, due to Perlin having visible grid artifacts. I wish the video creator would have covered this better. The cave generator explanation isn't entirely correct either. But some of the other info is good! Search OpenSimplex2 to find a noise implementation I've put together, where you should have fewer issues using the 3D noise for any purpose you like, compared to others which use the original algorithm. Otherwise, there are lots of options out there, especially if you just need 2D noise.
This is amazing! Thank you for this introduction to procedural generation knowledge!
Dude, I'm so glad you came back and just didn't stop making these videos
I just saw the terraria vid and now this one. 2 year break between videos?? Man! This is really good stuff.
Oh my, you're back! I only found your channel after it was too late, luckily you came back :)
The quality of this video is so high. You are great at explaining things and great at keeping the video interesting.
Man, the last video was posted a 2 years ago, and i meet this Channel in the hour that he made a new video after 2 years stopped, it looks like a movie
Excellent video mate! Learned a lot, glad to see you're back.
I found this channel a few months ago and it was like a diamond in the garbage. Then I saw, that the last video was uploaded 2 years ago... That very disappointed me. Today, I decided to clean my subscriptions and was very surprised, when I saw a new video from you! Please, keep going, they are awesome! Hi from a student of Czech Technical University in Prague ;) (Zije FIT)
Thanks for coming back! Just after I discovered your channel, I noticed you've been gone for 3 years. But I fortunately saw your comment on the last video and here we are!
Congratulations! Keep uploading, your content is amazing!
This is definetly one of my favourite channels! Glad to have you back!
Excellent! Thank you for making this easy to understand, so good!
Thank you for this! first 3 minutes and I've already learnt something new
It should be noted that Perlin noise is only one type of noise. There is also random noise, simplex noise, cellular noise, veronoi noise, blue noise and more. Oftentimes, especially when working on the GPU, it is advantageous to use different noise that is less expensive.
Also, the using of 'multiple passes' to layer noise with different weights and scales is called fractal Brownian motion, or fBm.
Found this channel like a month or two ago, looked for more videos like the portal one, but got really sad when they were from so long ago... BUT HES BACK WWITH MORE AMAZING CONTENT!!
Amazing content, id love for some more of this!
Man, your videos are so great!!!!!!!!! big support from France!
Loved the video, very informative.
Keep making videos man! After watching your portal video and realizing the youtube algorithm brought traction to your channel after you gave up on it. So glad to see new videos form you. You're doing an excellent job with the editing and explaining complicated topics. Definitely make something of this opportunity. Just to let you know i don't usually comment but for the sake of you keep posting i commented, liked and subscribed!
Please continue, your videos are actually so hq that you will get your deserved views in no time
Thanks for being back!!
Finally! A good video that also explains how caves can efficiently be generated. Thank you 🙏🏻
The greatest anime comeback of all the time!
Please don't leave, we love your content
Did an entire dissertation on proc gen yet this video blows mine out of the park....happy learning
Your content is excelent! Your presentation makes it interesting for experienced and new game developers alike
This is soooo awesome. Thank you so much. I would like you to explain how SpaceEngine works one day. It uses procedural generation also but I would like to know how to do that on a sphere, how to make the planets and stars, how to transition from a predefined surface texture to a procedural landscape when you get close!
Omg Ace of Clubs is EXACTLY like the gameboy game “Monster House”
Or at least the room format, so crazy lmao
great video ! keep posting videos like this, you explain everything really clearly and interesting