Guides / Behind the Scenes

How to Design an Idle Game: Formulas and Lessons From Shipping Four

What we learned designing and fixing four mobile games with idle progression: the curves that drive them, how to handle offline time and huge numbers, how to pay for prestige, and the bugs that only appear hundreds of stages in. Real formulas from our code.

An idle game looks simple from the outside: numbers go up. Underneath, it is a few curves racing each other, a clock and a reset. We have shipped four games built on that engine, Idle Ronin, Idle Summoner, Idle AI Factory and the Brain levels in Block Brain, and we have fixed the bugs that only show up after hundreds of hours of play. This is what we would tell ourselves on day one, with the real formulas from our code.

The core loop: earn, spend, earn faster

Every idle game runs the same loop. The player earns a resource, spends it on something that raises the earning rate, and earns faster. Three pressures keep that loop interesting: costs that grow faster than income, walls such as bosses that stop the player, and a reset that trades progress for a permanent multiplier. Our complete guide to idle games covers the loop from the player's side. Here we look at the numbers behind it.

Cost curves: exponential, but not forever the same

Upgrade costs in idle games grow exponentially: every level costs a fixed factor more than the one before. In Idle Ronin a unit's level cost grows by 14% per level up to level 300, then by 12.5% up to level 1000 and by 11.5% after that, so the curve gets a little gentler the longer someone plays. Idle AI Factory asks for 1.8 times as many coins for every factory level, and in Idle Summoner each step up the summon chain costs about 1.87 times the one before: 56, 105, 196, 367 gold and on.

Exponential costs alone make every upgrade feel the same. Two tools break that monotony:

  • Milestones. Idle AI Factory doubles a floor's production at floor levels 10, 25, 50, 75 and 100, so a floor at level 100 makes 32 times what it made at level 9. The player always has a visible target.
  • Visible leaps. Each monster in Idle Summoner hits about 1.7 times harder than the one before it, so a new monster feels like a jump, not like +3%.

Our article on idle game progression compares these curves with other games.

Walls: the curve that pushes back

The player's power grows with upgrades, and the game's challenge grows with stages. The gap between the two curves is your pacing. Idle Ronin's enemy health grows by 40% to 57% per stage early on, then by 14.5% per stage after stage 140, 15.5% after stage 500 and 15% after stage 1000. The boss at the end of each stage has 6 times normal health, and 10 times on stages ending in 4 or 9 from stage 14, so every fifth stage is a small wall.

Walls are where players decide to upgrade, to reset or to put the phone down, so place them where a clear answer exists. In Idle Ronin the answer is always within reach: a boss has 30 seconds, and a failed attempt sends the player back to farm, not back to the start.

Plan for big numbers from day one

Idle Ronin's enemy health curve against the largest float and double
Idle Ronin's enemy health curve against the largest float and double

Idle numbers outgrow ordinary number types. A 32-bit float tops out at about 3.4 x 10^38. Idle Ronin's enemy health passes 10^28 around stage 140, and the old code computed the curve in float, which overflowed to infinity at stage 316. Later stages collapsed to no health at all, and further up the calculation produced NaN, which froze progress around stage 1000.

The fix was to compute the whole curve in double and to switch to our own big-number type above stage 1000. It stores a value and a separate exponent, and it raises numbers to a power in logarithm space, so 1.15^9000 costs the same as 1.15^2. A double reaches about 1.8 x 10^308, which this curve would only pass near stage 4,750, but a custom type removes the question for good.

The lesson: pick a number type that can hold your whole curve before you ship, and test at stage 1000, not at stage 50. How to show those numbers is a separate design problem, covered in our guide to idle game notation.

Offline progress: measure, cap and clamp

Offline earnings are the genre's central promise, and three decisions shape them:

  • Measure the time correctly. Idle AI Factory's original code read the time away from a field that was only set when the app came back from the background. After a real restart it counted 1 second, so players who closed the game fully got almost nothing. The time is now measured from the saved quit time on every start.
  • Cap it. Idle Ronin counts up to 8 hours, Idle AI Factory starts at 2 hours and research raises that to 8, and Idle Summoner's welcome-back reward counts up to 24 hours. The cap decides how often you ask players to come back.
  • Clamp the rate. Idle AI Factory took its offline rate from the last truck trip: that trip's profit divided by its duration. It jumped with boosters, taps and short trips, so a player who left during a booster came back to a fortune. The rate is now kept between a slow trip, 5% of the current level's coins every 20 seconds, and a fast one, 15% every 8 seconds.

Also ignore very short breaks. Idle Ronin and Idle AI Factory both need 3 minutes away before they count anything, so switching apps does not throw up a reward screen. Our offline earnings guide compares the rules of many games.

Size rewards by progress, not by time

