Skip to content

For developers

How to Make an Incremental Game: 14 Steps, Each Taught by a Real Open-Source Game

How to make an incremental game in 14 steps, from the first button to launch, each backed by a real open-source game, library or postmortem you can read.

An incremental game needs surprisingly little to work: a number, a way to make it go up, something to spend it on that makes it go up faster, and a reason to keep going when it slows down. Cookie Clicker's first version was coded in one night. The hard parts come later: numbers past 1e308, offline time, pacing, balance and saves. This guide walks through those fourteen steps in the order you will meet them.

Every step points to something real you can read: the source of an open-source game that solved it, a library, or a postmortem by a developer who learned it the hard way. Most of the games are free and on GitHub, and our open-source incremental games list has many more. Two entries are ours and labelled: the maintainer's own Godot game and this site's free listing for developers.

02

Prototype in plain HTML and JavaScript: best for your first playable build in an afternoon

Platform: Browser, Mobile · free

A browser prototype needs a button, a counter and a timer that adds to it. A Dark Room by Doublespeak Games is the best real codebase to learn from: it is plain JavaScript, MPL-2.0 licensed, has more than 8,000 stars on GitHub, and it is built around revealing one new button at a time, which is exactly the structure your prototype needs.

Read how it stores state in one place and renders from it. That separation, data first and display second, is what makes everything later (saves, offline time, balancing) manageable. Pedro Furtado's postmortem of his first incremental makes the same point: separating the game's definition from its execution made debugging and reuse easier.

Watch out for: Do not start with art. A grey button that is fun to press beats a beautiful one that is not, and you will redo the UI several times.

03

Or start from The Modding Tree: best for prestige-layer games with almost no setup

Platform: JavaScript template, free, on GitHub

The Modding Tree by Acamaeda is a template for making games like The Prestige Tree: its GitHub description is 'Create your own tree (or non-tree) of prestige upgrades!' You define layers, upgrades, milestones, buyables and challenges in config files, and it handles the UI, saving and the tree. The getting-started tutorial walks you from forking the repository to editing mod.js and reloading index.html.

Hundreds of community games are built on it, and our Modding Tree games list shows the range. If your idea is mostly numbers and layers, this is the fastest way to something playable and shareable. Our Modding Tree tutorial goes further.

Watch out for: Tree games look alike. If you build on it, change the layout and theme early, or players will assume yours is another reskin.

04 · Ours

Or use a game engine if you are headed to Steam: Mushies! in Godot: best for pixel-art incrementals bound for Steam

Platform: Browser, Steam

Mushies! is the site maintainer's own game, built in Godot, so read this entry as a case study rather than a neutral pick. It is a cozy pixel-art clicker about a mushroom village with worker shrooms, buildings whose placement affects output, and a RESHROOM prestige loop. Godot exports to desktop for Steam and to HTML5 for itch.io, which is how one project ships both an upcoming Steam game and a free browser demo.

Pick an engine over plain JavaScript when you want animation, controller support, audio mixing and desktop builds without assembling them yourself. Unity and Godot are the common choices; our engines guide compares them for idle games specifically.

Watch out for: Engine web exports are heavier than plain JavaScript and load slower on phones. Test the browser build on a cheap device before posting it.

05

Plan for numbers past 1e308 with break_infinity.js: best for any game that will outgrow a double

Platform: JavaScript library, MIT, with a C# port for Unity

JavaScript numbers top out near 1.8e308. Incrementals hit that faster than you would expect. break_infinity.js by Patashu is the standard fix: its README describes it as a replacement for decimal.js 'for incremental games which need to deal with very large numbers (bigger in magnitude than 1e308, up to as much as 1e9e15) and want to prioritize speed over accuracy'. Antimatter Dimensions lists it as a dependency.

If you need even bigger numbers, its sequel break_eternity.js goes to towers of exponents, and a C# port, BreakInfinity.cs, exists for Unity. Decide before you write your economy: switching number types later means touching every formula. Our big number libraries guide compares the options.

Watch out for: These libraries trade accuracy for speed. Do not use them for anything that must be exact, such as real-money values or tiny differences between large numbers.

06

Run on a time-based tick and simulate offline time: best for making progress fair when the tab is hidden

Platform: Browser, Steam, Mobile · free

Never add a fixed amount per frame. Browsers throttle hidden tabs, so production must be based on real elapsed time. Store a timestamp, and each tick multiply production by the seconds since the last one. When the player returns after hours away, you need to catch up.

