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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s