Chapter 3 — Quick Start
This section shows how to run AI RPG Engine and explore the included example worlds.
The examples are intentionally small, but they demonstrate how the engine works.
Installing Dependencies
Section titled “Installing Dependencies”Clone the repository and install dependencies:
npm installThen build the project:
npx tsc --buildRunning a Game
Section titled “Running a Game”To run an AI RPG Engine game, use the CLI:
node packages/cli/dist/bin.js runThis starts the terminal interface and loads the default starter world.
You will see a scene panel describing the current location, an event log, and a command prompt.
Navigating the World
Section titled “Navigating the World”Players interact with the world through commands.
Commands can be typed directly:
move cryptinspect altarspeak pilgrimattack ghoulThe interface also presents numbered options for available actions.
You can select them by typing the number associated with the action.
Both approaches are supported simultaneously.
Dialogue
Section titled “Dialogue”Talking to characters uses dialogue trees.
When a conversation begins, the engine shows dialogue options that depend on the current world state.
Your choices can:
- reveal information
- change character attitudes
- modify world state
- trigger other systems
Combat
Section titled “Combat”Combat uses the same action system as exploration.
An attack command produces a chain of simulation events:
- contact check
- damage calculation
- resource changes
- status effects
- defeat conditions
These events are recorded in the event log and presented to the player.
Saving Your Game
Section titled “Saving Your Game”The engine can serialize the entire world state.
Save files are generated automatically during play and can be inspected using the CLI.
ai-rpg-engine inspect-saveThis command prints the saved state in a readable format.
Replay
Section titled “Replay”AI RPG Engine supports deterministic replay.
Every player action is recorded, and the engine can replay those actions using the same random seed to reproduce the exact same sequence of events.
Run a replay using:
ai-rpg-engine replayReplay is extremely useful for debugging and automated testing.
Next Steps
Section titled “Next Steps”The remaining chapters of this handbook explain how the engine works internally and how to build your own worlds.
You will learn how to:
- define rooms and entities
- write dialogue trees
- build progression systems
- create new modules
- design new rulesets
Once you understand these pieces, you can build entirely new RPG worlds using the AI RPG Engine engine.