Archive for the ‘Testing’ Category

Detecting Multitasking Gestures

Wow, it has been a really long time since I wrote up a technical post here. But I finally had a technical challenge today that felt worth sharing, so here it goes!

As you may know, I’m working on a new game called Finger Tied. The game is a multi-touch puzzle game. Some of the levels require that you drag 4 fingers around on the screen at once. I sent an early build out to a limited set of testers yesterday afternoon and a few reported problems playing the 4-finger levels. This is why: Multitasking Gestures.

A while back Apple added a feature to iOS called Multitasking Gestures. This feature is turned on by default on the iPad, I believe. When it is active, you can use 4- or 5-finger gestures to do things like switch between running apps, close the active app, or bring up the multitasking bar. The problem is, as developers, we have absolutely no control over this. As far as I can tell, we can’t even query the OS to ask it if the feature is turned on, and we certainly can’t temporarily override the behaviour.

So testers were running into problems where they would start to play a level with 4 fingers, and the app would close. Or their iPad would switch to another app, etc. I had seen some other games bring up a message on first launch that say things like:

“Please disable Multitasking Gestures to play this game properly.”

But I don’t like the idea of ruining that initial play experience with a text-heavy popup that might not even be needed. I figured there had to be a way to detect when one of those gestures has happened. I started looking at what events I get in the game just before the gesture is captured at the OS level. It turns out, your app will receive a touches cancelled event when one of these gestures is captured. I realized I could use this in the game.

Here’s some pseudocode that runs inside touchesCancelled:

if (number of touches cancelled >= 4)
    save a BOOL that says a gesture was used

Any time I get 4 or more cancelled touches at the same time, I’ll save out that boolean value to NSUserDefaults. Now, the next time the user launches a level I do this:

gestureUsed = get saved BOOL value
if (gestureUsed && level requires >= 4 fingers)
    display a popup explaining how to turn off Multitasking Gestures
    clear the saved BOOL value from the save file

This means that the user can play through levels that don’t require 4 fingers to play without ever seeing that message. It also means if they never use a multitasking gesture (or have them turned off), they’ll never see the message. It’s only if they use a gesture and then try to play a level that needs 4 fingers that they’ll see it.

I also force the same check on applicationDidBecomeActive so that I catch the cases where the Gesture happened mid-level and the user was dumped out of the game. This means that in the case where the user has Gestures turned on (but doesn’t use them), then tries to play a 4-finger level, if they accidentally trigger a Gesture then return immediately to the game, the game will immediately pop this message up giving them an explanation of what happened.

However, this is not foolproof. Because I want to try to catch as many cases as possible, this code can generate some false positives in the following case:

  1. Player has Gestures enabled
  2. Player enters the game, then uses a Gesture to switch to another app (this will save that a Gesture occurred)
  3. Player returns to the game, realizes their Gestures will interfere with the app
  4. Player quits the game and turns off Gestures in the OS settings
  5. Player reenters the game, plays a 4-finger level
  6. The game will present the Gesture warning dialog

The other false positive that could happen occurs when a player places 4 fingers on the iPad, then drags all 4 fingers off the screen in the same frame of execution. In that case you would also get 4 touches cancelled in one event, but it would be extremely rare.

Update (2012-07-27): As Alex pointed out in the comments, you’ll also get 4 touches cancelled in the case where the user has 4 fingers on the screen then presses the Home button on the iPad. Again, I believe this is a rare enough occurrence that I’m OK with a few potential false-positives in order to catch the real ones.

So, it’s not perfect, but these are cases I can live with.

Finally, since I haven’t ever submitted this code to Apple, I make no guarantees that it will pass review. This is also untested against iOS 6, so it might fail down the road. Use at your own risk. 🙂


Postmortem: Monkeys in Space

I never wrote up a formal postmortem for Dapple and I wish I had. Now that Monkeys in Space has been out for over a month and I’ve released one major update, I thought it was about time to sumarize what went right and what went wrong on my second game.

Because I really enjoy reading Game Developer Magazine, I thought I’d follow their template for a postmortem and list 5 things that went right followed by 5 things that went wrong on the project.

Buy Monkeys in Space - $0.99

What Went Right

