4 ms·
I recently wrote a text-based adventure game in C, which I then ported to Z80 assembly language. My goal was to write a simple game that could run on a CP/M sy
by stevekemp 6y ago
I recently wrote a text-based adventure game in C, which I then ported to Z80 assembly language. My goal was to write a simple game that could run on a CP/M system.
Using C wasn't too painful, but I agree that using something else would have been more straightforward. I've ended up in a situation where the user can type "USE TORCH", but really they want to type "LIGHT TORCH". So I added that as a synonym, but once you do that in a few different places you end up accidentally supporting commands such as:
LIGHT THE BOOK
READ THE TORCH
They work, but they're utterly bogus from a logical point of view.
That said I'm pleased I managed to get it working at all, and my next step will be writing a third version using an infocom compiler & interpreter.
- anthk 6y agoTry Puny Inform, it may be a Frotz port for CP/M 2.2. https://vetusware.com/download/Infocom%20CPM%20Interpreters%20Various/?id=10878 https://vetusware.com/download/Infocom%20CPM%20Interpreters%... You can use infocpm. Just hexedit the COM file to match the DAT file (rename game.z3 to game.DAT). For example, if the OG interpreter works with zork1.dat, hexedit the file and replace zork1 with "game" so it matches "game.dat".
- anthk 6y agoFrom dm4.pdf, the advanced manual on inform6: Object -> "flashlight" with name 'flashlight' 'torch', description "It's a battery-powered flashlight, of the sort that switches on and off.", after [; SwitchOn: give self light; SwitchOff: give self ~light; ], has switchable ~on ~light;