Kaveen's Adventure Game for the KIM-1 has been a topic in one of my last posts: https://netzherpes.de/post/adventure-game-engine-for-the-kim-1
Now I did my turn and wrote a little story for the text adventure engine.
In the repo of the Game you see a example story and how the *.YML is filled with content.
In the sources of 'Abirahasa you can find what this rudimentry Engine is capable of:
; Functionality Of Game Engine
; Scene
; - Has Text Content
; - Can Go Four Directions
; - Single Item Pickup
; Game State Supported Verbs
; - Scene Pointer - GO
; - Pickups - TAKE
; - USE
The finished story is being translated into assembler and compiled by a python script.
Use Linux. PHP uder windows is a pita!
YAML (yet another markup language) is a bit picky. Never use tabs, only spaces to structure your code. I had to learn it the hard way ;) --- you can translate the tabs into spaces with expand -t 4 infile.yml >outfile.yml
Every "scene" you build in gets an entry like this:
river:
text: |
You come to a little river. It is too dark to see how deep the river is. A half
sunken boat is tied to a post.
pickup: bones
north: path
south:
to: riverside
require: corks
text: |
The boat has a hole. You need to stuff it somehow
Rules: A room announced in the directions must exist.
Every room needs a text.
Well, the rest is self explaining... the directions to go to from the room can be north, south, ease and west.
Items are placed with "pickup:"
You should give it a try!
Have Fun!
yours,
webdoktor
P.S. If you want to play my humble story look here
Leave a Reply