Meta-Progression
Meta-progression keeps part of the player's progress after a run ends. Each finished run pays out shards for how far the player got, and the shards buy permanent upgrades between runs. A run pays exactly once, a run that did nothing pays nothing, and every upgrade has a rising price and a top level.

Paste this to your AI
Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.
Add "Meta-Progression" to my game.
What it should do: Meta-progression turns a lost run into a step forward. The player always leaves with something, so failing feels like progress and each new run starts a little stronger.
Build it exactly as this state machine. First check that it fits my game, then build it like this:
```mermaid
stateDiagram-v2
[*] --> hub
hub: Between runs
run: Run going
summary: Run summary
hub --> run: starts a run
run --> summary: run ends and pays
summary --> hub: leaves the summary
summary --> run: starts another run
```
Use these starting values:
- baseReward: 3 shards
- scorePerShard: 100 points
- winMultiplier: 1.5 x
- abandonShare: 0.5 x
- baseCost: 10 shards
- costGrowth: 1.5 x
- maxLevel: 5 levels
- bonusPerLevel: 0.1 x
Watch out for these common mistakes:
- The end of a run is reported twice: Tell your AI: pay only when the game is in a run, and leave the run in the same step as paying, so a second report finds nothing to pay.
- Starting and quitting at once: Tell your AI: a run with no score pays nothing, and giving up keeps only a share of the reward.
- Buying in the middle of a run: Tell your AI: upgrades can only be bought in the hub or on the summary screen, and a run plays with what it started with.
- Upgrades that make more shards: Tell your AI: keep upgrades to strength and comfort, and if shard income must rise, give it a low top level.
- A fraction of a shard: Tell your AI: round the payout down and the price to a whole number, once, in one place.
- Everything bought too early: Tell your AI: let each level cost more than the one before and give every upgrade a top level.
Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
What it does
Meta-progression turns a lost run into a step forward. The player always leaves with something, so failing feels like progress and each new run starts a little stronger.
How it runs, as a diagram
Everything it can be in, and what moves it on. Your AI builds from exactly this.
How it runs, as a diagram
- Between runs → Run going: starts a run
- Run going → Run summary: run ends and pays
- Run summary → Between runs: leaves the summary
- Run summary → Run going: starts another run
Good starting values
| Value | Start with | What it changes |
|---|---|---|
| baseReward | 3 shards | What any run that scored something is worth before its score counts. It makes a short, bad run still pay a little. |
| scorePerShard | 100 points | How much score makes one more shard. A higher number makes shards rarer, so upgrades come slower. |
| winMultiplier | 1.5 x | Finishing the run pays this many times more. Keep it modest, or players stop caring about runs they do not finish. |
| abandonShare | 0.5 x | How much of the reward a player who gives up keeps. Below one, so quitting a bad run is never the best way to farm. |
| baseCost | 10 shards | The price of an upgrade's first level. At the default the first upgrade comes after about two ordinary runs. |
| costGrowth | 1.5 x | Each level costs this many times the one before. Rising prices spread the upgrades out; a flat price lets one upgrade swallow everything. |
| maxLevel | 5 levels | The top level of every upgrade. A top level keeps the strongest player from becoming unbeatable. |
| bonusPerLevel | 0.1 x | What one level adds, as a share of the starting strength. Five levels at the default make an upgrade half as strong again. |
What usually goes wrong
The end of a run is reported twice
A death animation, a quit button and a crash handler can all say the run is over. If each one pays, the player is paid two or three times.
Fix: Tell your AI: pay only when the game is in a run, and leave the run in the same step as paying, so a second report finds nothing to pay.
Starting and quitting at once
If a run pays a base amount, a player can start and quit again and again and collect it each time.
Fix: Tell your AI: a run with no score pays nothing, and giving up keeps only a share of the reward.
Buying in the middle of a run
An upgrade bought during a run changes the strength halfway, which feels unfair and is hard to test.
Fix: Tell your AI: upgrades can only be bought in the hub or on the summary screen, and a run plays with what it started with.
Upgrades that make more shards
An upgrade that raises the shard payout feeds on itself: the better the player is, the faster they get better. Early runs end up worth far less than late ones.
Fix: Tell your AI: keep upgrades to strength and comfort, and if shard income must rise, give it a low top level.
A fraction of a shard
Paying 7.5 shards leaves half a shard in the bank, and prices that are not whole numbers show up as 22.5 on screen.
Fix: Tell your AI: round the payout down and the price to a whole number, once, in one place.
Everything bought too early
With flat prices a lucky player has every upgrade in a few runs and the rest of the game has nothing to chase.
Fix: Tell your AI: let each level cost more than the one before and give every upgrade a top level.
How to check it works
- A run that scored 450 points, with the starting values. The player dies: The run pays 7 shards, 3 for the run and 4 for the score, the half shard is dropped, and the summary shows 7.
- A run that scored 450 points. The player finishes it: It pays 11 shards instead of 7.
- A run that scored 450 points. The player gives up: It pays 3 shards, half the reward rounded down.
- A run that has already ended and paid 7 shards. The end is reported again, as a death and as a win: The bank still holds 7 shards and the run count is still one.
- A run that scored nothing. It ends: It pays 0 shards, and a negative or broken score pays nothing too.
- 25 shards in the bank. The player buys the first level of an upgrade: The upgrade is at level 1, 15 shards are left, and its strength is 1.1 times the start.
- The starting prices. You look at the price of each level: The first five levels cost 10, 15, 23, 34 and 51 shards.
- 9 shards in the bank. The player tries to buy a 10 shard upgrade: Nothing is bought and nothing is spent.
- An upgrade with a top level of 2 and plenty of shards. The player buys it five times: It stops at level 2 and only two levels are paid for.
- A run in progress and plenty of shards. The player tries to buy an upgrade: Nothing is bought.
- An upgrade at level 1. The player plays and ends a whole run: The upgrade is still at level 1.
Works well with
- Currency Wallet: Shards are a second wallet that is never lost. Keep them apart from the money of a run, which is gone when the run ends.
- Shop (Buy and Sell): The between-run upgrade screen is a shop that only sells and never buys back. Use the shop for prices and the stock list.
- Skill Tree: A tree of permanent upgrades works well as the hub, if each run pays points toward it. Let the upgrades come first, then open the tree.
- Perk Choices: Perks picked inside a run are temporary and upgrades are permanent. Give them different looks so players do not mix them up.
Clashes with Dynamic Difficulty: Permanent upgrades make runs easier while the game that adapts makes them harder again, so the player gets stronger and nothing changes. Let one of them lead. Tune the adaptive part on top of a fixed upgrade level, or pause it while the player is below a few upgrades.
Common questions
what do i tell my ai to add meta-progression
Paste this: Add meta-progression: when a run ends, pay out shards from its score exactly once, bank them, and let the player spend them between runs on upgrades that stay for good. Each level costs more, and each upgrade has a top level.
what is the difference between meta-progression and experience levels
Experience levels grow a character inside one playthrough. Meta-progression grows the player's account across many runs, and it survives a run that ended badly.
should a failed run still give meta-progression rewards
Yes, that is the point. Pay out for how far the player got, and pay a little more for finishing. A run that scored nothing should still pay nothing.
how do i stop meta-progression from making the game too easy
Give every upgrade a top level, make each level cost more, and keep upgrades to strength rather than to earning more shards. Check the early runs still hurt.
Where it comes from
We could not find a reliable origin for this one yet.
What was checked
- 18 tests pass on the reference code.
- The state diagram was checked against the code, at the default values and at every listed low and high value.
Your AI gets the code
Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it