A text adventure game engine built with TypeScript.
To run the app locally, clone it down and install dependencies:
git clone https://github.com/akuny/foozle.git
cd foozle
npm install
Now you can start it up:
npm start
The app is built and bundled on startup.
foozle's index.js
file is a very simple server that exposes the
bundled app. Most of the action is in the src/
directory.
As-is, foozle expects to load src/disk.json
when it runs. The disk
object
is the game itself, which comprises two properties:
"player": {
"alive": true,
"inventory": []
}
"rooms": [
{
"name": "The Room's Name",
"hasPlayer": true,
"connections": [],
"roomStates": [],
"items": []
}
]
You'll find definitions of connections, roomStates, and items in src/ts/types/index.js
.
foozle's design was largely pieced together using examples from Michael J. Roberts' TADS 2 Author's Manual and the original Zork source code.