Week 28 Update: Performance optimization and autoscaling!

Performance optimization. Remember last week when I mentioned the lag that THE MISSION was experiencing on the GameStick? It was because I wasn’t using spritesheets, so I spent time setting up the game to use them – thanks to Philippe Elsass‘ awesome TileLayer library and the great spritesheet generation tool TexturePacker! The performance on the GameStick is stellar now, at my target 30 FPS.

Autoscaling. I had noticed that the square pixels weren’t quite square when running the game on the GameStick. So in order to preserve square pixels, I set up the game to calculate it’s scale based on the screen resolution, and then round it down to a whole number. The game is then scaled, centered in the screen, and a black border is added to fill the rest of the screen. Making adjustments throughout the game layouts to compensate for this also took some time, but now I have…

A game which fits itself to and then runs well on any device. I love it.