How I Built a Seeded Football Match Simulation for a Draft Game
Players draft the team but never play the match, so the simulation has to feel fair. Here is the possession-and-event model behind World 11, why it is deterministic from a single seed, and what that buys you for free.
I built a football game where you never play football. You draft a team, eleven real players pulled from World Cup squads across the decades, and then you watch a simulated result tell you how far they get. The game is called World 11. The whole thing rests on one component: the match simulation. If that feels random or unfair, every decision you made in the draft feels pointless. So I spent more time on the sim than on anything else, and the most important decision was making it deterministic.
The Problem With Simulating a Match
A football match has a score, and the naive way to fake one is to roll a number weighted by team strength. Stronger team, higher number, done. It works, and it feels terrible. There are no shots, no possession, no scorers, no story. The player drafted Pelé and the screen just says 2-1 with no sense of why.
What I wanted was a result that reads like a match report. Possession percentage, shots for each side, expected goals, named scorers with minutes, the occasional red card. Not because the game shows all of it at once, but because a result built from those pieces holds together. When the underdog wins on fewer shots, that reads as a smash-and-grab, and it feels real even though no ball was ever kicked.
The Model, From Lanes to Goals
Each team is reduced to four lanes: goalkeeping, defence, midfield, attack. Those come from the players you drafted, with an out-of-position penalty so a winger shoved in at centre back drags the defensive lane down.
From there a match runs in a few steps:
- Possession is the midfield ratio. More midfield than your opponent, more of the ball, clamped so it never goes fully lopsided.
- Shots for each side scale with possession and the gap between your attack output and their defensive solidity. Outplay a team and you generate more attempts.
- Each shot carries an expected-goals chance of becoming a goal, nudged by the shooter's finishing. Most shots miss. That is the point.
- Goals get a scorer, drawn weighted by position and finishing so your striker scores more than your full back, and a minute on the clock.
- Knockouts that end level go to extra time, then a penalty shootout weighted toward the better team but never a pure coin flip.
None of these numbers are large or clever on their own. The realism comes from stacking small probabilistic steps instead of one big roll. A handful of tunable constants, shot rate, conversion rate, an extra-time factor, live in a data file, not in code, so balancing never means touching the simulation.
The Decision That Mattered, Determinism
Here is the part I would do first on any game like this: the entire simulation is deterministic from a single integer seed. Same seed in, same fourteen-match gauntlet out, every single time. No hidden global random, no time-based noise. One seeded random number generator threads through the whole run.
That sounds like a purity exercise. It is actually the most practical decision in the codebase, because two features fall out of it for free.
The first is a daily challenge. If today's seed is just the date, then everyone in the world who plays the daily faces the identical bracket of opponents in the identical order. No server, no coordination. The determinism is the shared experience.
The second is shareable challenge links. When a run ends, the game can hand you a link containing the seed. A friend opens it, gets your exact draft pool and the exact same gauntlet, and tries to beat your score on equal terms. Again, no backend required. The seed is the whole feature.
Neither of those is something I bolted on later. They were impossible-to-cheap the moment the sim became pure and seeded, and impossible to add cleanly if it had not been.
Testing a Thing With No UI
A pure simulation has a lovely side effect: you can run it ten thousand times in a headless process with no rendering at all. I lean on this constantly. A small script drafts teams, runs full gauntlets, and reports aggregate outcomes in seconds. It is how I caught that my first balance pass let strong teams win the cup about two-thirds of the time, which is a separate story, but none of that measurement is possible if the sim is tangled up with the scene tree.
The rule I keep coming back to: keep your simulation pure and decoupled from your presentation. The view can be as animated and juicy as you like, but the thing that decides outcomes should be a function you can call a thousand times in a loop without opening a window.
What I Would Change
If I rebuilt it, I would still start with the lanes-to-goals event model and still make it seeded on day one. The thing I underestimated was how much the feel of the result depends on variance, not averages. A model tuned only on expected values produces boring, predictable matches. The life is in the spread. But that, and how I measured it, is the next post.
If you want to see the sim in action, World 11 is free in the browser. You draft, it simulates, and now you know roughly what is happening behind the scoreline.
Like this? You'll like what I'm building too.
Two ways to support and get more of this work.
HEARTH
A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.
Read moreMY TOOLKITS
Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.
Browse on WhopRelated Articles
Balancing a Roguelike to a One-in-Three Win Rate With a Headless Harness
My draft roguelike was too easy. A strong team won the cup two-thirds of the time, so winning meant nothing. Here is how I stopped guessing and tuned it to a real one-in-three with a few hundred simulated runs.
Fetching Free Player Faces for a Game Without Shipping the Wrong Human
I wanted real footballer photos on the cards in my draft game, free-licensed only. The fetch was easy. Not shipping the philosopher Socrates instead of the footballer was the hard part. Here is the pipeline and the disambiguation fix.
Solo Game Development: Trap or Actually Doable?
Everyone says solo game dev is impossible. Then you look at Stardew Valley. Here's the realistic breakdown of building games alone in 2025.