Fixed: the game got slower with every minute of flight. A bug in Phaser created new bookkeeping data every time the graphics program switched and never cleaned it up, around 20 entries per frame. Every cleanup searched the whole list, so frame time grew with flight time, by roughly 1.7 ms per minute at 30 frames. That explains why long runs felt sluggish compared to the start. The bug is now caught: the connections are fetched once per program and kept.
Smoother in combat.
- The wreck backdrops computed negative frame numbers and triggered five console warnings per frame. Fixed.
- Rocks outside the screen no longer get a 3D mesh, and for the rest the face order and lighting are computed once per corner instead of once per face.
- The layers draw their children without flipping alpha back and forth, identical frame for frame.
- Explosion particles are sorted in one pass, normally blended ones before the glowing ones. That saves blend mode switches and therefore draw calls.
- Together, the simplest of these steps took the Orbit from 16.4 to 12.4 ms per frame in the laptop-speed test run and from 23.7 to 18.0 ms at phone speed. In a hard fight with 60 enemies and three tracked contracts, the per-frame compute time dropped from about 1.9 to 1.6 ms.