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 = H_{\text{mult}} \cdot 0.75^{\,\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 (the milestone: \(a = 2\), \(I = 25\) for every rate stat). \(\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.1 or 1.12 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 = 5\), or 32 / 16 / 43 for Data Stream / Power / Edge Node; power \(p = 1\)):

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

Each node card lists \(c_0\) and the next slot price. 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 + 0.2\cdot\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 \(2p_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}} = -30 \cdot n$$
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(\text{paused when unfocused}),\qquad \text{max } 3$$
$$\text{kill reward} = \max\!\big(1,\ \lfloor \text{Money/s} \times 30 \times U(0.8,1.2) \times (1 + 0.25\,\text{streak}) \times c\rfloor\big)$$

\(\text{streak} \le 4\) counts clicks within 12 s of each other; \(c = 0.5\) for cannon kills, otherwise 1.

$$\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 \(\$1.3\times10^{4}\cdot 3^{m}\).

Bug.cs · AntimalwareCannonNode.cs

// Matrix

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

\(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 \$}}{2\times10^{9}}\Big)^{0.35} \Big\rfloor - \text{chips earned}$$
$$\text{\$ needed for } N \text{ chips} = 2\times10^{9}\cdot\Big(\frac{N}{150}\Big)^{1/0.35},\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} = 120\,n \text{ min},\ n \le 6$$

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.

↑