UYLLII

Blog › Game design

Game design

Balancing 2,775 skill combinations: how the Forge in Wrecking Ball was tamed

By David4 min read
Wrecking Ball feature graphic

The Forge is the feature I was most excited about in Wrecking Ball, and the one most likely to break it. Take any two ball skills that have reached level 5 in the workshop and fuse them into one: a single slot that does both. Explosive plus Burning. Chain lightning plus Poison. Prism plus Demolition.

With 75 skills, that's 2,775 possible pairs. No person can test 2,775 combinations. So the Forge was balanced the way everything else in this game is: by simulation, with the numbers written down.

The rules

Every one of the 2,775 pairs has its own name, in all 12 languages, generated in one batch and checked by a script for uniqueness, length and a blocklist. Each forged card is drawn in code: the two parents' cards cut diagonally, half each.

215 signature forges

Most pairs simply do both parents' effects. 215 of them are signature forges with a twist of their own, built from 47 twist types:

Each twist scales with the forged level and has its own cap, and the tests check that every twist actually changes the shot.

The baseline: weaker parent, slightly boosted

A forged slot's balls take the weaker parent's power factor ×1.15, and all their damage is ×0.85. Both mechanics already stack (a ball that explodes and burns gets value from both), so a forge doesn't need much on top. That rule alone kept most pairs sensible.

Most, not all.

Finding the runaways

A tool plays every pair at level 80 and compares it with the best single skill. Any pair over 1.3× that line is a runaway. Then, because deep boards break by cascades and level 80 saturates, a second tool takes each runaway to level 140 and bisects for the cap that brings it back in line.

The caps scale everything a pair does: its damage, blasts, chains, damage floor and Acid's health cut included. The final result: 71 of the 2,775 pairs are capped, with a median cap of 0.69. Ten pairs are capped below 0.1, mostly Acid pairs: Acid's cut to maximum health ignores depth, so paired with anything that hits often, it runs away by level 140.

The bug the Forge found: 400 hits a second

The most valuable thing the Forge simulation did was find a bug that had nothing to do with forging.

When I first ran the forged builds, every run hit the simulator's level-160 limit. Some pairs were doing absurd damage, and they weren't the ones I'd expected. The cause was hit floods: balls embedded inside bricks were hitting them on every physics step, 400 times a second. Different skills got there in different ways:

Forged pairs made it obvious, because a pass-through ball touching a new brick every few steps also fired its partner's area effect every time.

The fix:

Nine skills that had quietly relied on floods were refit. Afterwards, the strongest pair fell from ×80 a plain ball to ×63, and the median pair from ×5.3 to ×3.4. One maxed run in four reaches the simulator's limit, not every run, which is where a game about breaking the game should be.

What I'd tell anyone adding combinations

  1. Count the combinations before you design them. Pairs grow with the square of the list. 75 skills is 2,775 pairs, and 100 would be 4,950.
  2. Balance the rule, then cap the exceptions. A simple baseline (weaker parent, small bonus) handles almost everything, and a measured cap list handles the rest.
  3. Test relative to your best single option, not against a fixed number, so the line moves when the game changes.
  4. Your strongest combinations are a bug detector. If something is wildly over, look at what the ball is physically doing before touching the numbers.