| Written by


Three weeks ago Erick Cardoza and I got together to try and build an iPhone game in 24 hours. This post is a reflection on that day/night:

Know Your Goals

My goal for the code-a-thon was to build the basics for an iPhone game. I had no plans of submitting to the app store that day. This wasn’t a single night endeavor. Instead it was a foundation to build off of; a test to see if I enjoyed building a game. Bug fixes, testing, and providing updates for the app were in the todo at the back of my mind, but they weren’t the goal of the evening. The goal was a functional iPhone game and I accomplished that (gold stars all around!)

One mistake was that I didn’t state this in the original post, and ended up taking some flak from the iphone game dev community – and rightfully so.

Be Physically Active

The morning of the code-a-thon I woke up and worked out. I’ve been working out 2-3 times a week since January. I can’t provide any evidence for it, but I know this helped me to maintain my concentration level during the night.

Alcohol = Bad

Erick and I started the evening with a celebratory beer and pizza. Bad move. With only 2 beers in me I was getting sluggish and tired at only 10PM. Downers don’t work for long haul projects. Stick with coffee – which helped tremendously.

Level select screen

Prepare Your Idea

We wasted about an hour at the beginning of the night going over the idea, the screen layouts, and how the game was to be played. We could have, and should have done this ahead of time.

Setup Your Environments

Both Erick and I had our environments totally prepared to go. We had all the software we needed downloaded and installed, and aside from the cocos2d framework we were familiar with all of it. Having a problem in this stage could easily derail any time based project.

Cut Scope Ruthlessly

By putting a time constraint on ourselves we were able to be ruthless in cutting scope. We had to be. Things that didn’t matter disappeared quickly out of the game. This isn’t as easy to do during day to day development, but with a time constraint it was dead easy!

Get it Done, then Get it Right

My code is a mess. Pure 100% spaghetti. But that doesn’t matter, because all the users see is puzzles and cat pictures.

I started with some great tutorials by Ray Wenderlich and extrapolated from there. I didn’t spend hours figuring out the perfect way to get cocos2d to work, I just made it work. I know there are numerous cocos2d sins lurking in my code base, but I can come back and refine that later, it won’t stop me from shipping.

Test the Waters

Erick and I have worked together before so we knew that we could do it. When doing a project like this, the only thing on the line is your sleep so it’s a great way to test the waters with someone you’ve never worked with before.

A finished game

Have Fun

As the night went and I got less and less coherent, the lol cats got funnier and funnier. We picked a very light project for the evening and had a great time doing it.

Do Anything

It took 24 hours to build something that I’m quite proud of. It’s no Angry Birds, but I’m super proud of the work that Erick and I both put into this game. I was able to scratch an itch, and it cost us little to do it. Jeff Atwood wrote an excellent post about this, and I like his quote:

If you aren’t building, you aren’t learning.

It’s really easy to get paralyzed by all the cool stuff that other people are doing, and not do anything yourself. By setting up a night to get things done, I feel less paralyzed than I did before, and I learned a ton.

With that said, LOLCat Slidez has been sent off to the app store for review, and I don’t expect to encounter any problems. Follow me on twitter @gavingmiller and I’ll let you know when it hits the app store!