Classic Game Engine
The Classic Game Engine powers text-based adventure games in Super Text Adventure. You define your entire game world as a JSON document, and the engine handles parsing player commands, managing state, and running all game mechanics.
What You Can Build
How It Works
1. You write a JSON file describing your world — rooms, items, NPCs, and creatures.
2. The engine loads your JSON as the world_data.
3. Players type natural-language commands like go north, take sword, or talk to wizard.
4. The CommandParser translates input into structured commands (verb + target + modifier).
5. The Engine routes commands to the appropriate Handler (movement, items, combat, etc.).
6. The handler processes the command, updates game state, and returns a text response.
Top-Level JSON Structure
Every game world is defined by a single JSON object with these top-level keys:
// world_data.json { "meta": { "name": "My Adventure", "description": "A short quest to retrieve the Crystal of Power.", "starting_room": "tavern", "version": "1.0" }, "rooms": { /* room definitions */ }, "items": { /* item definitions */ }, "npcs": { /* NPC definitions */ }, "creatures": { /* creature definitions */ } }
Quick Links
> World Structure — Full top-level schema details
> Rooms — Defining rooms, descriptions, and entry events
> Exits — Simple and complex exits, locks, hidden passages
> Items — All item types: weapons, consumables, keys, and more
> NPCs & Dialogue — Characters, dialogue trees, and quests
> Creatures — Enemies and their combat stats
> Combat — Turn-based combat mechanics
> Dice Rolls — D&D-style skill checks
> Flags & State — Global flags and game state tracking
> Containers — Openable and lockable containers
> Commands — All player commands and synonyms
> Full Example — A complete game world JSON