./castle.py <map file>
- Python 3.7
Create a YAML File defining the game map. The outer keys should be rooms, begin, goals
Define what rooms are in the castle. A room can have any name that isn't a space
rooms:
atrium: ~
ballroom: ~
east-staircase: ~
outside: ~
Define what things are in the room.
Put the player in the experience of the game by story telling about each room. This text will be displayed everytime the player finishes an action in the room.
rooms:
atrium:
description: | # Optional (defaults to None"")
You've stepped into a beautifully ornate atrium. It makes you wonder
why someone would spend this much money on a room no one ever really
stays in. Make sure to wipe your feet.
Usually there are doors leading to connected rooms.
Those door can be one-way or two-way because each room defines which doors are in it.
You should specify the name of the room you wish the player to enter when stepping through the door. It's also possible to specify a key used to lock this door or an alternate name for the door
rooms:
atrium:
doors:
office:
lock: office-key
name: Secret
There may be things laying around in the room the player can pick up.
Note: Currently the engine lets the player use these as keys for locked doors
rooms:
atrium:
items:
- office-key
Define the initial state of the game.
begin:
room: atrium
items: [] # Optional (defaults to [])
intro: | # Optional (defaults to None)
Welcome to the Game, This text is only shown once at the beginning.
Define the end state of the game
end:
room: outside
outro: | # Optional (defaults to None)
You found your way outside! You rock.