Why does every idle game upgrade cost more? The exponential cost curve
An idle game cost curve is the rule that makes each upgrade cost a fixed percentage more than the last one. In Cookie Clicker that is 15% per purchase. Income grows in a straight line, but prices grow exponentially, so after enough buys the price always catches up. That is why you keep clicking.
What the game is doing
Cookie Clicker's own code has one number for this: Game.priceIncrease=1.15. The price of a building is its base price times that number, raised to how many you already own:
price = basePrice * 1.15 ^ amountOwned
The Cursor has a base price of 15. With the prices rounded up, five buys look like this:
- 15
- 18
- 20
- 23
- 27
- 31
Five buys later the price has doubled, because 1.15 to the power of 5 is about 2.01. Ten buys later it has about quadrupled. Nothing changed except the count.
Meanwhile each Cursor adds a fixed amount of cookies per second. Ten Cursors give ten times the income of one. That is a straight line. The price is a curve that bends up. Draw both on one chart and the red price line crosses the green income line.
Why it works
A straight line can never stay ahead of a curve that bends up. So the game can promise you that it will always slow down, and you can feel it coming. The first minutes are fast and exciting. Then each next upgrade takes a little longer to afford.
That slow-down is the loop. The wait between buys is the moment you think "just one more click". The game does not need to add new content to keep you busy. The maths does the pacing for it.
Without a cost curve, you would buy everything quickly and the game would be over. With a cost curve that is too steep, you would hit a wall in the first ten minutes and quit. The number is a dial between those two.
Real games that use it
- Cookie Clicker. The game's code is public in the browser. The main.js file holds
Game.priceIncrease=1.15and the price formula. You can read it yourself. Play the game at orteil.dashnet.org/cookieclicker. - AdVenture Capitalist. Anthony Pecorella's The Math of Idle Games, Part I uses the Lemonade Stand as its example, with a growth rate of 1.07 and a base cost of 4. He writes that idle games balance this by letting costs grow exponentially while production grows at a linear or polynomial rate.
Different games pick different numbers. The shape is the same.
How to use it in your game
The formula is one line. Keep the growth rate as one named number so you can change it fast:
const float GrowthRate = 1.15f;
float NextCost(float baseCost, int owned) {
return Mathf.Ceil(baseCost * Mathf.Pow(GrowthRate, owned));
}
Tips for tuning:
- Start with a rate between 1.05 and 1.25 and playtest. These are starting points, not rules. Small changes matter a lot: the price doubles after about 5 buys at 1.15 but after about 14 buys at 1.05.
- Change one number at a time. The growth rate, the base price and the income per unit all pull on each other.
- Make the wait visible. Show the player how long until the next buy. A curve they can see feels fair. A wall they cannot see feels like a trick.
- Give a way to reset the curve. Many idle games add a prestige system so the player can restart and climb the curve again with a bonus. Pecorella covers this in the same article series.
- Round prices. Show whole numbers. Players do not like 17.25 cookies.
Common mistakes: a growth rate so high the first upgrades are already out of reach, and flat income that never gets a boost, so the curve wins in the first few minutes.
FAQ
What is an exponential cost curve?
It is a price that is multiplied by the same number on every purchase, instead of getting the same amount added. At 15% per buy, the price doubles after about five buys.
Why do idle games get slower over time?
Their costs grow exponentially while income usually grows linearly or polynomially. Sooner or later, the cost curve outruns income, and every upgrade takes longer to afford.
What growth rate do idle games use?
It depends on the game. Cookie Clicker uses 1.15 for its buildings. AdVenture Capitalist's Lemonade Stand is 1.07 in Pecorella's example.
Related: Energy timer ยท Login streak