Archive for March, 2009


Toronto iPhone Developer Meet-Up (Apr 8)

Hi Everybody:

I’m starting a new regular meet-up event in Toronto for iPhone developers. Game developers, app developers, or people just getting started in iPhone development are welcome! It’s a chance for us to meet each other, talk about iPhone development, and have a beer.

Date & Time:
Wednesday, April 8, 2009 – 7:30pm

Place:
Imperial Pub (Upstairs)
54 Dundas E (just east of Yonge and Dundas Square near Dundas Subway)
Toronto, ON
(416) 977-4667
Note: This is the same pub at which the local IGDA holds its regular socials.
MAP

Who can attend?:
Anyone currently working or interested in working on iPhone development can attend. If you’ve got an App available, show it off. If you’re working on an App, ask for some feedback.

If there are any updates to this, I’ll be posting them here and on my Twitter account.

If you’re planning on attending, please leave a comment here on my blog. That way I’ll know if the reservation I’ve made is for enough people, or if I have to increase the reservation.

Hope to see you there!
Owen


Dapple v1.1 + An Interview

Yes, you read that right, Dapple v1.1 has been submitted to Apple for review! As has Dapple Lite v1.1!

What’s new in Dapple v1.1?

  • All new 2 Player Mode: Choose your opponent. Play against a friend in 2 Player Mode, or now, play against the computer! Computer AI difficulty adjusts based on the difficulty setting you choose.
  • Added a Feedback button to the Front-End. Allows users to email Streaming Colour Studios directly to comment on the game, provide suggestions, etc.
  • Fixed an audio bug. If you are playing your own iPod music while playing Dapple and you lock your device, your music will now continue to play.
  • Reduced app size. The game is now under 10MB, which means it can now be downloaded over 3G or EDGE cell phone networks, instead of requiring the user to be connected to Wi-Fi.

Dapple Lite contains all of those updates, with the exception of the 2 Player Mode changes, since Dapple Lite doesn’t contain the 2 Player Mode.

Both versions were submitted to Apple last night. I expect them to be approved either late this week or early next week.

I’m quite pleased with the update. I’ve been really enjoying playing 2 Player against the computer. On the Hard difficulty level, the AI is good enough to beat me over half the time. I’m also very excited that the game fits under 10MB, as I know I’ve lost sales because of that. I think for a game in this genre, a lot of my sales come from impulse buys. If the game is over 10MB and the player is on their 3G connection and can’t buy it, I’m not sure how many would try to purchase it again. I think this is especially true with the Lite version.

In other news, I did an interview with AppCraver recently and I just noticed that the interview ran last Thursday. Check it out if you’re interested in what I have to say:

Now that Dapple 1.1 is out, I’ll start making up a list for 1.2, but I don’t think I’ll put that out for a little while. I’ve got some other projects I want to start working on. One is a little app that I’ve been meaning to make. I’m hoping it’s something I can do in a week or two of work, but we’ll see. It will involve learning a lot of new stuff about CocoaTouch, as Dapple was all OpenGL.

After that, I’ve got tonnes of ideas for new games, but there’s one that really sticks out in my head. It’s something that will require me building some new tech, though, so I’ll likely need to do a bunch of prototyping early on to make sure it can be done. I love the early stages of new development! Everything’s so fresh and exciting!

Owen


Dapple Update (pun intended)

I haven’t really been posting much this week because I’ve been working on Dapple. I thought I’d provide a little update on what I’ve been doing. I’m working on a Dapple Update. Yes, the word update is confusing in this first paragraph. Let me try that again: I’m working on version 1.1 of Dapple and Dapple Lite.

There were a couple of key things I wanted to address with Dapple’s first update:

1) Reduce app footprint to under 10MB

When an app is over 10MB, users with a cell phone connection aren’t able to download the app directly. Apps that are over 10MB require a Wi-Fi connection to download. I think this is potentially costing me quite a few downloads, mostly of the Lite version. I want the Lite version to be something that people can download on a whim. If they have to wait until they have Wi-Fi access, they might never download it.

Dapple and Dapple Lite were both about 13.1MB, so I needed to reduce them by nearly a 1/3. When I looked at the sizes of my various directories, it became clear that the music and SFX files were the ones causing the problem. Dapple has about 13-14 minutes of music that plays in the game. That amounts to significant file sizes. There are also 14 SFX files.

I’m going to get a little bit technical here, so if you don’t care for this stuff, just skip ahead a bit. The iPhone does have a hardware audio decoder. You can use it to hardware accelerate your MP3, AAC, etc decoding. However, it can only operate on one file at a time. This means if you’re ever going to play more than one sound at once, you have to use two forms of audio decoding. For Dapple, I use AAC compression for the background music, but all the SFX files need to be in a non-encoded format: Linear PCM. This means that the SFX files are huge, because they’re basically 16-bit uncompressed audio data.

