Under the hood

Formulas & equations

The math the game actually runs, taken from the source code and data. Use the calculators to plan upgrades and prestige runs.

// Production

Each tick lasts \(\Delta t = 0.2\,\text{s}\). A node with capacity \(C\) (sets per second) and inputs \(i\), each with demand \(d_i\) per set and stored amount \(s_i\), runs:

$$\text{sets} = \min\!\Big(\min_i \frac{s_i}{d_i},\; C\cdot\Delta t\Big)\qquad(\text{0 if any } s_i < d_i)$$
$$\text{output} = o \cdot \text{sets} \cdot M,\qquad M = \frac{H_{\text{mult}}}{1 + \text{bugs}}$$

\(o\) is the output amount per set, \(H_{\text{mult}}\) is the heat multiplier, and bugs is the number of bugs on that node. Each input consumes \(d_i \cdot \text{sets}\).

In rate terms (what the tooltip shows):

$$\text{throughput/s} = o \cdot \min\!\Big(\min_i \frac{\text{in}_i}{d_i},\; C\cdot M\Big)\qquad \text{demand}_i = d_i \cdot C \cdot M$$

When one output feeds several consumers, consumer \(k\) receives a share proportional to its demand:

$$\text{share}_k = \frac{\text{demand}_k}{\sum_j \text{demand}_j}$$

ProductionNode.cs · PortProduction.cs · NodePort.cs

// Rate stat (capacity)

A node's capacity is a stat built up from its base value \(b\), its upgrade stage \(n\) (starts at 1, +1 per purchase) and modifiers from the Matrix and skills:

$$C = \Big(b \cdot n \cdot a^{\lfloor n / I \rfloor} + \text{flat}\Big)\cdot\Big(1 + \frac{\sum \%}{100}\Big)\cdot \prod \text{mult} \cdot P$$

\(a, I\) = auto-scale multiplier and interval (Power 1.2 / 30, Training Crawler 1.25 / 100, NLP Preprocessor 1.1 / 50; others have none). \(\sum\%\) = additive percent bonuses (Matrix items). \(P = 1 + \text{chips}/150\) is the prestige bonus.

So upgrades are linear (level 10 = 10× base), Matrix bonuses stack additively, and prestige multiplies everything.

SkillTree System/Stat.cs

// Upgrade & slot costs

The cost of rate upgrade level \(n\), with base cost \(c_0\) and growth \(g\) (1.07 or 1.13 for rates, 1.5 for sell prices):

$$\text{cost}(n) = c_0 \cdot g^{\,n}$$

Buying \(k\) levels at once starting at level \(n\) (the ×10 / ×100 / Max buttons) is a geometric sum:

$$\text{total} = c_0 g^{n}\cdot\frac{g^{k}-1}{g-1}$$

A new node slot, when you already own \(m\) slots of that type (growth \(g=10\), power \(p\) between 2 and 3.5):

$$\text{slot cost} = c_0 \cdot g^{\,m\cdot p}$$

Example: the second Training Crawler costs \(175 \cdot 10^{1\cdot 2} = 17{,}500\) RP. All costs are rounded.

SkillNodeData.cs · SkillTreeLayoutNode.cs

// Split, Union & Market

$$\text{Split: } A = \text{in}\cdot f,\quad B = \text{in}\cdot(1-f)\qquad \text{Union: } \text{out} = \sum \text{in}_j$$
$$\text{Market: } \text{money} = \big\lfloor \text{price} \cdot \lfloor \text{stored}\rfloor \big\rfloor,\qquad \text{price} = p_0\,(1 + \text{sell level}),\ \text{sell level} \le 5$$

\(f\) is the Split slider (default 0.5). The Market sells whole units each tick, and prices max out at \(6p_0\).

SplitNode.cs · UnionNode.cs · Market.cs

// Heat

The factory temperature \(T\) (°C, ambient 24) changes each tick with the total heat \(H\) from nodes, fans and bugs:

$$\frac{dT}{dt} = \frac{H}{100} - 0.1\,(T - 24),\qquad T \ge -272.9999$$
$$T_{\text{eq}} = 24 + \frac{H}{10}\qquad(\text{time constant} \approx 10\,\text{s})$$

A node's own heat moves toward its heat cost \(h\) while producing and toward 0 while idle, at \(0.5\,|h|\) per second. Fan heat per fan:

$$h_{\text{fan}} = -4 \cdot n \cdot 1.5^{\lfloor n/20\rfloor}$$
Temperature\(H_{\text{mult}}\)State

HeatStat.cs · NodeData.cs · CoolantNode.cs

// Bugs & cannons

$$\text{spawn interval} = 60\,\text{s} \times U(0.8, 1.2)\quad(300\,\text{s unfocused}),\qquad \text{max } 5$$
$$\text{kill reward} = \max\!\big(1,\ \lfloor \text{Money/s} \times 10 \times U(0.8,1.2)\rfloor\big)$$
$$\text{cannon cooldown} = \frac{1}{\max(\text{fire rate}, 0.01)}\,\text{s},\qquad r = r_0\,(1 + 0.01\cdot\text{range})$$

Fire rate starts at 1 shot/s and each upgrade adds +1. Range starts at 1 and each upgrade adds +1 (+1% radius). Cannon slot \(m\) costs \(\$2\times10^{5}\cdot 2.5^{2m}\).

Bug.cs · AntimalwareCannonNode.cs

// Matrix

$$\text{cell cost} = \$10^{6}\cdot 4^{\,(\text{unlocked} - 18)}$$
$$\text{randomize cost} = e_0 \cdot 1.07^{\,s},\qquad \text{bonus}\,\% = \big\lfloor \text{Beta}(\max(1,s-20),\ s+20,\ \text{mode}=s)\big\rfloor$$
$$\text{reshape cost} = h_0 \cdot 1.07^{\,\ell}\ \text{RP},\qquad \text{cells} \approx \text{Beta}\big(1,\ \max(1, 16 - \ell/20),\ \text{mode}=\max(1, 7 - \ell/40)\big) \pm 1$$

\(s\) = number of randomize rolls on that item, \(\ell\) = shape level. Shapes are clamped to 3–16 cells until level 15, then 1–16 cells.

MatrixController.cs · MatrixItemData.cs · ItemShapeUtility.cs

// Models

$$\text{Research/s} = R_0 \cdot g^{\,L-1} \cdot P$$
$$\text{requirement}(L) = q_0 \cdot g_q^{\,L - L_{\text{from}} - 1}$$

\(R_0, g\) = base reward and growth. \(q_0, g_q\) = base requirement and requirement growth. \(L_{\text{from}}\) = the level where that requirement starts. See the model table.

ModelSystem/*

// Prestige

$$\text{chips} = \Big\lfloor 150\cdot\Big(\frac{\text{lifetime \$}}{10^{9}}\Big)^{0.43} \Big\rfloor - \text{chips earned}$$
$$\text{\$ needed for } N \text{ chips} = 10^{9}\cdot\Big(\frac{N}{150}\Big)^{1/0.43},\qquad P = 1 + \frac{\text{chips owned}}{150}$$

PrestigeManger.cs · PrestigeStat.cs

// Offline earnings

$$\text{reward}_r = \text{rate}_r \cdot \min\big(t_{\text{away}},\ 60\cdot \text{Offline Time}\big),\qquad \text{Offline Time} = 20\,n \text{ min}$$

SessionController.cs

// Calculators

Node throughput

Upgrade cost

Base costs are listed on each node card under Costs & scaling.

Heat equilibrium

Add up the Heat value of every working node.

Prestige planner

Scientific notation works, e.g. 2.5e12.

↑