Cost scaling
Cost scaling describes how an item's next price changes as the player buys more of it.
Cost scaling describes how an item’s next price changes with the number already owned. The examples read here range from a fixed addition to a fixed multiplier, a power of the count, a changing multiplier, and jumps after fixed-size sets1,2,3,4,5.
#Forms in the games read here
| Form | Price rule | Example |
|---|---|---|
| Fixed step | A Dark Room huts add 50 wood per hut; traps add 101,6 | |
| Fixed ratio | Cookie Clicker multiplies each building’s price by 1.15 per one owned2 | |
| Power of count | Universal Paperclips prices Harvester and Wire Drones by the count’s power3 | |
| Changing ratio | the multiplier falls as count rises | Universal Paperclips’ factories use a lower multiplier at higher counts4 |
| Stepped | flat within each set, then multiplied | Antimatter Dimensions changes a dimension’s price after each set of 105 |
These forms can share one game or item family. Universal Paperclips uses a power of count for drones and a changing multiplier for factories3,4. Exponential cost scaling covers multiplier-based curves in more detail, including ratios that rise after a threshold; linear cost scaling covers fixed-step prices.
#Caps and batch prices
A purchase limit can end a price curve before its next price matters. A Dark Room stops hut and trap purchases at their item maxima7.
Bulk buying adds another rule: the displayed or charged batch price may sum each unit’s price, or use a different amount. Cookie Clicker displays a rounded geometric sum but charges each unit in turn8,9. Bulk buying compares those rules.
References
- ^ abA hut costs wood, with already built, up to 20 huts (11,500 wood for all 20).Verifieddoublespeakgames/adarkroom
How we know
54 'wood': 100 + (n * 50)script/room.js lines 43–58 at 1fada46 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^ abA building's next price is , with discounts applied before rounding.VerifiedCookie Clicker main.js v2.058 · Cookie Clicker Wiki, “Building”
How we know
var price=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,this.amount-this.free));
main.js#L8090-L8095 · archived copy ↗ \text {Price} = \text {Base cost} \times 1.15 ^ {M-F}
Building Prices · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^ abcHarvester and Wire Drones are priced by a power of the count, not a ratio: with owned, the next costs clips.CodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
var harvesterCost = 1000000;
globals.js#L79-L80 · archived copy ↗ harvesterCost = Math.pow((harvesterLevel+1),2.25)*1000000;
main.js#L2460-L2468 · archived copy ↗ wireDroneCost = Math.pow((wireDroneLevel+1),2.25)*1000000;
main.js#L2491 · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abcClip factories start at 10⁸ clips, and each one built multiplies the next price by a factor that falls: ×10, ×9, … ×4 for the 1st–7th, ×2 for the 8th–12th, ×1.5 for the 13th–19th, ×1.25 for the 20th–38th, ×1.15 for the 39th–78th, and ×1.1 after.CodeUniversal Paperclips globals.js · Universal Paperclips main.js
How we know
var factoryCost = 100000000;
globals.js#L78 · archived copy ↗ fcmod = 11 - factoryLevel; … factoryCost = factoryCost * fcmod;
main.js#L2419-L2456 · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abA dimension's price is : flat for each set of 10, then a jump;
costBumpsmoves only in Normal Challenge 9 and Infinity Challenge 5.VerifiedIvarK/AntimatterDimensionsSourceCodeHow we know
363 return this.costScale.calculateCost(Math.floor(this.bought / 10) + this.costBumps);src/core/dimensions/antimatter-dimension.js lines 359–364 at 5409e32 · upstream ↗ src/core/dimensions/antimatter-dimension.js#L544-L566 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^A trap costs wood, and at most 10 can be built.Verifieddoublespeakgames/adarkroom
How we know
24 'wood': 10 + (n * 10)script/room.js lines 13–28 at 1fada46 · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^The build action does nothing at the item's maximum count, so the cap, not the price, ends each building's run.Codedoublespeakgames/adarkroom
How we know
1025 if (craftable.maximum <= numThings) {script/room.js lines 1025–1027 at 1fada46 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^The shown bulk price (
getSumPrice) is the geometric sum , discounted and rounded up once: 20.30× the next single price for 10, and 7.83 million× for 100.VerifiedCookie Clicker main.js v2.058 · Pecorella 2016 · Cookie Clicker Wiki, “Building”How we know
price+=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,i-this.free));
main.js#L8096-L8105 · archived copy ↗ $cost = b * \frac{r^k(r^n-1)}{r-1}$
“BONUS CONTENT!” · archived copy ↗ \text {Price of Buy 10} = \text {Price} \times 20.303718238
Building Prices · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
- ^
buy()charges each unit's rounded-up price in turn and ignores the shown total: 10 Grandmas from zero cost 2,035, not 2,031, and 2,030 cookies still buy 9.VerifiedCookie Clicker main.js v2.058How we know
if (Game.cookies>=price)
main.js#L8125-L8152 · archived copy ↗ Game.ObjectsById[what].buy();
main.js#L8898-L8901 · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
The numbers come from the run; its author, an AI model, checked the script measures what the claim says, 2026-10-20.
Checked by a second AI model, 2026-10-27.
Sources
Code
- games), Michael Townsend (doublespeak and A Dark Room contributors. 2025. “A Dark Room source code.” Commit 1fada46. doublespeakgames/adarkroom @ 1fada46 · licence, all uses
- Lantz, Frank. 2022. “Universal Paperclips, globals.js (Wayback capture of 6 January 2022).” Version the version captured 2022-01-06 and 2022-04-02. original · archived · licence, all uses
- Lantz, Frank. 2022. “Universal Paperclips, main.js (Wayback capture of 5 January 2022).” Version the version captured 2020-11-12 through 2022-01-05. original · archived · licence, all uses
- Kerajärvi), Hevipelle (Ivar and Antimatter Dimensions contributors. 2026. “Antimatter Dimensions source code.” Commit 5409e32. IvarK/AntimatterDimensionsSourceCode @ 5409e32 · licence, all uses
Primary
- Pecorella, Anthony. 2016. “The Math of Idle Games, Part I.” Kongregate Developers Blog. Kongregate. original · archived · licence, all uses