For v1.0 of Dapple, all the music was encoded as AAC, 128kbps, constant bit rate, so that it sounded really good. I decided I would try to reduce the bit rate as much as possible without sacrificing the audio quality too much. By switching to a variable bit rate, I was able to compress the files much more without too much of a quality reduction. By doing this, I was able to reduce the music file sizes from 8.7MB to 6MB! Almost there already!

That was the easy part, now I needed to deal with my SFX. The iPhone documentation infers that if you’re not using a hardware decoded format you should be using Linear PCM or IMA 4:1. IMA4 (which I’ll refer to is as from now on) is a compression format for audio that results in a nearly 4:1 compression (it’s actually closer to 3.75:1). I converted all of my SFX files to IMA4 and was surprised to discover that none of them played. This is because there’s no native support for IMA4 on the iPhone. You can use it, but you have to write your own decompression code. I ended up scouring the net looking for information on the IMA4 data format, how the compression works, and how to decompress it. I found several partial resources, none of which were complete enough to just let me implement it. It took me two solid days of some pretty hardcore coding (it was really fun, actually), but I finally got IMA4 working in Dapple. The nice thing about IMA4 is that the file gets decompressed when it’s loaded into memory, and is then played as Linear PCM. This means there’s no performance hit, except on file load. (I’ll link to some of the IMA4 resources I found at the bottom of the post)

IMA4 was a huge win. My SFX files totaled about 2.2MB on disk before compression. After compression, they’re just over 600KB, with almost no loss in sound quality.

So, after rebuilding and zipping, both Dapple and Dapple Lite sit at about 9.5MB! Hooray! What’s next?

2) Fix an audio bug

This is the only bug that’s come up more than once since the game launched. If a user is playing their own iPod music while playing Dapple, then locks their device, their iPod music stops playing. This was a problem in how I was managing audio sessions in the game. This has now been fixed.

3) Add a Feedback Button

I want to make it easier for people to provide me with feedback on the game. I changed the Main Menu around so that the “Credits” button now says “Extras”. This opens a new menu which has “Feedback” and “Credits” in it. The feedback button, when clicked, launches the Mail program and lets the user send me an email. Hopefully people will use it to request features, complain about things they don’t like, etc.

4) Add a computer-controlled opponent for 2 Player Mode

This is a request I’ve had from a lot of different players, so I decided to try to put it into the first update. As of last night, I can actually play a game against a computer opponent. It’s pretty cool. However, the computer opponent is really stupid right now.

The way Dapple already works is that when a player starts their turn, the game searches the board and picks a random spot that will make a match. This is stored for when the hint arrow needs to be displayed. I figured I could make use of that code and just make a computer opponent execute a move there on its turn, instead of displaying a hint arrow.

This lead me to an interesting discovery: it works, the computer can play, but the computer opponent sucks at the game. In 10 games I played against the computer last night, I won every single game. What I found interesting about this is that this proves that making random moves in Dapple isn’t nearly as effective as thinking your plays through. I’ve had a small number of negative reviews (either on the web, or on the App Store), and the complaint is usually that they feel like playing randomly yields the same results as thinking their moves through. With a random computer opponent pitted against a player who thinks their moves through, the human player will almost always win. To me, this is proof that the game can be learned, that you can get better at it, and that strategy will win over randomness. Up until now, that’s what I believed, but I couldn’t prove it…

So today my goal is to try to encode some of the choices I make when looking for the best play to build a heuristic that the AI opponent can use. Then I’ll need to tune how much it uses that heuristic for various difficulty levels. Should be fun!

With any luck, I should be able to submit Dapple and Dapple Lite v1.1 by Monday.

Owen

IMA4 Resources:

  • www.wooji-juice.com – A good starting point, as this article walks through the high-level steps required to get IMA4 decompression working. However, this article leaves out a lot of steps that are necessary to get things working. It is also not very clear on the differences between mono and stereo audio streams and how that affects the packets.
  • wiki.multimedia.cx – Contains useful optimizations that allow you to avoid doing byte->float conversions to do floating-point math.
  • wiki.multimedia.cx – Has some useful information on byte/nibble structure of the packets
  • www.koders.com – Actual C code for doing the decoding. This is for quicktime IMA4, so some of the logistics of how you extract chunks of data won’t work, but the actual math for decoding each nibble into a 16-bit frame should be the same for you.

What’s Hot? Dapple!

