MAFFia Postmortem
Work on the game then stalled for about a year—in fact, I didn’t write a line of code for the whole academic year. When I graduated in the summer of 2002, I decided that I should sit down and just write a whole game, and make sure I finished it whatever happened.
Amusingly, I failed in that task; after a couple of months I killed VolleyPong. It was, basically, boring to play. Nevertheless, the time wasn’t wasted—I learned a great deal from the experience.
However, uDevGames 2002 was starting and I wanted to enter something this year. While I was thinking, I thought I’d have a quick go on MAFFia, and I found it wouldn’t run at all on Mac OS X. I wanted to play the game, but I don’t like starting up in Classic. I knew it had the potential to be a fun game, and I thought I could probably make it live up to that potential in time for uDevGames 2002. With this in mind I decided to rewrite it for Mac OS X with Apple’s Project Builder. Thus, the single file in which all the code had previously lived was pinned down and roughly chopped into pieces, and I started to rebuild.
What Went Right
First of all, the move to Project Builder was the best decision I made. It’s prettier, it’s easier, it’s on Mac OS X, it’s free, and it has a debugger I can work out how to use. There has been a learning curve, of course, and I haven’t mastered it by any means, but I work far faster now than I ever could before. This decision was fundamental to the project—everything would probably have been very different had I stuck with MPW.
Other early decisions were very helpful too. Very early on, I made the decision to remove all the old event-handling code and use the Carbon Event Manager instead. This required that I significantly alter the structure of the program, but the time I saved later on vastly outweighed the time I spent making the changes. Likewise, using Interface Builder to redesign most of the interface and loading it from a .nib file necessitated disruptive change to begin with, but speeded up my work immeasurably in the long run.
Thanks to those decisions, I was able to quickly build a working interface as a base for the game, and add functionality piece by piece on top of that. I was surprised and delighted to find that slotting the gameplay into the interface was trivial, and subsequent modifications to the interface (and gameplay) were still easy. Overall, the foundations for the game were solid, which made polishing and altering the final product much simpler.
By the end of the project, of course, the solid foundations had all but disappeared under the weight of random hacks, late additions, and obscure, possibly-dangerous-to-touch bits whose actual purpose had slipped my mind. However, the underlying structure retained enough integrity that significant changes or additions to individual modules had minimal effects on other parts of the code.
For example, in the final two weeks I changed the scoring system radically, and entirely for the better: the Chain system added a layer of depth I hadn’t previously considered, and the scores now reflect skill levels much more accurately. Miraculously, I implemented it quickly without introducing new bugs, and the new scoring system is infinitely superior to the old.
Playtesting the game was very helpful as well; I received many useful suggestions from many helpful people in the last week or so, especially here on iDevGames. Needless to say, I playtested MAFFia a great deal myself. I also did my best to stress-test it frequently, trying to induce problems in whatever code I had changed lately, and always fixing them as soon as possible. I can’t quantify how much this policy helped me, but the general smoothness of development suggests it certainly did me no harm.
What Went Wrong
The one thing I really should have made and didn’t was a level editor. I spent a lot of time hand-editing XML in Project Builder; at the end of the project, every tedious five minutes of edit-build-test-repeat could have been 30 seconds of clicking and dragging had I invested the time in the beginning. Still, XML is very handy. I’d choose it as a format again, but I’d want to write specialized tools for making the files with.
The move to Mac OS X, and a new development environment, was not entirely smooth. Different compilers interpret code differently, and the change can throw up hard-to-trace bugs. I won’t go into details, but I will caution other coders to pay close attention to variable types in “simple” expressions. Actually, the whole experience of updating/replacing the old code was somewhat fraught—nothing ever went seriously wrong, but I was perpetually worried that it would.
Also, when I moved development onto Mac OS X, I encountered serious speed problems. The new compiler with the Jaguar development tools (GCC 3.1) helped a certain amount, but I still spent more than a week trying to squeeze more speed out of the fire-drawing routine. In the end, I got it about ten times faster than before, and it became much less of a problem, but it was far more time than I had wanted to spend on it.
Sound support was a problem too; it kept slipping down the to-do list, and only got implemented with less than two weeks to go. I suddenly encountered more speed problems, which were only partially resolved by lowering the sampling rate of the sounds. However, I decided there was nothing further I could do in the time available. It is still playable on fairly old machines, but I wish I’d devoted a bit more time to it earlier in the project.
Of course, I encountered other problems, but the vast majority were unremarkable: a few Project Builder issues, occasional teething troubles with new APIs, and various trivial coding errors. The problems weren’t necessarily any more tractable for their unremarkable nature, but in the long view they have no great importance.
Tools
Most importantly, the rather wonderful ProjectBuilder catered to all my coding needs. After using MPW for a couple of years, it was a revelation, and I’m sure it has many handy features that I haven’t discovered yet. InterfaceBuilder was valuable too, if a little buggy; Adobe Photoshop was as good as ever; and Resedit, SoundApp, Sampler, MallocDebug, and Disk Copy all deserve honorable mentions for the parts they played at various stages.
I couldn’t have completed the project without the help I got from the iDevGames forums—some very helpful and knowledgeable people hang around there. In fact, the whole site is an enormously useful resource, although I’m hesitant to call it a “tool.”
Conclusion
I’m pleased with MAFFia. I did what I set out to do: make a simple, accessible, fun game with a reasonably original game mechanic, in time for uDevGames 2002. Since release it’s had nice reviews and no reported bugs. It would even appear that it may have won something in uDevGames 2002, and surely there can be no higher accolade.
Having MAFFia in the contest certainly inspired me to finish and polish it. Essentially, uDevGames gave me an external deadline and a goal to work towards, and hence imposed a structure (however loose) that had been sadly lacking in my earlier programming efforts. In addition, the prospect of a wider public release than I could have engineered alone compelled me to polish the game more than I might otherwise have done. It was also strangely reassuring to know that at least 40 other people around the world were engaged in the same activity; I think the knowledge helped keep me going during the inevitable times of low motivation.
As for the future: most importantly, I need a job. Hopefully MAFFia will help me get one, and then I can start to think about what I want to make next. I have an idea for a game about sky-surfing (almost exactly as in the 2000AD comics) but it’s competing for mental space with three or four others, and I can’t imagine what I’ll actually end up doing next.
1 Macintosh Programmer’s Workshop or MPW, is a software development environment for the Classic Mac OS, written by Apple Computer.
Project Details
- Size: 3.4 MB
- Genre: Arcade
- Developer: William Reade
- Url: http://www.btinternet.com/~julianreade/
- Team size: 1
- Released date: November 15, 2002
- Project length: 6 months
- Development hardware: G4 400MHz, Mac OS X 10.2
- Critical applications:, Apple’s Project Builder and Interface Builder, Adobe Photoshop, SoundApp, ResEdit





Since 1998, iDevGames has been educating, supporting and enhancing the community of game developers that develop video games for Mac OS X & iPhone. Subscribe to our