Chance in Video Games

How Randomness Works in Video Games

A broad guide to where video games use chance in combat, loot and level generation, why designers add it, and how computers turn numbers into outcomes.

On this page
  1. Where video games use chance
  2. Why designers add randomness
  3. How a computer produces random numbers
  4. Turning numbers into outcomes
  5. Why real randomness feels unfair
  6. What designers do about it
  7. Reading the odds as a player
  8. When chance costs real money

Where video games use chance

Almost every genre uses randomness somewhere, even when it is hidden behind menus and animations. The most common places are:

  • Combat. Whether an attack hits, how much damage it deals and whether it becomes a critical hit are often decided by a random roll.
  • Loot and rewards. Enemy drops, chests, crafting results and card packs usually pick from a table of possible outcomes, each with a weight.
  • World and level generation. Roguelikes, survival games and many open-world titles build maps, dungeons and item placements from random choices.
  • Enemy behaviour and spawns. Which enemy appears, when it appears and which attack it picks may all involve a roll.
  • Shuffles and draws. Digital card games shuffle decks much as a physical game would, and many video games borrow dice mechanics from tabletop play.

There are also small, nearly invisible uses, such as slight variation in damage numbers or in how long an idle animation plays. These make a game feel less mechanical without changing the outcome of anything important.

Why designers add randomness

Designers have several reasons, and they pull in different directions.

Variety and replay value. If every run played out identically, a player could memorise the best route and the game would be solved. Random elements keep each session at least somewhat different.

Tension. An attack with a 70% chance to hit feels different from a guaranteed hit. The possibility of failure gives the moment weight.

Room for the underdog. A weaker character or newer player can occasionally succeed against the odds, which keeps matches and encounters from feeling predetermined. How much chance a game should include is a real trade-off, and the question of luck versus skill sits at the centre of it: more luck makes outcomes less dependent on decisions.

Pacing of rewards. Unpredictable rewards can keep players interested, which is part of why discussions of reward design and player engagement come up so often when chance is involved.

The costs are real too. Random outcomes can feel unfair, and a sequence of bad results can end a run for reasons that have nothing to do with how well someone played.

How a computer produces random numbers

A computer does not roll dice. Most games use a pseudo-random number generator: a formula that starts from a number called a seed and produces a long sequence of values that look random but are fully determined by the seed. Start from the same seed with the same formula and you get the same sequence again.

That predictability is often useful. It allows replays to be recorded, multiplayer games to stay in sync, bugs to be reproduced and shared world seeds to produce the same map for everyone. The mechanics behind this are covered in more detail in the article on pseudo-random generators in games.

Turning numbers into outcomes

A raw random number is not an outcome until the game maps it onto something. Two patterns cover most cases.

A threshold. Suppose a skill has a 30% chance to stun. The game draws a whole number from 0 to 99 and stuns the target if the number is below 30. Thirty of the hundred possible values qualify, so the chance is 30%.

A weighted table. For loot, each possible result is given a weight, and the game picks proportionally. If a table has weights of 90, 9 and 1, the total is 100 and the chances are 90%, 9% and 1%. Weights do not have to add up to 100; the chance of any entry is simply its weight divided by the total.

Real games layer these together. A single attack might check for a hit, then for a critical, then roll a damage range, then roll a chance to apply a side effect. Each layer multiplies the number of possible results, which is where the multiplication principle becomes useful for counting them.

Why real randomness feels unfair

Genuine random sequences contain streaks more often than most people expect. If an attack has a 25% chance to land, the chance of missing four times in a row is 0.75 × 0.75 × 0.75 × 0.75, which is about 32%. That is roughly one in three attempts at a four-shot sequence, not a rarity.

Several habits of thinking make this worse. People tend to expect random results to alternate evenly, to remember misses more vividly than hits, and to believe a success is “due” after a run of failures. In a system where each roll is independent, that last belief is wrong, because the game has no memory of earlier rolls. The law of large numbers says averages settle toward the true probability over very many trials; it does not say that bad luck gets paid back in the short run.

What designers do about it

Because pure randomness can feel unfair, many games add adjustments on top:

  • Systems that nudge the odds after a long run of failures, sometimes called streak breakers.
  • Guaranteed-after-N rules in collectible and gacha games, known as pity timers.
  • Displayed hit chances that are rounded, or that differ from the underlying roll, which can make a stated percentage feel wrong.
  • Published odds for random paid rewards, which help players judge what they are buying.

Each of these changes the maths in a specific way, and some are never documented, so a stated percentage is worth reading carefully.

Reading the odds as a player

A few questions help make sense of any random system:

  1. Is the stated chance per roll, per kill, per opening or per session?
  2. Are rolls independent, or does the game track a counter and adjust?
  3. Is the displayed number the real number, or a rounded or adjusted version of it?
  4. What is the long-run average, and how widely can a single session differ from it? The idea of expected value describes the average, while a single session can land far above or below it.

When chance costs real money

Randomness inside a game is a design choice. Paid random rewards are a different matter, because every attempt has a cost and the outcome is uncertain. Pricing, odds and rules vary between games and regions, and some jurisdictions regulate certain paid random mechanics. A rare item with a low drop chance can take far more attempts than most people expect, and there is no guarantee of ever getting it unless the rules explicitly say so.

It helps to decide on spending limits in advance, to treat any purchase as money spent rather than an investment towards a result, and to stop if play starts to feel compulsive. Anyone who feels they are losing control of their spending on games or gambling should consider contacting a local support service.

Keep exploring

Guides from other topics

All topics →