1. Prototyping, Iteration, and Early Feedback. One of the processes I put into place when I started Streaming Colour Studios is the extensive use of prototyping and rapid iteration. When you build a large console game, you need to plan out everything a lot more because there are 100 people working on the game. When it’s just you, you can afford to play around with ideas a lot more.

Monkeys in Space actually started out as a completely different game. The first prototype I built involved controlling space ships with black holes. One of the things I learned with Dapple is that the sooner you get feedback the better. So this time I sent that first prototype out to a few trusted friends to get their opinions on it. The feedback that I got was that the controls weren’t intuitive enough and the game wasn’t really fun to play, just frustrating. This was fantastic feedback to get so early in the process and I was able to start trying new ideas and iterating on the design.

Eventually I got to the point where the game was fun, but the space ship theme wasn’t working for me anymore. I had had an idea for a bonus level that involved picking up monkeys floating in space with your ship, but after discussing this with a few friends over coffee (one of them ended up writing the music for the game) I decided that the game might be more fun to play if the monkeys were the focus of the game. Once this decision was made, it opened up new avenues for art direction, marketing, names, and even merchandise.

Once I had the monkeys in the game, I opened the game up to much more public play testing. People were playing the game and providing regular feedback at a much earlier stage of the development than with Dapple. This proved to be invaluable for fine tuning the design and polishing the game.

2. Gameplay. Monkeys in Space fits into the “line drawing”/”chaos management” genre of games, but it needed something to set it apart and help it to stand out. I had also learned, through my experiences with Dapple, that I needed a gameplay mechanic that was easy to understand, but offered depth to the experienced player. Monkeys in Space offers familiar gameplay goals to players familiar with the genre (get the monkeys to the bases), but adds a twist that adds depth to the game (linking monkeys together). The chaining mechanic was added about mid way through the prototyping process, but the feedback from play testers was unanimously positive. I’m very happy with how the game ended up playing out. The chaining adds a risk/reward factor to the game that has been mentioned in a lot of reviews.

3. The Name. I mentioned above that the game was originally about space ships. Well, it was a search for a name for the game that ultimately led to the game being about monkeys instead. I was brainstorming game names with some friends when I mentioned I had been thinking about adding a space monkey level to the game. Immediately we all started thinking about fun names for a game involving space monkeys. My favourite at the time was “Space Monkey Rescue”, but I ultimately abandoned it because of trademark concerns. I contacted my friend Stacy, who is a writer, and asked her for help. I sent her some of my favourites, including just “Monkeys in Space”. I told her I was looking for a 50’s or 60’s sci-fi b-movie feel for the title and she came up with “Monkeys in Space: Escape to Banana Base Alpha”, which I absolutely loved. I think the name is perfect for the game in that it captures that silly retro feel I wanted, and it says “yes this is a game set in space, but it’s not a serious sci-fi game; it’s fun and it has monkeys!”

4. Artwork. With Dapple I had decided to hire a professional artist to do the game’s artwork. While the artist did an amazing job and I was extremely happy with her work, hiring an artist is also expensive. With Monkeys in Space I decided to take a different risk and do the artwork myself. Now, I took some art classes in university, I’ve done a little life drawing since then, and I once had a job where I was using Photoshop for eight hours a day, but I’m not a professional artist, so this was kind of a risky move. However, in the end, I was quite pleased with the art in the game. I think the monkeys especially turned out quite well. No doubt a professional artist could probably have bumped the artwork up a notch (or two), but I’m happy with the results. On top of that, it was also really fun. It was great to get back into drawing regularly again and I think it’s something I’ll be considering for future games, if it’s a possibility.

5. Reviews and Apple Feature. Monkeys in Space has received some great reviews from the iPhone gaming press/critics (you can read them on the Press page). Every good review helps to build buzz around a game, but one of the biggest reviews the game got was from Their Monkeys in Space review was on their front page for two days and during that time I saw a sales spike close to what I was to see being featured by Apple. Then a week after the Touch Arcade review ran, the game was featured on the App Store in the Games -> What’s Hot section. This happened just before Christmas, which couldn’t have been better timing. It wasn’t a front page of the App Store feature, but it was enough to push me into the Top 100 Kids Games in the U.S. store. This gave the game some momentum through the holiday boost.

I’ve decided that while I don’t want to share sales specifics about the game (like the infamous Dapple “Numbers” post), I will share the shape of the graph of sales since the game’s launch:

Monkeys in Space Sales

