Slightly related to a recent post.
I understand procedural generation in video games is basically an instruction set to tell the computer to run through to get the same result every time so that it doesn’t load a whole level each time, it builds the level based on a set of parameters.
How is this different than just loading a built level? Isn’t that what a normal script of code is in any other game? Is an instruction set to tell the computer to load the level?
Is it just the difference between one being done by a programmer and one done by a level designer/artist? They both need assets already designed and made to work right?
In: 30
Consider a chessboard. You want to make a chess “level” by putting pieces on the chessboard.
A “built level” would work like this…you decide where to place the pieces on the chessboard, and write down what piece is in each square on the chessboard. So like, king on the first square, then nothing, then a pawn, then a rook, then nothing…”. So when the level is “loaded” somebody reads your instructions and puts pieces on the board according to what piece you said goes in each square.
A “procedurally generated” level would work like this. You write down “for each square, roll a 6 sided dice. If it lands on a 1, place down a chess piece. Roll another 6 sided dice to decide what kind of piece it is”. Then when the level is “loaded” somebody reads your instructions, rolls the dice, and places pieces. You can control how likely different things show up based on the instructions you provide, but the details are random.
To understand seeds, imagine that instead of rolling dice you have sheets of paper covered with long lists of random numbers between 1 and 6. To “load” the level, instead of rolling dice someone just reads down this paper one by one starting at the first number. Anyone who uses this particular “seed” and your instructions will get the same board pattern. Anyone using a different sheet of paper with different number (a different seed) will get a different board pattern. There are some technical differences here…real seeds aren’t the lists of random numbers themselves, but a number that _makes_ a particular list, but hopefully this helps give you the idea.
Latest Answers