Alek Ratzloff e868d0e14f Add display abstraction
In case we want to run this on something that isn't an ANSI terminal, we
have the option to implement it however we want.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2021-11-20 19:38:06 -08:00
2021-11-20 19:38:06 -08:00
2021-11-20 19:38:06 -08:00
2021-11-18 18:05:40 -08:00

AGES - Adventure Game Engine, Stupid

This is a dumb little text adventure game engine I'm working on.

You can try out the example game by running:

python -m agame examplegame

I believe this requires only Python 3.6, but was written in Python 3.9. Tread with some caution.

Concepts

Actions are at the heart of the engine. These display things (such as the PrintAction), as well as change the state of the game (such as TeleportAction and RevealItemAction). They are invoked by triggers, described below.

Triggers are what drive the game, and turn human input into actions that are executed. They are responsible for parsing input, and executing actions based on input and game state. Items in a game have a mapping of the triggers that can activate a list of actions.

Items are what carry the behavior of actions, and what triggers look for to activate themselves. Items have descriptions for how they should be announced in the room, plus the actions for appropriate actions. Triggers will also use the list of synonyms provided by items to identify them.

ItemInsts are instances of items. Usually when you're dealing with items, you're actually dealing with an ItemInst. An Itemis stored in the game database, while an ItemInst is used in rooms and the player's inventory.

Rooms hold sets of items. The player is present in only one room at a time; this is mostly an organizational tool for locations in a game.

Variables are a simple string->value mapping held in the game's database.

The database is a single source of information for the game to use. The database contains all items, triggers, rooms, and variables that are used in the game. The database is not immutable; the rooms and variables in the database are expected to be altered at runtime. (Maybe this should change, although I don't feel like doing so right now.)

Description
Adventure Game Engine, Stupid
Readme 596 KiB
Languages
Python 100%