How can you write a whole map of a game in several characters? Explain the system of their work.

    2 answers 2

    This is the initial value for the pseudo-random number generator.

    Seed is the initial value for the pseudo-random number generator. Having it, you get the same sequence (row) of any number of random numbers. Having them, you can, for example:

    • feed the first 10,000 in the noise of Perlin, to create a map of the heights of the terrain,
    • another 1000 to give to choose the type of terrain depending on the height and random selection
    • take the next 5000 for placement and selection of objects (stones, trees, etc.)
    • arrange groups of enemies / obstacles / bonuses, etc. - all this is also using numbers from the series

    That is, almost everything at the level can be random (within the rules you define), and Seed is a number that provides you with the same and unlimited sequence of these pseudo-random numbers.


    You can read more about the implementation, features and drawbacks (which are not critical for games by the way) of the PRNG on the wiki: Pseudorandom Number Generator