Prototyping with Codea

UPDATE: Since writing this, the developers of Codea have released an impressive number of huge updates to Codea. They have implemented many of the features I was hoping for, as well as many others. Go check it out if you’re at all interested.

It’s not very often that I talk about other games or apps on my blog, but I want to make an exception today to talk about a cool iPad app called Codea by developers TwoLivesLeft. This is a new iPad app that lets you write Lua code on your iPad and run it in-app. This means that you can use Codea to write and play game prototypes on your iPad. Say whaaaat?! Yes, on your iPad.

I first started hearing about the app on twitter a little before release, as some friends of mine were beta testing it. When it launched, I decided to check it out, long having wished for some way to write and run code on my iPad. I’ve spent several hours with it, and I’m quite impressed so far.

The first thing you need to know is that this will not let you create incredibly complex stuff. It’s 2D only, and it has a limited set of API calls available. However, what it is, is a fantastic prototyping tool, as long as you don’t mind typing on your iPad. They provide APIs that allow you to handle touches, and even accelerometer input.¬†They also provide some basic vector graphic drawing tools (draw lines, rectangles, and ellipses). They even include Daniel Cook’s open source sprite collections, so that you can do some basic sprite work.

When I started playing around with it, two things annoyed me almost immediately:

  1. There was no font support
  2. There was no way to add my own sprites to the app

However, in reading through the (very active) forums, I discovered a bunch of people sharing code to solve problems. One person wrote a vector-based font rendering class and shared it. I’m now using that and it’s great. Others pointed out that by using tools like iExplorer to access the iPad’s file system, you can dump folders of sprites into the app and have them show up. However, I quickly discovered was that I find myself using vector graphics for eveything instead of sprites. This keeps me focused on working on gameplay prototyping instead of getting bogged down in Photoshop doing pixel pushing to procrastinate.¬†TwoLivesLeft say they’re also working on getting a bunch of this stuff working in future updates, so I can only see it getting better.

However, there are still some things you should be aware of:

  1. Right now there’s no way to get code to/from the app, except via copying/pasting, or using iExplorer
  2. Support for Undo/Redo is pretty limited right now
  3. You can’t (nor will you ever be able to) export a game right from Codea to the App Store
  4. There’s no way to share code/projects with anyone else from within the app

But these are limitations I’m OK with. Having some way to retrieve files and drop new files in from my computer would be pretty great, though. I’m missing not having any kind of source control on my files. ;)

Finally, I thought I’d share a screenshot of the game prototype I’ve been working on in Codea. This is for a word game concept I’ve been playing around with. What you see is about 4 hours of work. I have built a working button class, I can build words out of letter tiles, and the words detect touches.

Codea Prototype

Screenshot of my word game prototype running in Codea

The other cool thing is this is only 4 files of code, each no more than 100 lines of lua. The vector graphics make it very fast to get stuff quickly drawing, and with prototyping, that’s extremely important. And let’s not forget that I can now write code while I’m not at my computer!

So yes, colour me impressed. The app is still a little rough in places, but the developers seem to be actively working on improving it. Even still, at under $10 it’s an amazing prototyping tool to have on my iPad.


* I chose to write this review on my own. I did not receive a review copy from the developer, nor did they request that I write anything. I just think their app is cool. :)