
Building Letterplex 1.0
This Summer, a friend and I built our first Android game, called Letterplex.
It’s a two-player word game inspired by Letterpress on iOS. We both love Letterpress and wanted to make something with just as much polish for Android (also, I really wanted to be able to play—my family has an iPad, but my wife uses it and I didn’t want to mess up her matches).

We worked on it on the evenings and some weekends. It took about four months from start to finish, and this is how we built it:
- My friend Yu-Shen wrote a version of the game in Java (using Swing) which ran on a desktop computer. It was kind of hard to play and looked really ugly, but we thought “maybe this won’t be so hard after all!”.
- I wrote a minimal UI toolkit that uses OpenGL ES 2 directly to render. I’ve written a bunch of toolkits and GL apps before so this didn’t take too long. I spent the most time getting text to work nicely; the Android APIs only deal with characters, you can never get the glyphs out, so if your font has, say, an “ff” ligature then it would render badly. I ended up porting Pango to Android and writing an OpenGL backend for it. All of that code is here: https://github.com/iamralpht/letterplex
- We worked on connecting to Google Play Game Services for the turn-based game service. We ended up writing a new client for it for desktop Java, as well as using the Android one. This meant we could develop on desktop (with about ~1s between hitting run and the game showing up) and play directly on my phone. This worked out pretty well, though the API definitely feels pretty new. When I hooked up our Choose Opponent button to launch the Google Games activity for picking an opponent, we were both really disappointed—the Google UI is so ugly! I ended up writing a new UI for playing against a recent opponent, though you still have to use the Google one to invite someone you’ve never played against before.

- I wrote a minimal physics engine! It models springs, gravity and friction using closed-form solutions. It’s a bit like Facebook Rebound, but smaller, more flexible and way more efficient. I’m planning on open-sourcing it, but I haven’t packaged it up yet. I personally believe that good physics is essential for any touch-based UI, so it’s neat to be able to do it without melting the CPU! This is the only time in my life that calculus has been useful.
- Yu-Shen worked on In-App Billing, which turned out to be kind of a hard API to use. We got there in the end, though. You can play two matches at a time for free (forever, for as many matches as you want), or you can upgrade to play lots of matches simultaneously. Hopefully that’s cool. We definitely didn’t want to be scammy with IABs (“pay now to defeat your opponent unfairly!”), and the original Letterpress on iOS was very good about this, too.
At this point, we were about two months in and you could play games to the (bitter, bitter) end and it seemed like we should be able to ship really soon. In reality we spent the next two months cleaning it up, polishing it and fixing random bugs and crashes. I’m really proud of the in-app help (hanging indents, baby!) so make sure you check that out ☺. We also made sure it ran on some really seriously old Android 2.3 devices. As soon as we released 1.0 on October 1, we got a review reporting a new crash we’d never seen before. Oops! (It’s now fixed. Can’t win ‘em all.)
So after all that, we’ve released our first ever Android app and we hope that you enjoy playing it.