LerpworksAcademy
On this page

Math and physics › Transitions, randomness, numbers

Randomness: seeds, distributions and fairness

A computer cannot roll a die. Its “random” numbers come from a formula, and the same starting number, called the seed, always produces the same sequence. So every player who enters the same seed gets the same world. The page also looks at what changes when you add dice together, how to scatter points and trees without clumps, and why fair randomness feels like cheating to a player.

Why this matters

Randomness is everywhere in a game: where a tree grows, what drops from a chest, whether a shot hits. Use it carelessly, and the forest comes out in clumps and players on a network end up in different worlds. A player quits after a streak of misses that “couldn’t happen.” Knowing how random numbers work fixes all of this.

You will use fractions and lerp from earlier lessons, and the quaternion for random rotations.

Further in the article

  1. A computer does not roll dice
  2. Seed: one number, a whole world
  3. Random by position, not by order
  4. Distributions: what comes up more often
  5. A random point
  6. Uniform random does not look even
  7. Fair randomness feels unfair
  8. In engines and Blender
  9. Where it breaks
  10. Connections: the same idea in other fields
  11. Key points
  12. Test yourself