Teaching my kid to code with a modern MUD
Educating My Child in Programming via a Modern MUD
While my daughter enjoys video games, I find that standard gaming is too passive. Simply navigating or conquering a digital world doesn't offer the same growth as building one. I want her to experience a multiplayer environment constructed from text, imagery, and a bespoke, lightweight scripting language—a place where she can dismantle every mechanism to understand its inner workings.
I grew up in an era where the View Source button was the ultimate mentor, and I believe she deserves that same transparency.
Introducing: Canon
I've created Canon, a contemporary, web-based reimagining of the classic MUDs (Multi-User Dungeons) from the early internet.
For the Uninitiated: Long before World of Warcraft turned the MMORPG into a corporate juggernaut, we had text-based realms known as MUDs, MUCKs, and MUSHes. These were vast, social landscapes built entirely from the written word.
My goal was to evoke that spirit while making it accessible to today's users. Canon is built on a specific philosophy regarding what constitutes a great MU* and an effective learning tool: Everything is player-made. Every single room, object, and interaction can be inspected, cloned, and tweaked.
If you have a fondness for telnet, the early web, or tabletop roleplaying, you'll likely find this appealing. But first, in the tradition of modern recipe blogs, let me give you the backstory.
The "Bicycle for the Mind": HyperCard
Do you remember HyperCard? (Stay with me here.)
Created by Bill Atkinson in 1985—reportedly inspired by an LSD trip—HyperCard was a revelation. I first encountered it in my 4th-grade computer lab in 1989, and it expanded my horizons. It turned buttons and images into interactive triggers.
HyperCard was a pioneer of HyperMedia and served as a precursor to Tim Berners-Lee's World Wide Web. A simple interaction looked like this:
on mouseUp
go to card id 123
end mouseUp
That is HyperTalk, the language of HyperCard. For basic tasks, you didn't even need to code; you just linked cards.
The Paradox of "Magic" and "Mediocrity"
In many ways, HyperCard was a "bad" application.
- It used MacOS visual elements but didn't feel like a native app.
- HyperTalk tried to mimic natural language (a mistake AppleScript would later repeat), which meant it wasn't quite a natural language or a precise programming language.
To a professional developer, it was an underpowered, frustrating tool. However, those very limitations made it magically accessible to two specific groups: curious children and non-programmers.
| Feature | HyperCard | Modern Professional IDEs |
|---|---|---|
| Barrier to Entry | Extremely Low | High |
| Feedback Loop | Instant | Compilation/Build Time |
| Flexibility | Constrained/Rigid | Infinite |
| Learning Curve | Intuitive/Experimental | Structured/Academic |
My First "Game"
At age nine, using a Macintosh SE, I realized that unlike other software, HyperCard was entirely editable. I decided to build a Street Fighter clone. I had no concept of "sprites" or professional game design; I just had a "hammer" and a lot of "nails."
I spent hours drawing individual cards for every single possible combination of player positions and moves, using buttons as the controls to jump between these cards.
The Evolution of my Process:
- Manual Linking: Clicking and linking every card by hand.
- Pattern Recognition: Noticing the
Script...button. - Optimization: Using a systematic naming convention and copy-pasting HyperTalk snippets to accelerate development.
- Formal Study: My teacher gave me the HyperCard Reference Manual, which I read from cover to cover.
Applying the Lesson to Canon
I won't make my daughter use HyperCard, but I want to replicate that specific blend of creative liberty and mechanical constraint.
The logic can be summarized as:
My goals for the environment:
- Objects are part of the game the moment they are placed on screen.
- Tools for creation are the same tools used to play.
- Code is powerful enough for fun mechanics but simple enough to be fully grasped.
The Architecture of the World
In a text-based world, you can create anything simply by typing: "There is a [thing] here." While you lose 3D physics, you gain infinite conceptual freedom.
Canon consists of three primary pillars:
- Players: The inhabitants.
- Rooms: The locations (text descriptions + optional images).
- Items: The objects.
Items are the most versatile. They can be pets, NPCs, spells, or vehicles. While they have text and images, their "soul" is defined by state and actions via a language I call Cant.
I'll be honest: Cant is not a "good" language by industry standards—and that is intentional.
Example of a Cant object:
item Hooded Lantern {
describe "An iron lantern with a hinged hood."
on light {
narrate "{player}’s {item} swings open and warm light spills out."
}
}
Learning Path Visualization
This structure provides the instant gratification necessary to keep a child engaged while subtly introducing the fundamental logic of programming.