Free rewards such as login bonuses, quests, event tracks and drones need a size that stays fair from level 1 to level 300. Idle AI Factory first paid them as a number of seconds of income. Because each factory level costs 1.8 times the last, 40 minutes of income could be worth about 16 levels, and a single weekend event claim could hand out billions.

Now every free coin reward is a share of the coins the current level needs, where 1.0 is about ten truck trips at any stage, and the amount on the button is exactly what the player gets. If your rewards are measured in time, check what that time is worth at your highest level.

Prestige: pay for how far the player got

A reset only works if it clearly pays. Our three versions:

  • Idle AI Factory: from level 40, a Factory Reboot pays AI Cores = (2 x (level - 30)^1.35 + 2 x stars) x a factor of 1, 1.5 or 2 for the three factories. The power of 1.35 makes pushing further worth it without making a late reboot mandatory.
  • Idle Summoner: a rebirth from stage 50 turns your stage into player levels, each worth +1% damage for good, and higher levels bring class ranks that add summon chance.
  • Idle Ronin: a rebirth pays tokens that grow with your stage, and the game flags the rebirth button the moment you reach stage 50, because the first reset is the hardest one to take.

More on timing and formulas in our prestige guide.

Randomness with a safety net

Random rewards are exciting, and long streaks of bad luck are what make players quit. Each of our random systems has a guardrail:

  • Idle Summoner's summon chain falls from 98% to 6% per step, but every failure adds 1% to the next taps, up to +20%, until the player places or sells a monster.
  • Idle Ronin's featured unit has a 12% chance per Unit Core and is guaranteed within 30 cores.
  • Idle AI Factory's robot chests are only earned, never sold, and their odds are fixed in the code.

Our guide to drop rates and pity explains these guarantees from the player's side.

Tune curves to a real schedule

Design a curve backwards from how people will play it. Block Brain's Brain levels need round(19.7 x level^2.3) XP in total. The two constants came from a target: a player who plays about eight games a day should reach level 5 on day one, level 15 after about two weeks, level 30 after about two months and level 50 after about half a year. Picking the schedule first turns "is this too slow?" into a question you can answer.

Test the long tail

The bugs that hurt idle games most sit where testers rarely go:

  • Hundreds of stages in, where numbers overflow.
  • After a real restart, where the offline timer starts from nothing.
  • On phones in other languages. Code that writes a decimal number with the phone's own settings writes 7392,58 in much of Europe instead of 7392.58. In a game we are building, that one comma split a save string and shifted every value after it. Pinning number formatting to the invariant culture fixed it.
  • In features you assume work. When we reworked Idle Summoner, we found its cloud save had been switched off: the data was gathered and then thrown away, so the Save and Load buttons did nothing. Only pressing the button and checking the result shows that.

Build debug tools that jump to stage 1000, fake a week away and switch the language while the game runs. They pay for themselves on the first bug.

A checklist before you ship

  1. Write your cost, power and challenge curves down as formulas before you build the interface.
  2. Give the player a milestone or a visible leap every few minutes.
  3. Choose a number type that survives your highest stage, and test there.
  4. Measure offline time from a saved timestamp, cap it and clamp the rate.
  5. Size free rewards by current progress, not by time.
  6. Make the first prestige early and obviously worth it.
  7. Give every random system a pity rule.
  8. Tune to a target schedule, then test far beyond it.

You can see all of these systems at work in Idle Ronin, Idle Summoner, Idle AI Factory and Block Brain, all free on Google Play.

Sources

  • ONI Games game code, September 2026: Idle Ronin (PlayerDatabase.cs, Medal.cs, double_evrac.cs), Idle Summoner (monster_script.cs, cloudsave_script.cs), Idle AI Factory (Balance.cs, Economy.cs, SaveManager.cs), Block Brain (BrainProgress.cs).
  • Anthony Pecorella, The Math of Idle Games, Part I, Kongregate / Game Developer, 2016.

More guides

All guides

◆ More from ONI Games

More games

Swipe for more

Idle Ronin: Cyber RPG
Out now · Google Play

Idle Ronin: Cyber RPG

Step into a neon-soaked future as the last Cyber Ronin. Slash through waves of mechs, recruit a cyborg squad and climb the Neon Tower. Your blade keeps swinging even while you are offline.

Explore the game →
Idle Summoner: Pixel RPG
Out now · Google Play

Idle Summoner: Pixel RPG

Summon a legion of beasts, storm the castles of the underworld and rebirth stronger every time progress slows.

Explore the game →
Block Brain: Block Puzzle Game
Out now · Google Play

Block Brain: Block Puzzle Game

Fit colorful blocks, clear lines and chain combos while your Brain buddy grows from a tiny sprout into a crowned Mastermind.

Explore the game →
Idle AI Factory: Robot Tycoon
Out now · Google Play

Idle AI Factory: Robot Tycoon

Run a factory full of cheerful robots, automate every production line and grow from a small AI lab to a base on the Moon.

Explore the game →