A platformer for the Macintosh 512K. A knight races along the castle walls to the flag on the highest tower - double jump, dash, goblins to stomp, bats to dodge, 43 gems, four layers of parallax scrolling and sampled sound.
- Made for
- Macintosh 512K (64K ROM), System 3.2
- Written in
- 68000 assembler: 6,028 lines in 8 files
- Size
- 19 KB of code, 76 KB of sampled sound, 42 KB of graphics and the level
- Level
- 5,120 pixels long: 13 goblins, 11 bats, 43 gems, 6 checkpoints
- Speed
- up to 30 frames per second; movement is scaled by the frame time, so the game keeps its pace at the big towers
- Built with
- mac68k-asm and mac68k-disk
- Year
- 2026
- Runs on
- Macintosh 512K, 512Ke or Plus; System 3.2 or later; 400K floppy
A knight races along the walls of a castle to the flag on its highest tower, against the clock. On the way: goblins on the walkways and ledges, bats that swoop down when he comes close, moats, lifts and 43 gems.
- Moves. Run, jump as high as the Space key is held, jump a second time in the air with a somersault, and dash: a short fast move that ignores gravity and knocks out any goblin or bat in the way. Stomping a goblin from above bounces the knight up again.
- Hearts and checkpoints. A touch by a goblin or a bat, or a fall into a moat, costs one of three hearts. The knight starts again at the last checkpoint pennant he passed.
- The race. The clock runs until the knight takes the flag; the best time stays on the title screen.
How it was made
Castle was written by Claude Code, Anthropic’s coding agent, with mac68k-asm, mac68k-disk and the Mini vMac emulator, in which it tested every step itself - frame times measured with the VIA timer, the sound recorded and compared with the samples.
Under the hood: four layers that scroll at their own speed (sky with drifting clouds and the sun, mountains, a town, and the castle in front), drawn into the hidden one of the 512K’s two screen buffers and shown with a page flip; the knight, goblins and bats with a white halo so that they stand out against the dithered background; and a sound mixer that plays two sampled effects at once in every vertical blank. The graphics and the sounds are made by Python scripts.
| Key | Action |
|---|---|
| A / D | run left / right |
| Space | jump; again in the air: double jump |
| S or Shift | dash (also through goblins and bats) |
| P | pause |
| Q | quit to the Finder |
Screenshots from Mini vMac at the real speed of the machine.
castle.dsk : 400K MFS startup floppy "Castle" with System 3.2, Finder 5.3 and Castle; it boots straight into the game, the same disk as in the emulator.
Use it with a floppy emulator or a disk writer on a real Mac, or start it in Mini vMac or any other emulator of the first Macs.