ZZT holds a special place in my memory for being the "game" that first sparked my interest in programming, way back in 1996. I wrote this retrospective on my old blog, and decided it was important enough to preserve here. Read on, if you're curious about languages and game development: ZZT is quite an interesting piece of history.

As you can probably tell from the above screenshot, ZZT is an ANSI-graphics top-down action-adventure-puzzle game. It was created in 1991 by Tim Sweeney, founder of Epic Games (then called Epic MegaGames), who went on to develop several notable shareware classics of the DOS era and became a key developer of the Unreal engine.

The registered version of ZZT came with four "worlds", each a self-contained game that could be completed in a few hours. While these worlds remain iconic even today, and did much to establish the basic formula for "classic" ZZT gameplay, they are not the reason ZZT is so interesting.

Notice the Board Editor option in the screen above? If you haven't guessed already, ZZT is in fact a complete game creation system. Using a wide variety of items, obstacles, and enemies, you can construct your own game worlds (stored in a ".zzt" file) and share them with others. You're not limited to the built-in entities, either: ZZT has special generic entities called Objects that can take on any appearance, whose behavior is determined by programs written in ZZT-OOP, the "Object"-Oriented Programming language.

ZZT-OOP is a weird, restrictive little language. Among its oddities:

  • You can't create new objects at runtime; all the objects you want to use must already exist before the game starts, with one extremely limited exception
  • There are no methods, functions, or anything else that would imply a call stack
  • The only flow control mechanism is the "message", which is ZZT's name for goto... except that code in one object can send a message to another object, causing that object to jump to a different point in its program (unless it is "locked", causing it to ignore all messages)
  • There are no statement blocks; the "if" statement, which is the only method of conditional flow control, performs a goto if the condition is true or falls through to the next statement if it's false
  • The only variable type is boolean, and you can't have more than ten variables set to true at the same time
  • All objects on a game screen execute their code simultaneously, but objects on other screens cannot be accessed, since a screen's state is frozen when the player leaves it

With this being the first programming language I learned, and QuickBASIC being the second, it's a miracle I ever managed to wrap my brain around modern languages at all. But the truth is, ZZT showed me how much fun programming could be, by setting it in the context of a game. Type in some cryptic codes, press a key, and there's a little smiley face running around trying to shoot you. Even the tiniest amount of effort yields instant results. This appealed to my ten-year-old attention span, and though I never finished any worlds of my own, ZZT permanently lodged a favorable impression of programming in the back of my brain.

Needless to say, I wasn't the only ZZT fan out there. Since the game's 1991 release, aspiring game creators have cooked up thousands of ZZT worlds, each one pushing the limits of the engine further than before. Glitches were discovered that, if properly exploited, allowed one to do previously impossible things, like making an object move diagonally or teleporting the player to an arbitrary location. The world file format was reverse-engineered and new editors were created, far surpassing the game's built-in editor. Ingenious coders transformed ZZT from a top-down action-adventure game into a sidescroller, an RPG, a stealth game, and many other genres.

As complex as some of the community's later works were, I'd say the reason ZZT was so successful and long-lived was its simplicity. The simplicity of the text-mode graphics and PC speaker sound effects precluded the possibility of a lengthy media creation process. The extreme simplicity of the scripting language, and the existence of a pre-built engine with a lot of basic functionality included, meant that it was easy to ignore the gritty details of making a game and focus on the actual gameplay. All of these things might seem like severe limitations (they are), but they also dramatically lower the barrier to entry for new world builders.

Relatively few games today are based on user-generated content to the extent that ZZT was, and even fewer have built-in scripting languages. In a 2007 interview, Tim Sweeney himself had these words to offer:

I've always wanted to build a massive-multiplayer version of ZZT. In other words, a vast interlinked game world built and extended by users using simple ZZT-like tools. Like ZZT, it would be open-ended and community-driven. Players would be able to build their own levels and write scripts for objects, as well as play the game as a character, build up attributes and collect items.

Such a project would tackle all the key technical problems of MMO development without the complexity of a 3D environment. The data required for levels and motion data is also so simple that servers could be run by the community without significant bandwidth expense.

Alas, such a game wouldn't be much of a Gears of War killer. :-) So don't expect it to actually happen. But it would be interesting!

Indeed it would, Tim. Indeed it would.

Further Reading

Z2 is the largest archive of worlds and other ZZT-related downloads on the internet, though much of its textual content is outdated. Be sure to check the Featured Games list, which includes a lot of famous and influential games in ZZT's history. DOSBox comes in handy for running ZZT on modern machines (>=10,000 cycles recommended). You might also want to check out ZZT's vastly-more-powerful-but-also-more-complex spiritual successor, MegaZeux, which is still developed today.