Quick Answer: Video games use random number generators (RNG) for virtually every variable outcome: loot drops, critical hits, AI behavior, weather, enemy spawns, and procedural world generation. The Mersenne Twister PRNG is standard for games — it is fast and passes statistical tests, though it is not cryptographically secure.
What Game RNG Controls
- Loot drops: Every chest, enemy drop, or reward roll uses RNG to determine what appears
- Critical hits: Each attack checks RNG against a crit probability
- Enemy AI decisions: Randomized patrol routes, attack timing, and reaction delays add unpredictability
- Card games and board games: Card shuffles, dice rolls, and tile placement
- Procedural generation: Minecraft worlds, Roguelike dungeon layouts, and No Man's Sky planets are generated from seeded random values
- Matchmaking variance: Subtle random factors prevent repetitive, predictable situations
Seeded RNG: How Procedural Games Work
Games with procedural generation use "seeded" RNG — a specific starting number (seed) that produces the same procedural output every time. This is why Minecraft worlds and Spelunky runs can be shared and reproduced exactly using the same seed. The seed determines the complete "random" sequence, making the world theoretically deterministic but practically unique.
Pseudo-Random vs True Random in Games
Games use PRNG rather than CSPRNG — they do not need cryptographic security, they need speed and reproducibility. Mersenne Twister can generate millions of values per second. CSPRNG is slower and designed for security, not performance. For game fairness, PRNGs are sufficient — players cannot exploit the algorithm in real-time gameplay.
Pseudo-Random Distribution Systems (PRDS)
Some games (Dota 2, League of Legends) use Pseudo-Random Distribution to prevent frustrating streaks. Rather than a flat N% per roll, the probability starts lower and increases with each unsuccessful attempt, guaranteeing the event occurs within a bounded number of tries. This feels fairer to players without actually being statistically fair.