What Went Wrong

1. Release Date. I mentioned this earlier this week, but my release date turned out to be a big mistake. I submitted the game to apple in mid-November and wasn’t sure when to expect it to be approved. I got the email from Apple saying the app was ready for sale at about 7:30pm on Wed, Nov 25th. I was so excited that I switched the app into the “for sale” state (by setting the release date to the 25th) and started preparing the email I’d send out to the press in the morning. On Thursday morning I sent out my press release along with screenshots and video, etc, to iPhone sites. At that point I started getting back “out of office” replies and suddenly released it was Thanksgiving in the U.S. See, we Canadians celebrate Thanksgiving in October, so the date completely slipped my mind.

At first I didn’t think it would be a big problem. But then I started reading the review sites that were staffed for the holidays and most of them were just running stories about the hundreds of games that were going on sale for Black Friday in the U.S. Not only that, but it turns out a lot of people apparently take a long weekend from Thursday-Sunday, so it meant I didn’t hear from anyone until well into the next week.

However, I can’t really complain as the game eventually did get picked up by review sites, but the roll out was more gradual than I had hoped. The delay meant that my marketing lost some momentum right at the start, which isn’t ideal. In the future I will be paying closer attention to U.S. holidays when I set my release dates.

2. Delays. When I did the first concept sketches for the game that was to become Monkeys in Space, the original plan was to build the game in 2 months or less. From start to finish, the game ended up taking almost exactly 3 months. One extra month isn’t terrible, but that’s a 50% overshoot of the original plan. Now I have excuses: my wife and I moved cities, which ate up a few weeks with packing, moving, and unpacking, etc. But I think the biggest reason the game took longer than I thought it would was because I decided to do the artwork. Because I was doing the art and the programming, it meant that the two couldn’t happen concurrently. When you work with an external artist, they can be drawing while you’re coding, but I didn’t have that ability this time. The artwork took longer than I thought it would, which pushed my timeline out. Ultimately, it was worth the extra time to make sure the art was good enough to meet my expectations for the quality of the game, but it did delay its release.

3. Marketing Push. I learned some important lessons with the launch of Dapple. One of the most important was the need to have your marketing push happen all at once. You want everyone to be talking about your game at the same time. I’ve already mentioned the problems the release date caused with this, but I suspect there were some other missed marketing opportunities around advertising that I didn’t explore. I haven’t had a lot of luck with advertising driving sales. However, I think if done properly, there may be ways to leverage advertising effectively, even for $0.99 games…I just haven’t figured it out yet.

4. Not Enough Levels in v1.0. During development I had to make a call about how many levels to include in the initial version of the game. I looked at the great games in the genre (e.g. Harbor Master, Flight Control, etc) and looked at how many levels each had shipped with, and decided to ship three levels. I also chose to limit myself to three levels at first because the game was already taking longer than I had expected. However, what I discovered is that people expect new games to contain as many levels as the other games do now, not how many they contained when they shipped. Some of the reviews of Monkeys in Space have mentioned that they would have liked to have seen more levels in the game. Since then I have released a fourth level as part of a free update and I hope to release more. Regardless, what I failed to realise is that the free update system for iPhone apps creates a different set of expectations in people’s minds. They don’t care that game X shipped with one level; what matters is that it has five now. This was an important lesson in competitive analysis for me.

5. Public Recruiting of Testers. I almost listed this in the “What Went Right” section as well, and it just barely squeaks into the “What Went Wrong” list. Very early in the process (much earlier than I’d ever considered before) I started asking people to play test the game and provide feedback. I put out a call on Twitter, on this blog, and in iPhone gaming forums, looking for people who wanted to play the game and provide some honest feedback about what did and didn’t work. The reason this should also be in the “What Went Right” is that I got some terrific people playing the game and providing me with insightful and helpful feedback. However, I also had a lot of people sign up, get the builds, and I’d never hear from them again. I think there is a small group of people who say they’ll beta test a game just to get a free game. The good news is that I’ve met enough great people that I now have a decent list of preferred testers I’ll ask first next time.


All in all, I’m extremely proud of Monkeys in Space. I think that I learned a lot from some of the mistakes I made with my first game, but I still made a few new mistakes. I suppose that’s all part of the process of becoming a better game designer, developer, and business person. What I like most about Monkeys in Space is seeing new players pick it up and to watch how easily they get involved with the game. I also love watching people laugh when the monkeys scream and wave their arms frantically. People seem to have fun with the game, and that makes me happy. To me, that alone makes the game successful.


