What it does
There are two kinds of economy on one contract. In a business ladder, each business has its own unit price, payout and
cycle time and pays every cycle it completes, so the interesting choice is which one to buy next. In a mine, stages such
as a shaft, an elevator and a warehouse pass material along in series and only the final delivery is sold, so a slow
stage holds everything back; bottleneck() names it. Run manually, a business completes one cycle and stops, and a
manager keeps it restarting.
You drive it with commands: buy (one, a count or 'max'), start, manager, upgrade, advance and prestige.
Each returns whether it worked and why not, and a refused command changes nothing. Buying ten costs the sum of ten
individually priced units on a geometric curve, ownership milestones double a producer's payout, an equipment upgrade
triples it, and each prestige point adds 25 per cent production in the next run.
Every money value is an enormous decimal, held as a JSON-safe string, so costs can climb past any floating-point limit and saves stay readable. The economy never reads a clock: your game passes the seconds to advance, catch-up after a long absence is capped and computed directly rather than frame by frame, and anything over the cap is reported and earns nothing.
Features
- Business ladders — one to sixteen timed businesses with prices, cycles, milestones and ownership gates.
- Mine pipelines — two to sixteen serial stages, with the bottleneck named and hints that target it.
- Bulk buying — geometric bulk prices, rounded up, and the most you can afford, found by binary search.
- Managers, upgrades and milestones — automation, a threefold equipment upgrade and twofold milestone bonuses.
- Prestige — investor points from the run's earnings, with
prestigeGainto preview the reward before a reset. - Huge numbers — forty significant digits far beyond ordinary number limits, with costs rounded up and earnings rounded down.
- Capped catch-up — one second to eight hours per advance, reported, never paid beyond the cap.
- Seeded scenarios —
generateIncrementalfrom a seed, a kind, a difficulty, a business count and a currency scale. - Hints, undo and saves — a constructive
hintwith an explanation, undo and redo, snapshots and validated restore. - A solver —
solveIncrementalreplays legal commands to the objective, so a generated scenario is shown to be finishable.
Good for
- Idle business tycoons in the style of AdVenture Capitalist, with a ladder of businesses and managers.
- Idle mining games in the style of Idle Miner Tycoon, where the shaft, elevator and warehouse must keep pace.
- Short-session idle games with a target that finishes a run while investment can go on.
- A tycoon layer inside another game, driven by your own clock and drawn by your own interface.
- Balancing and testing, with seeded scenarios, a solver and deterministic replays.
Make it yours
Write your own IncrementalDefinition, with any producers, prices, growth rates, cycle times from a tenth of a second
to ten minutes, up to twenty milestones each, ownership gates, a target, a prestige base and a catch-up cap. Or generate
one: difficulty raises cost growth, ownership thresholds and run targets; the seed changes payback choices, cycle mixes,
milestone spacing and, in a mine, which stage starts as the bottleneck; and magnitude scales every amount by up to ten
to the power of a million.
Two different uses: a six-business ladder on hard difficulty with prices in the trillions and a prestige loop for long-term play; and a three-stage mine on easy, where the whole game is spotting the slow stage and upgrading it.
A quick look
A generated mine, started and advanced five seconds:
const definition = game.incremental.generateIncremental({ seed: 29, kind: 'mine', difficulty: 'medium', magnitude: 400 });
const economy = game.incremental.createIncremental(definition);
economy.apply({ kind: 'start', id: 'shaft' });
economy.apply({ kind: 'start', id: 'elevator' });
economy.apply({ kind: 'start', id: 'warehouse' });
economy.apply({ kind: 'advance', seconds: 5 });
const weakStage = economy.bottleneck();
Works with
large-number— required; the enormous decimal arithmetic under every price and balance.save— to keep a run's snapshot between visits.uiandbars— buttons, panels and progress bars for the producers.jobs— for workers who are assigned to jobs, which this pack does not model.
Good to know
- Precision is forty significant digits, not every digit of the currency exact.
- A mine is a fluid pipeline: there is no worker travel, conveyor routing or crafting recipe.
- There are no worker needs, customers, general transport networks, ads or premium currencies.
- The hint is a sensible heuristic, not an optimal strategy, and a solved scenario is not a difficulty rating.
- A save is game state, not proof that a score was honestly earned.






