Core Documentation
Essential Guides & References
Map Editor Guide
The definitive guide to The Forge, the in-game map editor. Covers height generation, lava and water physics, unit properties, player rosters, cutscenes, and publishing.
- ✓Multi-level cliffs, ramps, and procedural height
- ✓Unit gear, rank, patrol routes, and custom inventory
- ✓Cutscene director with letterbox camera movements
- ✓Multiplayer testing and 1-click workshop publishing
Custom Units & 3D Models
Step-by-step guide to generating 3D models with Meshy, auto-rigging bipeds, mapping the 9 canonical animation states, and wiring custom units into maps.
- ✓Text-to-3D and Image-to-3D prompts with 30k polycount targets
- ✓9 canonical states: idle, walk, attack, death, gather, hop, special_1..3
- ✓Multi-clip variation pools & adding custom ability animations
- ✓Data override schemas, projectile sockets, and R2 CDN hosting
Engine Hooks & Event Bus
How 3rd-party developers can hook into the deterministic simulation, listen to combat/VFX events, and extend game engine logic via pub-sub or custom ECS systems.
- ✓Decoupled EventBus connecting sim worker to UI and 3D renderers
- ✓Lifecycle, combat, VFX, item, and victory event schemas
- ✓Custom ECS System registration and update loops
- ✓Determinism rules: zero allocations, integer math, and ID ordering
Web APIs & Headless SDK
Complete REST API documentation for maps, lobbies, and ratings, plus the HeadlessGame SDK for running 1000x real-time simulations in Node.js with zero DOM dependencies.
- ✓REST endpoints for map publishing, ratings, and multiplayer
- ✓HeadlessGame Node.js runner for automated balance testing
- ✓Bot vs bot tournament benchmarking and match outcome metrics
- ✓Generative sprite and spatial audio synthesis API hooks
AI Creators & LLM Modding
How to prompt Claude, ChatGPT, Cursor, and other LLMs to design custom RTS game modes, deterministic trigger scripts, unit balance sets, and complete custom maps.
- ✓Exporting map context from The Forge for LLM prompts
- ✓Deterministic JSON AST without code execution or throws
- ✓Ready-to-use recipes: Tower Defense, King of the Hill, Boss Arena
- ✓Test-play with 1 click (Ctrl + Enter) in the live engine
Machine-Readable Context (llms.txt)
Standardized machine-readable references following the llmstxt.org specification. Drop these directly into an LLM context window or Cursor system prompt.
- ✓/llms.txt: Condensed manifest and architecture guide
- ✓/llms-full.txt: Complete TypeScript AST interfaces & fixtures
- ✓Full faction rosters, unit IDs, and building schemas
- ✓System prompt primer for automated level design
Design Principles
Deterministic Lockstep RTS Architecture
Unlike traditional RTS engines that execute arbitrary scripts or rely on host authoritative state streaming, Shards of Stone implements a total, deterministic simulation:
All triggers compile to a closed JSON AST. No sandboxes, no runtime bytecode compilation, and zero desync risk.
Nodes never throw exceptions. Dead units evaluate to safe zero-values, and loops are hard-capped to preserve frame rates.
Fixed 50ms simulation ticks rendered at 60+ FPS via hermite interpolation across Canvas 2D and Three.js 3D.
Press Ctrl + Enter in The Forge to instantly launch the real match engine with all custom triggers installed.
The Forge Manual
Map Editor Chapters
Introduction
Architecture, lockstep simulation, and format overview
Interface
Viewport navigation, brush sizing, hotkeys, and toolbars
Creating a Map
Dimensions, biomes, symmetric seeds, and layout types
Terrain & Height
Terracing, ramp placement, pathing, and vista anchors
Lava & Biomes
Contact rules, obsidian bridges, smoke, and lighting
Units & Properties
Health, facing, items, AI orders, and camps
Players & Teams
Seat allocations, factions, starting resources, and AI bots
Triggers
Deterministic AST, events, conditions, and UI counters
Data Overrides
Patching stats, cloning archetypes, and balance sets
Cutscenes
Camera keyframing, dialogue lines, and presentation
Testing
Ctrl+F9 / Ctrl+Enter launch, multiplayer verification, and fog
Publishing
Content hashing, validation passes, and map packaging
AI Creators & LLM Modding
Prompting LLMs to build game modes and triggers
Custom Units & 3D Models
Generating, rigging, animating, and wiring custom 3D models with Meshy and defOverrides
Engine Hooks & Event Bus
Simulation lifecycle, combat hooks, VFX events, and custom ECS systems
Web APIs & Headless SDK
REST endpoints for maps/lobbies/stats and 1000x headless game simulations