Antimatter Dimensions shows the full version in its MIT-licensed source: a simulateTime function replays the time away as a limited number of ticks (players can choose how many in the options), then shows a modal summarising what happened. Simulating is accurate but slow; a closed-form formula is fast but only works for simple economies. Our offline progress guide covers both.

Watch out for: Cap or compress very long absences. Simulating a week tick by tick can freeze a browser for minutes.

07

Price things with an exponential cost formula: best for your first balance pass

Platform: Game Developer article, free

Anthony Pecorella's 'The Math of Idle Games, Part I', written while he ran browser games at Kongregate, gives the formula nearly every idle game uses: the next cost equals the base cost times the growth rate raised to the number already owned. AdVenture Capitalist's Lemonade Stand uses a growth rate of 1.07. Cookie Clicker's buildings go up 15% each, per its wiki.

Production grows linearly with the number owned while cost grows exponentially, so each generator naturally runs out of steam. That is your pacing engine. Pecorella also shows milestones, such as AdVenture Capitalist's x2 bonuses at 25 and 50 owned, as a way to give players a target. Our cost formula guide has worked examples.

Watch out for: Small changes to the growth rate have huge effects 100 purchases in. Change one number at a time and re-simulate.

08

Reveal the game one panel at a time: best for keeping the first ten minutes surprising

Platform: Browser · free

Incremental games are partly about discovery. Candy Box 2 by aniwey, open source on GitHub, starts with a candy counter and a few actions and keeps adding: a merchant, a map, quests, spells. Each new thing appears only once the player can use it, so the screen is never overwhelming and every unlock is a small event.

Furtado's postmortem puts it plainly: 'A lot of the fun of incremental games is based on discovery.' Gate each new system behind a resource threshold, show it the moment it unlocks, and keep a list of what is visible in your save data. Our onboarding guide shows how other games teach.

Watch out for: Hidden content needs a hint. If players do not know something is coming, many will quit just before it appears.

09

Add prestige when growth stalls: best for deciding your first reset formula

Platform: Browser · free

Prestige is what turns a two-hour game into a two-month one. The question is how much currency a reset gives. Pecorella's Part III compares real formulas: AdVenture Capitalist uses the square root of lifetime earnings, Cookie Clicker the cube root, and Egg, Inc. roughly a 1/7 power of earnings since the last reset. The lower the exponent, the more each doubling costs.

The Prestige Tree by Jacorb90 is the best place to study many layers at once: each node is its own reset with its own currency. Our prestige system examples guide breaks down ten real designs.

Watch out for: Make the first reset obviously worth it. If the player's second run is not visibly faster within minutes, they will think prestige is a punishment.

10

Format numbers with a notation library: best for readable numbers from 1,000 to 1e1000

Platform: JavaScript library, MIT, on GitHub

Players read your numbers more than anything else on screen. Suffixes (K, M, B, T) work to about 1e33, then scientific or engineering notation takes over. The Antimatter Dimensions team publishes its notations as a separate MIT-licensed library, the same one the game uses for scientific, engineering, letters, logarithm and its many joke notations.

Whatever you use, give players a setting. Long-time players almost always switch to scientific; new players read 1.5M more easily than 1.5e6. Keep the same notation everywhere, including tooltips and offline summaries.

Watch out for: Mixed notation across screens is a common bug. Route every displayed number through one formatting function.

11

Save often, and let players export: best for never losing a player's month of progress

Platform: Browser, Mobile · free

Save to localStorage every few seconds and on page unload, and add an export and import option that turns the save into a string. Swarm Simulator, open source on GitHub, does exactly this: its page explains that progress is stored in cookies or localStorage and can be exported and imported from the options screen, and it greets returning players with what the swarm produced while they were away.

Export strings save you from support requests when players clear their browser, switch machines, or report bugs. Version your save format from day one so you can migrate old saves. Our save system guide goes into cloud saves too.

Watch out for: Browsers can clear localStorage for sites that are not visited often, and Safari is stricter than most. Remind players to export.

12

Automate your balancing early: best for avoiding months of manual tweaking

Platform: Postmortem on Game Developer, free

Pedro Furtado's 'Lessons of my first incremental game' (2018) is honest about what went wrong. His first lesson: balancing is hard, and automating it should start from the beginning. Without it, every new piece of content meant estimating clear times by hand. His 'biggest mistake' was not setting a deadline, and he found his design allowed only two of three goals: long play time, enough content, and fun.

