Calypso is a game written by Dave Footitt. He wrote it using Inform 6. We collaborated to make it compile using PunyInform as well. The game has ~25 locations, a few NPCs, and 70+ other objects.
I’ve now worked with Dave to update Calypso to use the latest PunyInform version, the latest standard library version, and the latest compiler. I also put in some excellent abbreviations produced by ZAbbrev for good measure (Thanks @heasm66 for this lovely tool!) .
The game is currently available as three different Z-code files:
- Inform 6 z5 version, 74 KB
- PunyInform z5 version, 43.5 KB
- PunyInform z3 version, 42 KB
The different versions are close to identical in how they look and play. The Inform 6 version groups some static objects together in text in one location (e.g. “You see three stones here (yellow, green and red).”), while the PunyInform versions don’t. They could have, but it would have made them 1 KB bigger, and I thought the gain in functionality wasn’t worth the increase in size.
I tried running our Z-code interpreter Ozmoo in benchmarking mode, automatically playing through the game in 137 moves, and measure the time it took. I did this on an emulated Commodore 64 with a 1 MB REU (Ram Expansion Unit), which works like a RAM disk, i.e. a crazy fast harddrive for caching the entire story file. This means the slow disk drive of the C64 doesn’t play a part in these benchmarks, as the time measured is from the first prompt to the end of last move, and the story file is cached to the REU before the game even starts. So, how much time did it take?
- Inform 6 z5 version: 1478s, or 10.8s/move
- PunyInform z5 version: 184s, or 1.34s/move, i.e. 8 times faster than Inform 6 version
- PunyInform z3 version: 173s, or 1.26s/move, i.e. 8.5 times faster than Inform 6 version
This makes the PunyInform game play at a quite enjoyable speed on a 1MHz 8-bit computer like the C64, while the Inform 6 version does get quite tedious. The difference in speed gets a lot bigger without an REU, as the Inform 6 version will need quite a bit of swapping from disk, while either PunyInform version fits in RAM.
If one moves up to a 16-bit platform like the Amiga 500, the CPU is clocked 7x faster, but interpreters are typically written in C instead of assembly, so the actual speed is probably more like 2-3x faster than a C64. At this speed, the PunyInform version will still be a lot nicer to play. Once you move to clock speeds of say 20-30 Mhz, moves are quite fast enough in the Inform 6 version as well, and at 100+ MHz, both would appear to repond instantly each move. Modern computers typically run at 2000+ Mhz.
The game, both source code and binaries, is available at GitHub - dave-f/calypso: A simple text adventure written using Inform