And now, for something completely trivial.
Earlier this year, while my wife was navigating some tough days, I found myself with a lot of waiting time in doctor's offices, labs, etc. To occupy myself in these situations that uniquely combined hours of boredom mixed with stark terror, I started tinkering with an iPad product called Codea.
Codea is an app that allows you to develop directly on the iPad. The programming language, Lua, wasn't familiar to me, but it turned out to be easy to pick up and the Codea environment helped translate my first steps into visible results on the iPad.
Eventually, I turned to trying to reproduce a game I had worked on two decades ago, a mixture of simulation and gaming that became ChipBots. And just this week ChipBots finally made an appearance in the iOS App Store.
If you'd like to see a bit about the project, join me after the break.
Codea turned out to be a very friendly environment for anyone starting up on the iPad. I confess that I've done a bit of iOS coding before, and I've done a lot (a lot) of coding on other platforms, but I've always found the Objective-C language that Apple encourages to be too dependent on non-intuitive syntax and odd symbols. Plus, Apple's strict insistence on separation of interface and operation is not a bad approach to coding in general, but often a hindrance when you're just noodling around. For all Apple's insistence on ease-of-use and beginner friendliness on the consumer end of the experience, their development tools are full of arcane choices and finicky procedures.
Codea is a much, much easier place to get started in iOS than Apple's XCode development environment. The syntax is quick to pick up, the makers of the environment TwoLivesLeft have been very quick to address issues and add new functionality, and the community on their forums is ever willing to help with issues and make suggestions. Getting Codea is the best $10 I've spent in a long time.
While working with Codea, I thought about a task I was saddled with in my day job: picking the best out of several different tools that were designed to build connections between different computer systems. Every system that we looked at offered some kind of "visual builder" in which you laid out logic using icons and lines, but I found these tools to be more confusing than helpful, as the icons only masked areas where you had to dive down to set codes or even write script in a different language. The tools were a mess. If they were going to have an iconic language, why couldn't that language be straightforward and simple?
So I set out to create my own little development language, one where the icons were the language. Put that together with some thoughts of a Mac project I'd worked back in 1984, and I soon had the idea for an app where you programmed robots by dragging and dropping chips onto their motherboard.
You can see the earliest version of the effort in this video.
From there, the project inched forward. Over time, the number of "chips" in the robot's language grew, and trays on the programming screen to support different classes of chips. Cosmetic changes were made to give the game a "wire frame" appearance (I'd been looking at a lot of blueprints and was trying to catch that feel), and the design portion of the game was fleshed out to allow choices of different treads, bodies, radars, etc. that had an effect on how well a robot performed.
I was lucky enough that the FIRST Robotics competition finals were being held in St. Louis as I was working on this. I literally stopped some kids walking down the sidewalk on their way to the competition and held up my iPad to show them what I was building. They liked it, but suggested that the game needed more challenges other than just knocking the next bot's block off. So I went to work on giving the bots more to do.
You can see that progress in this video posted over the summer.
By then the game included a "skeet shooting" and "maze running" challenge for the bots, along with some fine tuning of the way the chip language worked to make this possible. The maze in particular turned out to be a tricksy problem and caused me to add some "daughterboards" that allow the robot programs to be longer. The daughterboards also have the neat feature of acting as "subroutines" without losing the drag and drop simplicity.
For a couple of months, as we were starting to get our lives back together and my wife was returning to her teaching job, I let the game lie fallow. But I picked it up a few weeks back and put a couple of long days into cleaning up bugs, inserting a few "tips" to help people get started, and in general tightening down code wherever I could. Finally, just a week ago I compiled the result and submitted it to the app store. After a few days of gnawing on my fingernails, it's actually out there (for free) and has been downloaded 30+ countries. Which is pretty darn cool.
There's still more I'd like to do with the app, such as allowing people to trade bots over the Internet and to compete against friends. I'd also like to add more challenges, more chips, more design options, more everything. But for now, I think I'll sit back and see what people think.
All of the code for ChipBots is available if anyone is interested. ChipBots is only one of several apps written in Codea that are now available on the app store. Go take a look.