Adventure Game Engine Design, Part 1

, Classic Macintosh, Programming

I want to make an adventure game in the style of those old HyperCard adventure games for old Macs (see HyperCard Adventures). They ran at 1-bit color depth (only black and white pixels) in a tiny, 512×342 pixel window. In fact, I want to make my game run on an old Macintosh, just for nostalgia and for the ÆSTHETIC.

If that’s what I want, why don’t I just fire up HyperCard right now and get cracking? I’ve made adventure games in HyperCard before!

Retro Development Is About the Vibes

I used to think that I could take a successful hobby project and get a job in industry, or maybe somehow monetize the project and turn it into a business. I now understand that this is foolish.

Stick figure with two paths. To the left is a slightly meandering path to a normal project. To the right is a wandering, forked, curling path to a hobby project, with dead ends and question marks.

I already got a job in industry.

It turns out that a good hobby project works in a radically different way from a “normal” project. In a normal project, the project goals drive everything else. For a normal project, I’ll write READMEs and documentation, get feedback from users, promote the project and get people to use it. The path to a normal project isn’t a straight line, it’s a meandering path of discovery as you solve some underlying problem.

Hobby projects do not solve a problem, and the project goals are secondary. I don’t know why you have hobbies, but I do hobbies to relax, keep my mind active, and work on problems that interest me.

It’s about the vibes.

Project Goals

“Keep the scope small,” is the advice you’d typically give someone who wants to finish their project. Well, what if I don’t want to finish the project? Obviously, I can make the scope as big as I like!

Write My Own Engine

If I just wanted to make an adventure game, I could do that without much programming at all. There is Adventure Game Studio, and there are engines like Unity and Godot which I’m sure would make this process a lot easier.

Support HTML5 and Old Macs

For the aesthetic, I’ll make the engine run on old Macs. By “old Macs,” I’m talking about Macs from the early 1990s with 68K processors. But I want people to actually play my game. I don’t want to force them to install Mini vMac or Basilisk II, and I don’t want to fuss about with PCE.js. So I’ll also make a version of the engine that runs in the browser.

Invent a Compression Scheme for 1-bit Images

Sounds like fun, right? Quick math says that a single 512×342 pixel image requires 22 KB of storage when uncompressed, which would only let you fit 36 full-screen images on a standard 800 KB floppy disk[1]. I’ve done some experiments, and with the right art style, compression ratios of 5:1 are within reach.

Design a New Programming Language

To keep the game content platform-neutral, I’ll design a new programming language for making adventure games.

I could use a data-oriented scheme like XML or JSON. I could use scripting language like Gravity, Wren, or Lua. Instead, I’m going to design a programming language just for this project.

Blast from the Past: Marty’s Adventures

The last time I made an adventure game was over 20 years ago. I dug up a copy of the HyperCard stack and fired it up in Basilisk II. It’s not a complete game, it only has a few locations.

Screenshot from abandoned HyperCard project from 2001 “Marty’s Adventures”, depicting Marty sitting in his living room chair.
Marty’s Adventures: so much UI

When I made this, I’m sure I loved implementing all this complicated stuff, like making buttons for different verbs. I probably saw all of those verbs on a screenshot of The Secret of Monkey Island and decided that my game needed verbs, too (it didn’t). For example, to open the door, you have to click “get”, then click on the house keys (on table in the picture above), which moves them to your inventory, then click on “use” and click on the keys in your inventory, and finally, click on the door.

Footnotes

  1. Fun fact: old Macs use the same 3.5″ double density disks as IBM-compatible PCs, but adjusts the motor speed for different regions of the disk. This lets the Mac pack 800 KB instead of the 720 KB familiar to PC users, but it also means that you can’t read double density Mac disks using a PC (even though it’s the same media).