Wednesday, April 16, 2014

My Text Adventure Game Running on CP/M

After a couple more hours of work and I have my Abandoned Farmhouse text adventure game ported to CP/M using the BDS C compiler. The changes were similar to those needed for the Yum game, and included some changes for the available string functions and initialization of some large arrays.

I haven't played the game to completion but it seems to be working well. You can find source code and a CP/M binary here.

Below is a transcript of playing a short game.


B>advent
                      Abandoned Farmhouse Adventure
                            By Jeff Tranter

Your four-year-old grandson has gone missing and was last seen headed in the
direction of the abandoned family farm. It's a dangerous place to play. You
have to find him before he gets hurt, and it will be getting dark soon...

? help
Valid Commands:
Go east/west/north/south/up/down
Look
Use object
Examine object
Take object
Drop object
Inventory
Help
Quit
You can abbreviate commands and directions to the first letter.
Type just the first letter of a direction to move.
? i
You are carrying:
  flashlight
? l
You are at the door to the house.
You see:
  key
  bottle
You can go: east west
? drop flashlight
Dropped flashlight.
? t key
Took key.
? t bottle
Took bottle.
? n
You can't go north from here.
? l
You are at the door to the house.
You see:
  flashlight
You can go: east west
? w
You are in the kitchen.
? l
You are in the kitchen.
You see:
  candybar
You can go: south east down
? t candybar
Took candybar.
? w
You can't go west from here.
? l
You are in the kitchen.
You see:
  nothing special
You can go: south east down
? s
You are in the dining room.
? l
You are in the dining room.
You see:
  stale meat
You can go: north west
? u stale meat
The meat looked and tasted bad. You feel very sick and pass out.
Game over after 7 turns.
Do you want to play again (y/n)? n

B>

1 comment:

Ant said...

Following on from my comment on your post about compiling in CP/M using the BDS C compiler, I've now managed to get your Abandoned Farmhouse text-adventure game running on my system (a BBC Micro with Z80 co-processor)!

http://i.imgur.com/3AFM83Q.png