GAME DESIGN KING

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:

  1. 15
  2. 18
  3. 20
  4. 23
  5. 27
  6. 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

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:

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