Saturday, January 20, 2007

The Game that Changed My Life

Just this week, I bought a couple of video games. Yes, bought and not pirated. I make software for a living, so I don't pirate. No, they weren't the kind of fancy schmancy games that my son rents for the latest leading video game console on our big-screen TV. In fact, it was because my son had just rented a game for the XBOX 360 that I was talking to him about a game I had once played called Prince of Persia for the PC. This was the original side-scroller, with simple but elegant graphics and a great storyline, including a few genuine moments of emotional fulfillment. For some reason, I was feeling nostalgic, so I reached into the past for this game (through e-bay, where all our techno-kitsch lives), for the Sega Genesis, which is hooked up to my daughter's 13-inch TV. The other game I bought was, in a sense, made for the cuttingest-edge of technologies, but it is called Doom RPG. And this post will meander from the very beginnings of computers all the way to this cutting edge. Therefore, let me start at the beginning, because this is one of those long-chain causal relationships, as all life-changing events are.

When I was a kid, my dad was a computer programmer. At that time, to be a computer programmer, you pretty much worked at a bank, or a defense contractor. He worked for the latter. One day, which I still remember quite distinctly, he took us up to show us what it was all about, or at least the non-classified parts of it. This was circa 1969, so suffice it to say the computer filled a room. Connected to that computer was a small terminal, which had input (a keyboard) and output (a printer). There was no screen. My dad thought he could teach us something about the art of programming and what computers did in general by relating to us how a computer might be programmed to play a simple game like tic-tac-toe. He was a mathematician by training, so he broke down for us how the playing board could conceptually be rotated and flipped to the point that there are really only three first moves: corner, side, and center. At 7, this was my first introduction to abstract thinking. I liked it. If you don't understand it, don't worry, you can still get a job at Starbucks. But no, tic-tac-toe didn't change my life. In fact, after that point, I became so good at math that I always thought I would do that for a living. Here's a modern tic-tac-toe game for the computer. And here's one written by a nerd.

The other day, I was talking to my dad, and I asked him what was new. Now that he's into his seventies, there isn't much new. Just the same-old, same-old, working late into the night and long weekends to finish the latest overpromised, overengineered defense programming project! And here I was, hoping that someday I'd be too old to work like that anymore.

When I got to the ripe old age of ninth grade, I had gotten so good at math that they let me play on the timeshare computer after school. This was another room-sized computer somewhere, but it was connected to a small terminal in our school via modem. By small, I mean the terminal was only the size of a large desk. It had a keyboard, a modem, a printer (roll paper), a paper-tape reader, and of course a rotary-dial telephone next to it to dial-up the actual computer. As far as I knew, it only ran BASIC. The programs were stored locally on paper-tape, which is a roll of paper with holes in it about the size of pencil-holes, each representing one bit, arranged side-by-side in single bytes, about the width of masking tape. If your program was more than a couple of hundred bytes long, it was going to take a roll of paper the size and approximate weight of a roll of masking tape to store it. One one such roll was a program called TREK.BAS.

This program, if asked, would print out a set of instructions, and a screen using ASCII characters to display your ship, and what it could see from long-range sensors, short-range sensors, and when you fired photon torpedoes, it would print the galactic coordinates one after another, tracking the location of the missile as it travelled in the direction you told it. The short-range scan would take up about ten lines of paper, looking something like this:
.COMMAND:srscan
... 1 2 3 4 5 6 7 8 9 10
. 1 . . * . . * . . K .
. 2 . . . . . . . . . .
. 3 . . . . . . . . . .
. 4 . . . . . . . . . .
. 5 E * . . . . . . * .
. 6 . . . . . . . . . .
. 7 . . . . . . . . . .
. 8 . . . * . . . . . .
. 9 . . . . . . . . . .
.10 . . . . . . . . . .

You are the E, the Klingons are the K's, and the *'s are the stars. The program would print this screen whenever you wanted a short range scan, which was somewhat often for me. I closed down that closet many a late night when I really should have been doing something else. I don't know who paid for the paper for that thing, but I am personally responsible for President Nixon forming the Environmental Protection Agency in the seventies. It's funny, because I was never really much of a Trekkie. Yes, I know this is heresy among geeks, or at least it was, until that fateful day in 1977. I realized then that the thing I never liked about Star Trek, or for that matter most Sci-Fi until Star Wars, was the sanitized verson of the future that they had. In Star Wars, for the first time I saw it in a movie that made sense anyway, the computer broke down sometimes. Anyway, the game Star Trek dragged me from a love for mathematics to a love for computers. One of the most fun times I ever had with my dad was when I was writing a compiler for the Commodore 64 just for fun, and he was porting TREK.BAS to the HP150 microcomputer, just for fun, in the same room at the same time. My love for computers lasts to this day, as does his, I'm sure.

Which brings us back to today, and Doom RPG, and cell phones. The contract on my cell-phone was due to expire in November, which means I could get a new one practically for free, as long as I stay with Cingular AT&T, which I had planned to do anyway. Coincidentally, the battery life between charges on my two-year-old phone was down to about an hour anyway, so it was time for a change. For reasons similar to John Carmack's, I naturally started thinking about what kind of programming I could do with a new phone. I was also thinking about saving some money, both by writing programs I wanted on the phone, and by learning how to do ringtones for my daughter's phone and download them over USB cable. While doing research on this topic, I found Carmack's blog (above), and I also found the Motorola RAZR and all of its attendant hackage.

Because the phone has been heavily hacked (again, I wouldn't want to do any piracy, just personal programming), it was one of my prime candidates. However, it also was about eighty bucks even with the extended contract. At the same time, my daughter had discovered the w300i made by Sony Ericsson. This phone was on sale for $9.00 after rebate, so it fit my cheapo price-range, but it also has support for Java ME games with 3D support, FM Radio, Walkman (MP3), and Outlook calendar synchronization. As an added bonus, Carmack's afore-mentioned Doom RPG was available for this phone, and as that is the current gold-standard of cell-phone video games, I thought it was worth a look. The game I really want is Orcs and Elves, but I reasoned that by supporting Doom on that phone, I was encouraging a port of O&E to the same phone. The phone came with a data cable, and so far, I've gotten all the SDK's, signed up as a Cingular Developer, written some programs for it, downloaded others, and generally had a good old nostalgic time writing tiny programs in a heavily constrained environment for a very tiny screen, and it's all been a helluva lot of fun. I've even thought of porting this java game to the thing just for kicks.

Coincidentally, the game which my son rented from Blockbuster this weekend was called Star Trek:Legacy, with somewhat updated graphics from the aforementioned BASIC/Java game. He was playing it on our 100-odd-inch HDTV projector/screen on the XBOX 360 with 5.1 surround sound, and the graphics are nothing short of stunning. There isn't much to draw in space, so they make the most of it. It is quite impressive, with planets and nebulae and whatnot. It occurred to me that the screen he was playing the game on, rivals the main screen of the Star Trek Enterprise itself. (No, that's not my home theater in the picture. That guy is a REAL nerd). Anyway, I was walking down the hall tonight and I thought my son had gone out for a walk, because he wasn't in his room. He called out from his sister's room that to the contrary, he was in her room playing Shining Force on the old Sega Genesis. I guess some of my nostalgia rubbed off on him.