I found some debug code that was executing in the last release build, causing significant slowdown. Fixing that, along with some tweaks for the new graphics code, has improved performance significantly. But there are also a few changes you could make that could be the difference between getting 60fps and 10fps.

You can play the latest release here.

Test Environment

The game monitors it’s own framerate and adjusts output quality to improve low framerates – currently just by decreasing the stage quality and reducing the amount of smoke things generate. When I test performance or profile, I disable this auto-degradation, and max out the game speed to +5.

Here’s an example of the top 10 lines of my profiler output in the release player. This test ran at 60fps.

* “non-frame:REMAINDER” is the time flash spends not in my code – either idle or doing internal, mostly graphicy stuff I assume.

Huge FPS Hit: The Debug Flash Player

The “debug” version of Flash Player really doesn’t like something I’m doing in Jetpack. In the level “Pit of Chaos”, I get 55fps in the release player, and 13fps in the debug player. Music playback is also especially slow in this mode.

Here’s the profiler output in the debug player with music on. In my test level, this ran at 26fps.

Small FPS Hit: Scaling the Game

If you play the game scaled or full screen (via browser zoom, or a plugin like Flash Game Maximizer), there will be a performance hit because of the scaling overhead. On the same level, my performance dropped to 52fps when scaled a bit, and 38fps when scaled to full screen height.

With the game scaled, and running in the debug player with music on, my test ran at 19fps.

Note: The final game will not have either of these issues, because it will not use an external Flash Player, and can set the monitor resolution to 800×600.