In practice, write a small script or spreadsheet that simulates a player buying the best-value item each second, and plot time to each unlock. Pecorella's series includes a spreadsheet model for exactly this. Rerun it every time you change a number.

Watch out for: Simulated players are greedy and perfect. Real players are slower, so treat simulated times as a lower bound.

13

Playtest in public and launch on the community sites: best for your first hundred real players

Platform: galaxy.click, itch.io, r/incremental_games, all free

Incremental players are generous with feedback. galaxy.click is a site built for idle and incremental games, with ratings, favourites and comments on every game; itch.io has busy idle and incremental tags; and r/incremental_games has a long tradition of feedback threads. Post an early build, read every comment, and fix the obvious bugs first.

Gamex Studio's postmortem of War Clicks shows why. A beta on Kongregate gave them valuable feedback, an under-tested update hurt their ratings, and their Kongregate rating took fixes to climb from 3.2 to above 3.9. Ratings drive discovery on every portal, so a rough launch is hard to recover from. Our where to post guide and sites comparison cover every option.

Watch out for: Ratings are sticky. Post a 'beta' build clearly labelled as such before your real launch, so early bugs do not define the game.

14 · Ours

List it on IncrementalGames.org: best for being findable by genre fans after launch

Platform: Free listing and claims; optional Get featured from $30 a week

This one is ours. IncrementalGames.org is a hand-tagged directory of incremental, idle and clicker games, and listing a game is free: submit it, or claim it if it is already in the catalog, from the developers page. Each game gets a profile with its tags, platforms, offline and prestige details, and can appear in lists like free browser incrementals and in games-like pages.

If you want more visibility, the optional paid Get featured placement puts a labelled Featured card on the home page, game pages and best-of lists, from $30 a week. Every sponsored card is labelled, and payment does not affect a game's catalog score or its order in lists, per the editorial policy.

Watch out for: A listing helps people find a finished game; it will not fix one that is not ready. Launch your playtest on the community sites first.

How to choose your path

You do not need all fourteen steps on day one. Pick a path by what you are making.

01

Match it to your idea

Mostly numbers and layers: start from The Modding Tree. A story or reveal: plain JavaScript, studying A Dark Room and Candy Box 2. Animation, audio and controller support: an engine like Godot or Unity. The engines guide has the trade-offs.

02

Match it to your platform

Browser first means galaxy.click, itch.io and a free game, which is how most of the genre's classics started. Steam means a desktop build, a store page and wishlists; our Steam marketing guide covers that. Mobile means touch UI and, usually, a monetisation decision; see monetization examples.

03

Match it to your time

A weekend: one loop, one prestige, a save and an export. A month: offline progress, notation settings, a balancing script and a public beta. Furtado's advice holds: set a deadline, and cut scope to meet it.

Ship the first button this weekend

Write your loop sentence, make a counter that goes up with real elapsed time, add one thing to buy, and save it. That is an incremental game. Everything else on this page is something you add once that is fun.

When it is ready for players, list it free on IncrementalGames.org so genre fans can find it; if you want extra visibility at launch, Get featured adds a labelled Featured card from $30 a week.

List your game free →

Common questions

What is the easiest way to make an incremental game?

Start from The Modding Tree, a free JavaScript template on GitHub, or a single HTML file with a button, a counter and a timer. Both run in a browser with no build step and can be shared on GitHub Pages, itch.io or galaxy.click.

What programming language are incremental games made in?

Most browser incrementals are JavaScript or TypeScript, often with Vue or plain DOM code. Steam and mobile idlers are commonly made in Unity (C#) or Godot (GDScript or C#). The genre's math is simple enough that any language works.

How do idle games handle very large numbers?

With a big-number library such as break_infinity.js or break_eternity.js in JavaScript, or BreakInfinity.cs in Unity. These store a mantissa and an exponent so values can go far past the 1.8e308 limit of a standard double.

How long does it take to make an incremental game?

A small one can be playable in a weekend; Cookie Clicker's first version took one night. A polished game with prestige layers, offline progress and balancing usually takes months. Setting a deadline early, as Pedro Furtado recommends, keeps scope in check.

Where can I post my incremental game?

galaxy.click, itch.io, r/incremental_games and Steam are the main places, and you can list it free on IncrementalGames.org. Our where to post guide compares them.

Sources