Procedural Generation: Programming The Universe

preview_player
Показать описание
In this video I look at how we can manipulate randomness to generate coherent and well formed structures on demand, which allows truly vast and complex resources to be created with no effort from a designer

Рекомендации по теме
Комментарии
Автор

Sorry for asking, but is the last videos about the NES emulator still on the drawing board? :)

bjarkeistruppedersen
Автор

So, instead of storing something in memory, we store it in the algorithm. That's really smart.

Dante
Автор

Carl Sagan: "If you wish to make an apple pie from scratch, you must first invent the universe."


javidx9: "say no more fam"

RotBaron
Автор

J: Let's procedurally generate the universe"


Me: * spits tea everywhere *

PieRack
Автор

As someone who *REALLY* loves procedural generation and wants to get into it, you have no idea how valuable this is, thank you so much!

THExRISER
Автор

Your lack of adherence and therefore respect for customary use of seed value 42 in the making of universes is appalling. Shame, sir. Shame.

darektidwell
Автор

As others have noted, Minecraft is based upon deterministic seed world generation. That's why Minecraft speedrunners search for seeds with a particular world generation.

HisDivineShadow
Автор

I think the word you're looking for is: Deterministic. The PRNG will generate a sequence of pseudo-random numbers, and that sequence will be deterministic.
I like your distinction between procedural generated and automatically generated. I don't know if this is the common understanding of the term, but it seems useful and so will adopt it.

CoughSyrup
Автор

YES! A new Javid video! I haven't watched it yet but I always get so excited. Guess what I'm going to use my weekend with? Visual Studio and Javid! :D

Whateverworksism
Автор

I think it is wrong to think Minecraft automatic generated because the reason why it store it's chuck because the player interact with those chunk so it need to note down what has changed. With the same seeds, Minecraft can recreate the exact copy of the world just like the one you have here.

MrVinhPhan
Автор

I really like your videos, not that it means much, but I think you are clear and articulate and actually have a personality so salute sir keep going, I love them..

Gleem
Автор

Have been for decades now fascinated by randomness... This vid has such great insights! Thanks so much. You're so awesome yet again

VoidloniXaarii
Автор

Best idea about creating the universe is creating the idea of the universe. Meaning knowing how it looks is always the most important part of the creation otherwise it wouldn't be experience in our view. There's a huge amount of thought that goes into the creation of the placement of the objects, but it's quite importantly the most complicated thing to recreate simply because of overlap, but with the right theories, you can create what is called a fractal norm which is perceivably the closest thing to proper representation. With the correct correlating variables, the fractal norm can be diluted into a more visible form which will create a resulting overlap of equations and understandings using numerical constant values for a particular time in space. That being said … thanks for making the thing that I asked you to do.

taureanwooley
Автор

I'm completely honest, the first I came on to your channel, I was mostly pissed of, because I searched for things like algorithms and procedural generation.
But I was completely new to programming (which I'm still) and needed those things in Java... :) And your videos "blocked" the YouTube search page, whilst they gave a lot of information about how to do in theories but still not showing how to implement it in Java... (Yeah I'm dumb to judge a channel about C++ by not showing stuff in Java).

Complete misjudgment... Your videos are by far the best about algorithms and so you can find on YouTube. And really want to thank you for your effort!!!!

okkewarner
Автор

Good morning, Javid! You read my mind in this video, for I have been musing about the very same programming challenge as of late (though for a terrestrial setting, not a stellar one). I can't watch your entire video right now, so I will come back to it in installments.

GregoryTheGrster
Автор

It may be more appropriate to use a hash function (like xxhash) instead of an RNG (random number generator). In this small example it doesn't matter, but you might run into problems if you try to make a full game with this RNG approach:


- The universe size is constrained to 2¹⁶×2¹⁶ because the star position is used as RNG seed, and the seed is a 32-bit integer. A hash function maps _any_ number of input bytes to a random number, so a practically boundless 2⁶⁴×2⁶⁴ universe would pose no problem at all.


- If you want to create a different world every time a new game is started, you must provide the RNG with additional input; simply generate a random "master seed" before the game starts, and use it as input. So for example, to determine if an (x, y)-coordinate contains a star system, you would use [masterSeed, x, y] as input rather than [x, y] alone. A hash function makes it trivial to add extra input, but the 32-bit RNG seed has no room left.


- The star generator is sensitive to changes because the RNG is seeded once, and then used to generate a _sequence_ of random numbers. So if you were to change the order of rnd*() calls (or add/remove calls in the middle), you'd end up with a different universe. You could instead use the hash of [masterSeed, x, y, 1] to determine the star radius, [masterSeed, x, y, 2] to determine the number of planets, [masterSeed, x, y, 3, planetIndex, 1] to determine the number of moons for a given planet, and so on. This is more robust against changes, because the output depends only on the input, not the order of calls.

sqaxomonophonen
Автор

This is one of the best, if not the best, channel I've ever discovered. It is useful from start to finish... also to improve my English. Thank you to exist sir.

techvigator
Автор

Concerning the distinction between procedural generation and automatic generation, I'm reminded of a classic PC game that did both: Starflight. Resources like fuel, minerals, and life forms were automatically generated, but the terrain itself was procedurally generated, and as far as I know, is one of the first games to do so. For the same reasons described here: the game had to fit on one floppy disk, and there was no other way to "store" the terrain data for over 600 planets in such limited space. The resource data was only stored for a much smaller area in the vicinity of the player's ship, and became "forgotten" and re-generated as the player explored.

Bigandrewm
Автор

Such a serene narrative, quite hypnotic actually. No debugging necessary. We are moving quite casually from A to B to Z. Of course, rand is rubbish and the mersenne-twister is slow. That is why everybody chooses Lehmer random numbers ... Keep up the great work :)

peterklenner
Автор

What a happy coincidence, I've been dabbling in my own procedural universe for little over a year now. Your excellent explanations would have saved me a lot of headaches early on as I was learning programming and experimenting with procedural generation.


I love your videos, they keep me motivated and I find them very helpful even though my main focus is Unity w/ C#.

Zorbaq