I’m Still Here…Making Progress

It’s been a little quiet here on the blog and video blog lately. I apologize for not being more communicative. I’m hoping to get a new video blog posted in the next couple of days. The gameplay for the game has been nailed down and I’m really close to having the in-game art locked. Once I finish up a HUD for the game I’ll post some screenshots and even some in-game video! Woo!

However, before that can happen I’ve been taking care of some less exciting stuff. The last couple of days I’ve been working on a save system for the game. It turns out saving the state of a game that has a physics engine and is interacted with in real-time is a lot more complicated than for a turn-based puzzle game. Who knew? I kid. But seriously, what I hadn’t anticipated was having to build a whole new save game framework to handle it nicely.

At this point I’m getting a little concerned with the fact that there are only 10 days left in October. If I’m going to submit by the end of the month, I’ve got a lot of work to do. If I really buckle down I still might make it, barring any horrible problems [knocks on wood]. Otherwise I might end up pushing a week in November. Here’s hoping the next two weeks go well!

The good news is that my play testers seem to be really enjoying the game! There are a couple that keep battling for the high score in the leaderboards. It’s exciting to see! A week ago I thought I was Mr. BigShot with the high score in the game for the first level. Now I’m 5th. I love it when that happens. It means the people playing the game are discovering strategies that I hadn’t anticipated.

It should be an exciting next couple of weeks!


Meet-Up Thoughts and Dapple Update

Is everyone (in Canada) ready for the long weekend? I know I am! I thought I’d write a post before I head up to my parents’ cottage for the weekend, where I won’t have a computer, let alone access to the internet.

Wednesday night we had the 2nd Toronto iPhone Developer Meet-Up, which was a great success in my mind. We had two great presentation by local iPhone devs. James Eberhardt was able to secure us space at the Rich Media Institute, which turned out to be perfect. There was beer that could be bought, and we had a great conference room with a projector for the presentations. I’m extremely pleased with where the meet-up seems to be heading. I think everyone who came, that I talked to, enjoyed the format. I think we’ll try to stick with the format of two short (15 mins or less) presentations, followed by socializing and drinks.

If you missed the meet-up, the presenters have graciously posted their presentation slides on their sites.

  • Rules You Should Break in the App Store ( – PDF) – Jason Moore from xinsight gave a presentation on tips and tricks for making the most of the App Store.
  • iPhone + Box2D ( – Luke Lutman from zinc Roe Design gave a presentation on using the open source Box2D physics engine with iPhone. He has posted his short presentation slides (that we saw) as well as a longer presentation and an example source code project.

A big thanks to both presenters! It was a great way to kick off the new format for the meetings. I think everyone enjoyed it.

If you haven’t already, please join the Facebook group for the meet-up. It’s called Mobile Developer & Designers of Toronto. I look forward to seeing you in June!

As I mentioned previously, I had be writing a chapter for a book on iPhone development. I’m pleased to say that I submitted my first draft to the publisher this week. As such, I was able to do some coding towards the end of the week. Yay!

I started working on stuff for the Dapple 1.2 update. The biggest new feature will be the inclusion of world-wide leaderboards for the game. I’ve decided to use Google’s App Engine as the server-side technology, as it scales nicely and it means that if I did somehow introduce some kind of server-side security flaw (which I don’t think I have), it’s not running on my own web server.

I’m two days into things and I’m quite impressed with the App Engine stuff. Sure, I had to learn Python pretty quickly, but at this point the server-side stuff is pretty much done. I’m sure it will need some tweaking once I actually hook the game up to it, but all my tests are working. I can add high scores to the database and I can retrieve them in a few different ways. Today I’ll be starting to work on the game-side implementation, which will probably be more work than the server-side. I have to make a few UI changes in the game to support local vs. global high scores and handle all the error cases around connecting to the server. I’m hoping to have something I can send out to testers by mid-late next week.

It feels good to get back to coding again. There are a few other things I want to put into the 1.2 update as well. I’m hoping to submit to Apple by the end of the month. After that, I’ll actually be able to start working on my next project. Shocking!

Have a good (long) weekend everyone!