A couple of friends pointed me to the on-iPhone App Store this afternoon, where Dapple is being featured in the “What’s Hot” section! I’ve got a screenshot taken from my iPod touch just a couple of minutes ago:

Dapple - Whats Hot

Dapple - What's Hot

It seems to me like this might be a Canada-only feature. If anyone from the US can check and let me know, that would be awesome. It’s also not showing up in the iTunes App Store, so I don’t know if they use different lists, or if there are delays between the two.

[Update: I've heard back from several people and it looks like this is a Canada-only feature. Thanks to everyone who checked!]

At any rate, it’s very exciting to see the game in that list!

Owen


Hey, Where’d He Go?

Just in case you missed it earlier:

  • Dapple Lite is now available on the App Store for Free! iTunes Link
  • Dapple is now on sale for 40% off (That’s $2.99 in the US and Canada) iTunes Link

I hadn’t realised that it had been four days since my last post! Yikes, where has the time gone? There are a couple of reasons for my recent absence:

1) I’ve spent a lot of time this week replying to all the emails I received over the past week or two;
2) I spent the last two days preparing my taxes.

I have a meeting with my accountant on Monday to do my taxes for 2008 and so I started going through my books on Wednesday to make sure I had everything in order. It was at this point that I made a discovery about the way I’d been tracking my expenses: I wasn’t tracking all the GST I spent separately from my expenses (GST is Canada’s federal sales tax, for those of you reading this from elsewhere). I thought I had registered my business with the “Quick Method” for remitting GST, but it turns out I was registered under the “Normal Method”, which means I need to calculate how much GST I collected/paid out differently. When I looked at my spreadsheets I realised that I couldn’t easily rework them to include all this new information the way I had them laid out. I had the brilliant idea to create a quick (haha) database that would allow me to track my expenses and income and then spit out handy reports for my accountant.

The problem was: I decided to use NeoOffice (based on OpenOffice) and their Base program. When I was in university I had a co-op job one term where I built massive databases for a telecom company using Microsoft Access. I figured Base would have similar features. What followed was two days of me struggling to create the simplest of databases and trying to figure out how the hell to make a form or a report in that piece of junk. There is so little documentation, it’s not even funny. In the end, I couldn’t even make it do what I wanted; I ended up generating a report that had most of what I wanted, copying and pasting the result into a spreadsheet, then using the spreadsheet to do all the summing. Next year? I’m buying accounting software. This was ridiculous. What a waste of time.

Ok, that’s enough ranting about databases. Dapple stuff…

Dapple Lite has been out since Monday afternoon and I’ve been pleased with the results so far. Placing Dapple on sale seems to have helped sales also. It’s hard to separate which is having more of an effect (the sale or the Lite version), because they both happened about the same time. Given that I have less than a week of data, I’m not ready to release any quantity numbers, but I’ve found some interesting statistics.

Dapple Lite has some simple analytics in it: it doesn’t collect any personal information, but I can see what kind of games people play, and whether or not they click my “Buy Dapple” buttons. Of the information I have so far, here’s some neat data:

  • For every 10 games of Classic mode that are played, only 1 game of Timed mode is played
    • I’m curious what this means…are people not liking Classic mode enough to try Timed mode? Are people making a decision to buy the game based solely on Classic mode?
  • For every 10 plays of the game, 1 person clicks a “Buy Dapple” button
    • I’m really surprised with how high this number is. 10% of the people who download the Lite version click through to the App Store to see the full version
  • For every 100 downloads of Dapple Lite, I seem to get 2-3 sales
    • I’m very pleased with a 2-3% conversion rate, as this seems quite high to me. To me, this tells me that the Lite version is doing its job well.

Like I said, I don’t have enough data to draw any conclusions yet. However, I’m definitely pleased with the conversion rate. So I’m thinking that now my challenge is to find ways to get more people to download the Lite version.

I watched a documentary on CBC TV last night on “The Food Revolution”. One of the segments was on how some of the big players in the food production industry do marketing. It made me realise how lucky I am to be producing a product that doesn’t have any manufacturing costs or have a need for physical shelf space. A potato chip manufacturer was saying that the minimum order for the bags that he puts his chips into is 100,000 units, which costs $12,000. Before he’s even made any chips he’s out $12K!

The marketing is also crazy. Some of these companies pay 10’s of thousands of dollars just to get their product put in a good place on a supermarket shelf. They were also saying that 90% of new food products fail. 90%! That means if you spend $50K, or $100K, or more, to get your product onto store shelves, you’ve got a 1 in 10 chance of keeping it there. And I thought trying to sell on the App Store was hard!

Owen