Juvenilia

David Stark / Zarkonnen
29 Sep 2013, 6 a.m.
Unlike a lot of programmers, I didn't get my start typing out BASIC programs. The first computers I had access to were Apple Macintoshes, first the ones at my dad's office, then my mother's Powerbook 160 - as it happens, the direct ancestor of the machine I'm typing this post on.

I programmed my first games on FileMaker Pro - a simple database program where each document was a set of virtual file cards. FileMaker also had a limited scripting language you could activate with buttons, and so it was possible to write programs by storing information in the card's fields and having the buttons manipulate it. Using this rather awkward technique, I wrote some games about traveling in space - each planet you could visit being its own file card.

A while after, I discovered Escape Velocity, which let you make "plugins" that added more stars, planets, spaceships and missions, by using a tool called ResEdit.

Making plugins was fun, but still pretty limited, so I tried to learn C. This failed pretty badly. One big reason was that the Mac didn't have a command line at the time, so my idea of "a simple program" was one that created a window and displayed some buttons and text. This was a trivial thing to do in FileMaker, but pretty difficult using the Mac's windowing toolkit. It certainly was enough of a hurdle for me to repeatedly fling my C textbook across the room in frustration.

Then, one day, a CD from a magazine I bought contained a demo version of REALbasic. Here, again, it was trivial to make a window with some buttons and text appear. A newly created RB program would automatically show a window, and adding buttons and text was as easy as dragging these elements from a toolbar. It was like FileMaker Pro, but far less awkward. I saved and bought the full version, and launched myself into REALbasic.

Things still weren't exactly straightforward - I'd received zero formal programming education, so simple concepts like data structures and subroutines were foreign to me. At first, in my games and other programs, all data was held in a number of lists. There would be a list of all the x-coordinates of all units, and another list of all y-coordinates. Removing a unit involved removing the right list index everywhere. I had constant problems revolving around forgetting to remove some list elements in some circumstances, causing the whole data to shift and become corrupted.

I remember the precise moment when I understood the point of these "data structure" things I'd seen lying around in the language - I was sitting in my parents' car, and it suddenly occurred to me that if I put all information pertaining to one item into the same data structure, it would be much easier to manage. I was very pleased and excited about this realization.

If you remember REALbasic, you probably shudder at the memory. Its ease of use, combined with its cavalier approach to error handling, unleashed a tide of badly written programs onto the world. For a few years, whenever you downloaded some shareware program, there was a good chance that within five minutes, you would get that dreaded "nil pointer" error message, revealing that this program was yet another piece of REALbasic junkware.

Still, with enough care and bug hunting, it was possible to write solid programs with it. The first game I tried making with RB, even before my data structure enlightenment, was called Asteroid Prospector. This game was somewhat inspired by the Gap series, which I was reading at the time. It was set in the solar system, in the mid-22nd century, with interplanetary flight being fairly common but not ubiquitous. You played as a lowly asteroid prospector sifting through the Mars-Jupiter belt for high-value asteroids worth mining, and selling the coordinates to mining corporations. With time, you could upgrade your ship to have better sensors, as well as ground probes you could shoot into the asteroids to get better details. On top of that, there would be the occasional wreck or alien artifact to be found and salvaged - the latter being mysterious and illegal to own. I got about as far as displaying a grid of asteroids you could click to scan before the complexity of the project overwhelmed my then rather limited skills.

Still, I persevered and improved, and finally managed to create a full game: a Maelstrom-like game called Asteroid Storm, which met with a fair amount of success: more than 50 000 people downloaded it. At this point, at age 17, I tried to go for a more ambitious project, this time inspired by the strategy game Chaos Overlords and the movies Mars Attacks! and Men in Black. This was going to be a tile-based strategy game about sneakily infiltrating human society with your flying saucers, abducting stray human beings for nefarious purposes, and doing battle with government agents. I had a whole lot of really neat ideas that distracted me from the central problem that I had no functioning core game mechanic. I got all the way to having a game menu and a game map where you could move around your saucers before I realized I was stuck.

Perhaps thankfully I entered university at that point, which had the dual effect of teaching me actual computer science and thoroughly distracting me from making games for half a decade...