Game Project: Rainbow Land

Rainbow Land is a small freeware board game I wrote for iPhone. It has a game field (“land”) painted in different colors, and you paint your land (starting from the lower left corner) in a new color every turn to get more territory than your opponent. Each game takes only a minute or two, perfect for a short break or a long waiting line.

Rainbow Land - a game in progress

Game history

I did not invent the game. I played something similar (can’t remember the name) in mid-nineties, then another implementation (Spider Ways) a few years later, then one day I remembered the game but couldn’t find it and wrote a Python implementation called ColorJam. And now I finally got around to port it over to iPhone. I chose a different name, because I wanted the game to have a background story: “Two wizards fight to control Rainbow Land. Change your color to get more land.” There, that does it for now.

Time management

This brevity reflects my approach to managing this project. I knew I had at most five hours a week for it, so I cut everything to the very minimum. I made a rough road map in a text file with weekly goals, then made more detailed plans for every day in upcoming week, sometimes updating the big picture. I was hoping to finish it in a few weeks, instead it took a few months, but now it’s finally ready and I’m quite happy about it.

I did most of coding in the early hours before leaving for my day job. This time works great for me. The mind is clear; the sleepiness dissolves quickly because I know I only have one hour at most; and then I also start my work at the office fully awake. I also did a few longer sessions on weekend, for tasks I could not split in small parts.

Scope management

As I said, I had to cut everything. So, there is no intro screen, no sound, no settings, no undo, redo, or even “new game” button. There is still support for all devices, color selection panel suitable for a phone, and support for easy change of images in future, which the Python version was lacking. I found these three things essential. I have a list of features that I may add some day, but my first goal was to release something usable soon.

Architecture

I decided to use Cocos2d, a 2D game framework for iOS. It simplified some of the image handling, provided some guidelines for organizing the project, and it leaves some easy possibilities for adding animations, sound and other effects. It looks quite popular and well supported, it’s free and open source. Looks like a perfect case for reusing an existing solution.

Beyond that, I already had a typical Model-View-Controller setup in the Python version, so I could translate the model and 80% of controller code more or less line by line, and only tinker with new inter-object relations in the iOS-specific graphics part. Overall it was quite smooth.

Lessons learned

Although everything went reasonably well with the project, the old principle holds true: everything always takes longer than expected.

  • You can’t really count on every day and every week. The key is to differentiate when you cannot keep your schedule for a good reason, and when you are just a bit lazy and need to force yourself to start.
  • Not all programming languages are equally convenient. Especially compared to Python, Objective-C is somewhat cumbersome, even with my several years of experience. It still has its benefits, and I still prefer it to any third-party generators for iPhone.
  • Supporting multiple screen sizes doesn’t happen fully automatically in iOS games. You have to pay a little attention to that, starting as early in the project as possible. I did it a bit too late because I was hoping for some magic to happen, so I had to rewrite some position calculations. So in general, some research and rough prototyping in the beginning of the project can help.
  • Deployment can be hard. There are many things to take care of with graphics, build configuration, code signing, registration, etc. Even if you did it multiple times before, doesn’t mean you won’t find new issues. And technical problems on another side last longest on weekends, when you are hoping to finish your project.
  • It is really helpful to split the project in very small tasks. It makes it possible to use every few minutes you have, and it also lets you think more clearly about the project.

Satisfaction

It’s a great experience to build a full app by yourself. It feels cool to play the game you wrote. It is a fun thing to bring up in a conversation and to show on the phone. I think it will be a warm feeling if other people download and use it, too. I’m looking forward to starting another project.

The game is currently in AppStore review. I will let you know once it’s ready for download (please subscribe by RSS or email). It’s free of charge, no advertising, source code available here.

Update: Rainbow Land is now available in the AppStore. Enjoy!

This post was written by Valentyn Danylchuk, the editor of Five-Hour Projects. You can also publish guest posts here, suggest projects to write about, or get interviewed – contact val@fivehourprojects.com

Comments

comments

Posted in Projects
Loading...
Get new posts:

- or - Subscribe to RSS