AI Game Dev Search

Why a 90% shot misses three times in a row, and how games secretly fix their dice

True randomness feels unfair: long droughts, missed sure shots, chests that never drop. Watch five tricks games use to make luck feel fair, side by side, then add them to your game.

Tested with Claude Code 2.1.296 · Opus 5.5

Ten shots at 90% to hit. True random: four hits, three misses in a row, three hits. Fair random: one single miss. Below, five labels: Shuffle bag, Pseudo-random, Streak breaker, Round up, Pity timer
What we asked“Make a web page that demonstrates the fair-randomness tricks one at a time, so anyone can see and feel each one within a few seconds. For each one, show the same short moment side by side: without it on the left, with it on the right, playing in a loop, with a caption that says what just happened and a replay button. Where it helps, let me play the moment myself. It will sit inside a blog post about 720 pixels wide, so it has to look good at that width and on a phone. Also make each one viewable alone with ?trick=<id>&solo, using these ids: shuffle-bag, pseudo-random, streak-breaker, round-up, pity-timer.”

What happened

  • Loaded the fair-randomness skill
  • Wrote one page where both sides use the same random numbers, so the trick is the only difference
  • Picked, for each trick, a real run where plain randomness shows a bad streak, and said so on the page
  • Simulated 10,000 rolls each way and put the numbers under every demo
Claude
Page is working with no errors; I'm fixing two small things I noticed in the screenshots: uneven panel headers on phones, and one caption's wording.
Claude
All five demos play and loop. Round-up changes the real odds on purpose, and the streak breaker and pity timer raise the average a little, so their cards say so.

Players are terrible at randomness. The chance of three misses in a row at 90% is one in a thousand, so in a long game it will happen, and it will feel like the game cheated. So games quietly bend their dice to match what players expect. Each demo below plays the same run twice with the same random numbers: plain randomness on the left, the trick on the right. Under each one are the numbers from 10,000 simulated rolls.

1. Shuffle bag

For a sequence of pieces, cards or enemy types, put one of each in a bag, shuffle it, deal them out and refill when it’s empty. Tetris games that follow the official Tetris Guideline do this with their seven pieces, so you can never wait more than 12 pieces for the long bar (Tetris Wiki).

2. Pseudo-random chance

A “25% critical hit” starts at a lower chance, about 8.5%, and gains that much again after every normal hit, resetting when it lands. The average stays 25%, but long dry spells and lucky streaks become rare. Dota 2 does this for critical strikes and bashes (Dota 2 Wiki).

3. Streak breaker

After two or more misses in a row on a shot shown as likely, quietly add a bonus to the next one until it lands. XCOM’s lead designer Anand Gupta described a hidden “bad streak breaker” like this on its Normal and Easy difficulties (PCGamesN).

4. Round up likely odds

Players read 80% as “can’t miss”. The game Dispatch took that literally: its directors said at GDC that anything shown above 76% succeeded automatically, and very low chances were raised to 15% (PC Gamer). This one changes the real odds, so use it only where a miss would feel unfair.

5. Pity timer

For rare drops, guarantee the item after a set number of empty tries, then reset the count. Loot and gacha games often promise this openly, because “it will drop by the 30th chest” is easier to live with than “1 in 10, forever”.

Is it still fair?

Mostly, yes. The shuffle bag and pseudo-random chance keep the long-run average exactly where it was; they only remove the streaks. The streak breaker and pity timer raise the average a little (85% became 85.3%, 10.2% became 10.6% in the simulation), and rounding up changes it on purpose. The looping runs above were picked to show a bad streak, but every one of them is a real run, and the tables are honest averages.

Add it to your game

  1. Copy the skill at the end of this page into your project.
  2. Ask your agent: “Make the randomness in my game feel fair.”
  3. Play it, then tune in plain words: “Rare drops should come a bit sooner.”

One rule matters most: never show the trick. A screen that says 85% must keep saying 85%. Players who discover the dice are bent stop believing every number in the game.

The skill that made it work

This is the whole skill we gave Claude Code. Copy it into your project and ask your agent to make your game's randomness feel fair. The last step makes it check that the averages stay honest.

fair-randomness
  1. Find every random roll a player notices: hit chances, critical hits, item drops, card or piece order, spawn types.
  2. Put every trick behind one named switch in a single settings object, all on by default, so each can be tested on its own.
  3. shuffle-bag. For sequences (pieces, cards, enemy types), put one of each in a bag, shuffle it, deal them out, and refill when empty. Tetris games following the Tetris Guideline do this with their 7 pieces. Nothing can go missing for long or repeat too often.
  4. pseudo-random. For "X% chance" effects, start at a lower chance C and add C after every failure, resetting on success. Dota 2 does this for critical hits and bashes. For 25%, C is about 0.085. The average stays 25%, but long dry spells and lucky streaks become rare.
  5. streak-breaker. After two or more misses in a row on rolls shown as likely (70% or more), quietly add a bonus to the next roll until one succeeds. XCOM's designers described a hidden version of this on its easier difficulties. Never show the bonus.
  6. round-up. Players read 80% as "can't miss". Treat shown chances above about 75% as near-certain and very small ones as at least about 15%. The game Dispatch made anything above 76% succeed automatically. Use it only where a miss would feel unfair, and say in your notes that the average changes here on purpose.
  7. pity-timer. For rare drops, guarantee the item after a set number of tries without it (for example, 3x the expected number), and reset the counter when it drops.
  8. Measure it. Simulate at least 10,000 rolls of each kind with tricks on and off. Report the average success rate (it must match the shown odds within about 1%, except round-up), the longest losing streak, and the longest wait for a rare result. With the tricks on, streaks and waits should be much shorter.

Save it as .claude/skills/fair-randomness/SKILL.md in your project. Or connect your agent and type /aigamedev: it loads this skill with its reference files and the results from this post.