4.09
Apple TV at 60fps
Apple TV now holds 60fps for most combinations of multiplayer action and high level progress. Under the very highest visual load — MANY enemies and MANY participants at once — Joustine drops cleanly to 30fps while keeping every visual effect, and only if that still is not enough does it simplify player hair physics to hold 30. A steady frame rate with everything on beats a lurching one with things turned off.
Tested on an Apple TV 4K (2nd generation, A12 Bionic), going from 4.08 to 4.09 the difference is plain to see — much smoother, particularly with 12 players beyond Level 20. An Apple TV 4K (3rd generation, A15) cannot be made to drop from 60fps under any circumstance we have found.
I had been poking at this for months. Joustine's very first platform was tvOS — and the fact that iPad, iPhone and Mac all performed far better, I attributed to our 2nd-gen Apple TV 4K simply being underpowered next to newer iPads, phones, and an M1 Max MacBook Pro. That was not at all the case.
UIKit's focus engine was walking Joustine's entire SpriteKit node tree — every node, every frame — testing each for focus eligibility, with a coordinate-space frame computed for every one. Joustine has zero focus mechanics during gameplay. tvOS was spending enormous processing power calculating what the Siri Remote could focus on, in a game that never, ever needed to focus on anything.
Before 4.09, tvOS could deliver 60fps at early levels with fewer enemies on screen, and the slowdown scaled so perfectly with sprite count that I assumed tvOS just couldn't push that many sprites. Combining sprites — pre-baking complex visuals like hair — was a partially effective distraction, because it happened to reduce the number of nodes the focus engine was walking. This was only ever an Apple TV issue: the same game on iPhone, iPad, and Mac never had the problem.
Instruments never revealed it. It came out of a series of stack dumps.
Having built a plethora of sprite-optimization tricks along the way, Joustine now has enormous headroom. And I don't like wasted processing capacity…