Over the weekend, I read about Cargo-Bot. It really caught my interest for two reasons.
- it was created on an iPad using Codea;
- it’s a game that includes Computer Science concepts.
I have downloaded the Codea and played with it previously. ”Hello World” and a quick calculator was truly the extent of my use. I guess I’m just a keyboard type of programmer guy.
So, I just had to check it out. It’s a free download from here.
Within seconds of downloading, I had it up and running. The “How was this game created?” was really interesting but how does it play? There’s a tutorial – tutorials are for wimps – let’s give it a shot. I loaded the “Easy” level.
Hey, this looks like the classic “Tower of Hanoi”. It took me a couple of minutes to realize that the items from the Toolbox didn’t work immediately. You have to drag them over into a Prog line and then click the big green play to make things happen. So, I fiddled a bit and got the knack. The idea is to move the cargo boxes in the stack to the layout in the goal.
It was a good bit of noodling but I finally got it to work. Then, there’s a nice surprise! You get the opportunity to record your actions and this recording ends up in the Photo library on the iPad. But, from there, you can upload the result to YouTube! So, here’s the result of my first attempt.
I played it a couple of times feeling pretty good and smug about myself. But, then I looked really closely and saw that I got one star for my efforts. Whaaaa……
Now, I’ve played enough Angry Birds to know that one star is a feeble effort. It gets the job done but that’s about it. What did I miss? How could I make it better?
Time to give in, I guess. I tapped “Hints” and found that the shortest solution uses 5 registers. I appreciate that now we’re using computer science language. Expecting to do some reading, I was pleasantly surprised that the tutorials were actually puzzles to solve showing the concepts. I worked my way through a couple and got the concepts of looping, routines, and conditional operations. And, more importantly, the advice that “Shorter programs are awarded more stars”. That made me smile. Optimize the code; forget brute force. I like this very much.
So, it was back to the first puzzle and I’m now getting it.
Oh, that feels good. Learning, puzzle solving, optimizing. Now I’m really getting it.
The categories are “Easy”, “Medium”, “Hard”, “Crazy”, and “Impossible”. Not being a sequential type of guy (slow learner, perhaps?), let’s try “Impossible”. Well, that was humbling. OK, let’s back off to, oh say, “Hard”.
That was a good way to chew up some time. But, success was there after a while. How long, I’ll keep to myself.
In total, this was a great experience. I can’t remember when I’ve last enjoyed solving puzzles this much. I’d like to say that I’ve solved them all but they are definitely a work in progress.
Quite quickly, the games passed Tower of Hanoi for puzzling and frustration and satisfaction when solved.
Computer Science teachers should take to this immediately. There’s a real appreciation for the end product as well as the work that would have gone into it. Every Computer Science teacher has solved Hanoi and passed the experience on to students, right? You’ll appreciate the visualization of the algorithms that are created. There’s just something reinforcing when things go right; and it’s funny to watch a runaway loop or going beyond the bounds of the game and the effect it has. (I won’t spoil it)
If you’re not a Computer Science teacher, you’ll still appreciate a fantastic collection of puzzles.