Big Bucket Software you like to use
The Incident 1.2.1 Submitted
October 23rd, 2010

The Incident 1.2.1 has been submitted for approval so you can expect to see it in about a week.

This release is mostly about tying up loose ends and applying some polish. I like to think of it as 1.2: The Director’s Cut. Here’s what’s changed.

Controller can be used to pause, resume, restart/retry and return to the main menu

In 1.2, when you pause or lose a life, the menu buttons appear on the iPad. This means you have to regularly switch from the controller to the iPad. In 1.2.1, the pause menu and the death menu have been moved to the controller.

Controller pause screen

Controller death screen

So, once you’ve started a game, you won’t need to touch the iPad again until you lose all your lives or choose to go back to the menu.

Trophies can be tweeted from the Awards screen

You can now tweet any trophy on the awards screen by tapping on its name.

Game Center leaderboard can be viewed without leaving the game

No need to open the Game Center app.

Much tidier.

Ability to tap About screen lamps on and off

So maybe that’s not much of a feature. But it’s fun!

Fixed an issue affecting some users where the game would crash upon attempting to connect a controller

If the name of the controller contained a non-latin character, (like Blancö Niño), 1.2 would would crash when trying to display it. This was basically due to not being able to find the character in the font. The font engine is custom so this was my fault, not Cocoa’s. In 1.2.1, if the font engine encounters a name that it can’t display, the name will be replaced with the word “controller”.

Fixed an issue affecting some users where the game would crash after being paused

This one is similar to the controller name issue. You’ll notice that the pause screen includes a status bar that displays the time and battery level. Neat feature, right? If the regional settings of the device are set to a region that include a non-latin character in its presentation of time, the font engine in 1.2 would crash. In 1.2.1, if it can’t display the time, it won’t.

Fixed an issue where the escape bubble could be activated while the game was paused

This one’s pretty funny. To reproduce it in 1.2, get yourself trapped until a pile and wait until the shake indicator appears. Pause the game and shake the device. The escape bubble appears. Pretty funny really, it animates and everything.

Fixed an issue where the trophy image tweeted from an iPhone 4 would be cropped incorrectly

Oops. This one was embarrassing.

This bug was a side-effect of the Retina display support. The trophy image was cropped according to the device type. I assumed one crop for iPad, and another crop for iPhone. I forgot to go back into that code and adjust for iPhone 4. My bad. It’s all good now. I should finally buy myself an iPhone 4 so that this doesn’t happen again.

Fixed a particle system issue where particles would briefly appear in the wrong location

This includes things like the puff of dust that appears when an item lands and the sparks that fly around when you collect a powerup or gem. Occasionally, a particle would appear in the wrong place for a single frame. It was a really strange bug that’s been in my particle engine since Pocketball. It’s finally fixed.

Fixed an issue where the name of the selected trophy would not fade out when exiting the Awards screen

A subtle issue, but it was a symptom of a bigger problem. It was due to the fact that the color components of the text were out of bounds. In OpenGL, a color can be specified using 4 values between 0 and 1. The 4 values represent the red, green, blue and alpha components of the color. In the case of the name of the trophy, the red and blue components of the color were greater than 1. This error caused OpenGL to ignore the alpha component altogether. The upshot: It wouldn’t fade out. It was just sit there, bright yellow, until I removed it from the screen.

I don’t directly call glColor anywhere in the code, I always go through my own BBColor function. I do this so that I can first check the current glColor value (which I cache locally) before setting it again. This way, if the glColor value is already white, I don’t have to set it to white again. Having a BBColor function also meant that I was able to trap any situations where I was attempting to set a colour that was out of bounds. Turns out, I was doing it in a few places. All of them are fixed now.

Fixed an issue where the game would be unresponsive after visiting theincidentapp.com via the About screen

Another silly one. Basically, the modal dialogs in The Incident steal focus from the UI. When the modal dialog is dismissed, the UI gets the focus back. When presenting a modal dialog, the code would look something like this:

[director removeTouchDelegate:aboutScreen]; 
[director addTouchDelegate:modalDialog];
[aboutScreen addChild:modalDialog];

And when dismissing:

[director removeTouchDelegate:modalDialog]; 
[director addTouchDelegate:aboutScreen];
[aboutScreen removeChild:modalDialog];

As of The Incident 1.1, I don’t have to write this code anymore; I’ve made it the default behavior. But the About screen has been in there since 1.0 and I never went back and ripped out those lines. I didn’t really forget to restore focus to the about screen, I mean, if you’re opening up Safari, then you’re leaving The Incident, so you’re done; the app has terminated. At least that’s how it worked before multitasking. So you can blame multitasking for this bug. Or me. You can blame me.

Oh and of course, Frank Solway is now a replicant. Just kidding. Probably.