Persuasion Android app

Oct 27, 2010

I recently published my first Android app1. It's a puzzle game called Persuasion. You can search for it on the market or find out more at persuasion.codesimple.net.

Here's a few things I learnt in the process:

  1. Developing for Android is pretty pleasant: the documentation and tools are good and comprehensive. And if, like me, you're not a fan of Eclipse you don't have to use it: The tools will generate an Ant build file for your project complete with an install task to run the app on your device or emulator. I imported this into a Java Free-Form Project in NetBeans to get code-completion goodness whilst still using the standard build file.

  2. If you want to add global highscores to your game, I'd recommend Scoreloop2. Basic integration is easy and I found the support excellent.

  3. Don't be afraid of the dips. I initially wrote my app to run in "compatibility mode" (i.e. the Android System will pretend the screen is 320x480 regardless of the device). For a game, I thought it would be hassle switching to using dips and handling this stuff myself. It wasn't. All I needed to do was work in dips internally, grab the density from DisplayMetrics and then use it to scale to pixels when calling drawing APIs and scale from pixels when receiving input events.

  4. If you're planning to do multiple versions of the app (e.g. a free and a paid one) use a Library Project. You can then put all your shared code and resources in a separate project. Create a new project for each variant and the build script will take care of merging the resources and code.


  1. UPDATE: The Android version of Persuasion has been retired but you can still play the web version.

  2. UPDATE: It appears Scoreloop no longer exists.