Running both games side by side
The Unity version is meant to be the web game, ported, and until this week nobody had checked that it plays the same. A new test runs both with the same level, the same squad and the same stream of random numbers, and compares them every frame. The first frame where anything differs is a bug in the port.
The result is good. All seven levels, all seven boss fights, seven of the eight operatives, two-player and four-player co-op and the finale match the web version frame for frame, for minutes at a time. A 66-run stress test (every level with every operative, plus ten weapon pairings) matched all 66 times, and the same comparison inside the real Unity game matched on all 89 frames compared.
It also found real bugs, which is the point. One character's special attack knocked enemies back by nothing, where the web game knocks them back. Six weapons' bullets started one to three pixels from where they start in the web game. A squad slot with no operative picked crashed the port.
Reviewing the merge
Four separate reviews (simulation, pictures, a line-by-line read for lost fixes, and speed) found no lost fix and two real problems.
Gamepad sticks never worked in the Unity build. The game asked Unity for stick axes the project had never defined, so the first read failed and every stick then read as zero. All 40 axes (four pads, ten each) are now defined, and a new check reads all 40: it fails 0 of 40 on the old settings and passes 40 of 40 on the new. Nobody has plugged in a real gamepad yet.
The reverb got slower once a sound ended. About a second after the last sound, the reverb's filters decayed into numbers so small that the processor handles them tens of times slower. On the audio thread that meant 21 ms of work per 21 ms block, which is where crackling starts. It now stays flat at about 5 ms, and the sound is unchanged to the last audible digit. This was measured in the test build, not yet in the Unity player.
None of the fixes changed a pixel or a simulation number. The game's own scenarios, run before and after, were identical: 21 level and boss traces, 42 rendered frames, 165 HUD scenarios and ten finale runs of 12,000 to 26,000 frames.
Honest numbers
The project keeps a scorecard of how much of "identical to the web version" has been proven, as opposed to how much work was done. It read about 25 percent before the comparison started, 62.8 percent after the first round and 60.3 percent after the second. Nothing got worse: the simulation score had been set 13 points above the ceiling its own rules allow, and the 10 points nothing supported were taken back.
There is also a real gap. The original web game's files were no longer on the machine in the second round, so nothing could be compared against it, and a future change could break something without the tests noticing.
Speed is the other open problem. Since the new lighting went in, a frame takes 1.5 to 1.8 times as long, and most levels run at 17 to 24 ms a frame against the 16.7 ms a steady 60 frames a second needs. The time goes to the light shafts, the glow around explosions and the layered backgrounds.
