Welcome to the Wolfire Blog! This is where we keep everyone up to date on our progress on Overgrowth and other new stuff. Be sure to subscribe to get the latest news! Also, be sure to check out the forums for even more up to date news - or get on IRC for up to the second updates.

Happy Birthday BSi

Add Comment! By John Graham on February 26th, 2010

This is a guest blog post written by Henry Kropf, the developer who ported Black Shades to the iPhone. Seeing as today is BSi's birthday it seemed fitting to share the story of how the game was born.

The idea of a portable Black Shades first came about when David asked if Black Shades could be ported to the iPhone, to which I said “No way!”. At the time it seemed impossible that it could be ported both because of the 3d requirements and the control scheme requirements.


BSi development milestones

Fast forward a couple of months. I had been playing around with test programs for my iPod Touch, including a game Aubrey and I were kicking around, when I suddenly felt inspired to see if Black Shades could even run at all on a touch. So after a fevered night of coding, the first non-buggy build stunned me when I saw a VIP walk across my screen!

Puttin
Puttin' on the Ritz

So after a week or so – virtually everything from standard Black Shades was running. There were some fun bugs, like enemies rotating their bodies weirdly and aiming from under their legs (turned out to be the case sensitive filesystem of all things)...

Capitalization Kills
Capitalization Kills

...but now it was time to optimize the framerate as much as possible and add a menu system.

A lot of optimization for BSi came from optimizing texture usage. On an iPhone, switching textures is very expensive, so the BSi particle system was overhauled to limit texture swapping, making the rainy/snowy levels run about as fast as their 'clear sky' versions.

Along the same lines – the main menu system and control overlay was set up to use a texture atlas so that everything could be drawn with no texture swaps.

Layout
Black Shades Icons

The unfortunate aspect of this was initially it started out as a 256x256 bitmap with hand-indexed coordinates and ended up as a 1024x1024 bitmap with hand-indexed coordinates. In this case hand-indexed means I went in with Photoshop and found the coordinates for each quad on that image, and that image changed a lot. I use an automated system these days!

In the home stretch I found an incredibly weird bug, that could have been something weird with hardware (as I've seen this sometimes in other games on my Touch). I would occasionally get a frame that locked up the game for multiple seconds. It was hard to reproduce except on the zombie levels, so once I found a plausible solution, I settled down to play the zombie levels of the game for 6 hours straight. This was extremely painful.

By the time we released on February 26th 2009, I had learned that while it's fairly easy to port an old OpenGL 1.x program to the iPhone, but you will spend a large amount of time implementing a new touch compatible interface and controls.

Thanks again Henry. If you haven't had a chance to try BSi already you can find it on the app store here.