Yoink
I also thought hard about games which I found particularly inspiring. The classic arcade game Joust has always fascinated me, with its simple Newtonian physics and contact-based attacks. Bombjack and Defender also sprang to mind for similar reasons. Taking a little inspiration from each of those games, I wrote myself a short design document and set about my coding.
Only one question remained: what should this game be called? CodeWarrior wanted me to give the project a name before it would let me do anything else, so I typed the first thing that popped into my head—“Yoink.” It was meant to be a working title, but I have been unable to think of anything better and lots of people seem to like it as it is, so Yoink it shall be!
Programming and Game Asset Tools
Yoink was written in C++ and built with Metrowerks CodeWarrior 8, and I used Interface Builder to make the preferences dialog and the rest of the out-of-game interface. I also used CodeWarrior and BBEdit Lite to write most of the XML for the scene and object definitions.
The graphics were all drawn one pixel at a time in Adobe Photoshop 7 and the animation was worked out in the accompanying ImageReady application. Using this technique, it took a very long time to get the animation right—I must write a proper sprite editor and animator for future projects!
PlayerPro was used to prepare the sound effects and ResEdit was used to put the sounds into the game’s resource file (about the only use I have for old-style resource forks). I made good use of sound effects from the download section at iDevGames, as I was unable to create my own sounds.
What Went Right
Leveraging Past Code
Perhaps the most important decision I made was to build Yoink on top of the existing code base I had created for my previous (and still ongoing) game, Super Phoenix. I already had a maths and physics library I called M3, a simple application shell called CarbonApp and a lot of smaller pieces of code for handling things like DrawSprocket. I realized I could save myself a lot of time by reusing it. This decision wasn’t entirely clear-cut, however. By re-using M3, much of which was written several years ago when I first learned C++, I inherited all of the design flaws and bugs that it contained. Maybe I should have tried to learn something like SDL instead, but in the end I settled on reusing my own code—at least I knew what was wrong with it!
Graphical Look
With this fundamental decision made, I needed to consider carefully how to deal with the graphical aspects of the game. I intended to create all the graphics myself, so I had to make sure that there would be time to create the character and scenery graphics. With this in mind, I decided to have intentionally blocky low-resolution graphics, since I reasoned that making the sprites smaller would allow me to draw them more quickly. I then sat down and drew all the scenery graphics in about two hours! The character graphics took a lot longer, however. Even at the small size of 32×32 pixels, animation is still very difficult and I had to do a great deal of experimentation to discover the best way of animating certain sequences.
My decision to use blocky sprites and tiled scenery turned out to be surprisingly popular. I had originally been concerned that people would not accept a game with ‘primitive’ graphics, but in fact almost everyone who saw Yoink had very positive things to say about its “cute” and “retro” graphic style!
Programming Within My Abilities
Most of the programming was not particularly difficult. Like Super Phoenix, Yoink displayed almost all of its graphics using only texture mapped quads. Sprites were quads, bullets and explosions were quads, and the scenery was made out of grids of quads. There was no cleverness involved, no special optimization or usage of complicated OpenGL extensions, not even anything as simple as display lists, just the most basic form of rendering known to man. Even so, the game was very fast on all but the oldest graphics hardware, so I spent my time developing the game instead of worrying about efficiency.
XML-based Data Storage
I had some difficulty deciding whether to write a special level editor tool or whether to just manually write the level data into a text file. In the end, I decided to keep things simple and stick to hand-written data, but I created an XML-based format to store my data. I chose XML because I had just discovered a particularly good C++ XML library: TinyXML. Loading and parsing text data has never been my strong point, so by using this library to do all the hard work for me I saved a great deal of time. The downside of this decision was that creating the level data itself was time consuming and required a lot of trial and error. I will definitely make a graphical editor to build the rest of the levels!
Organization
I think I managed to remain fairly organized during the three month development period, although I didn’t manage to add all the features I wanted. I planned to release a preview of Yoink every two weeks or so, and for each new version I decided which features I should add and tried to concentrate only on those features. This helped me to focus on building the most vital parts first instead of spending time on irrelevant extras.
Game Design Tweak
I made one particularly important organizational decision: about halfway through the development period, I had a choice between adding more enemies and refining their behavior, or adding the boring things which make the game feel complete, such as the title screen, menu, and game over message. I went for the latter, and I think that was the right thing to do. I ended up with less game content, but the game felt much less like a tech demo and more like a real game.
What Went Wrong
Project Size
My biggest mistake was not so much underestimating the size of the project, but underestimating my ability to work on it continuously. Had I worked every evening and weekend for the entire three months’ duration, I would have been able to include every feature I had planned. However, as it turned out, I found it extremely difficult to keep my motivation up and my schedule suffered accordingly.
Design Document
I also had difficulty keeping my plan under control. The gameplay concept remained more or less the same throughout, but my programming methodology changed almost every week. One week I would rip out the animation system and replace it with a better designed version with more features, and the next I would completely discard object-oriented design principles and copy the entire class of each character instead of properly migrating shared code into the base class. I was very much aware that I was being inconsistent, but I was afraid that going back and fixing my mistakes would cost too much time, so much of the bad coding remained in place.
Confidence
Confidence almost failed me at one point. Towards the end of the development period I became concerned that Yoink was not of a high enough standard. I felt that the concept and the graphics were coming along well, but the game was lacking in content and gameplay, and I would not be able to fix those problems in time for the deadline. Thankfully, when I asked in the iDevGames forum whether I should withdraw from the contest, my fellow programmers managed to beat some sense into me and I was convinced to carry on regardless!
Summary
Yoink was my first attempt at completing an entire game within a fixed time limit, and with hindsight I am extremely pleased that I managed to get as far as I did. I may have failed in my self-imposed challenge, but I feel that it was a reasonably convincing effort, and the feedback I received from other developers and voters made me realize that I am doing something worthwhile.
I learned a couple of very important lessons from uDevGames 2003. Firstly, I now know exactly what I am capable of, both in terms of practical ability and motivation. Yoink is a small game, and that is all I can do in three months. Secondly, I know for sure something I have suspected for a long time: all of the ambitious ideas I have for magnificent plot-led RPGs and interstellar flight simulators are likely to be beyond my reach forever. I will certainly never be able to complete anything more substantial than a small arcade game unless I am prepared to team up with others and become a great deal more disciplined. Sadly, since my real work must take priority over my hobbies, I may never have enough time and energy to do these things.
Still, this isn’t the end of my developing days. I still intend to finish Yoink and give it the improved gameplay, extra characters and levels, and amusing plot that I failed to deliver for the contest. I will also continue working on Super Phoenix, as well as some other smaller projects such as the aforementioned sprite editor. These projects will probably all be open source and free of charge, in the hope that I’ll be able to contribute something useful to the Mac game development community.
I’d also like to enter next year’s contest. I have an idea in mind already—strangely enough, it has no cute characters, no tricky animation, no plot, nothing but gameplay! Maybe I’ll be able to finish that on time!
Joust,C++,CodeWarrior,BBEdit,XML,SDL,Carbon,retro





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