How grimgriz/dragonsleep-8bit works
DRAGONSLEEP is a browser-based, 8-bit turn-based RPG. The player starts in Silverton, explores connected towns, roads and dungeons, talks to characters and triggers story events, then fights encounters and earns rewards while progressing the party toward the lake and the post-lake expansion. The runtime separates field exploration, scripted events, combat and rules, with JSON-authored world and game data. README documents generated art, audio, and special full-resolution scenes. Some runtime wiring is inferred only from documented responsibilities; unsampled source limits the call relationships shown.
Main entry points: main.js Browser boot · scenes.js Scene stack · events.js Story and events · world.js Field exploration
Components 20
Game runtime
- Browser boot
js/main.js - Loop and input
js/core.js - Scene stack
js/scenes.js - Field exploration
js/world.js - Menus and dialogue
js/ui.js
RPG systems
- Story and events
js/events.js - Turn-based combat
js/battle.js - Character rules
js/rules.js - Behind fountains
js/deep.js
Game content
- Authored JSON
content - World maps
content/maps - Runtime data bundle
data/data.js
Presentation and scenes
- Cradle scene
js/cradle.js - Dream scene
js/smoke.js - Pixel art
js/art.js - Sprites
js/sprites.js - Monster art
js/bestiary-art.js - Game font
js/font.js - Chiptune audio
js/audio.js
Other components
- Player
Connections 20
- Player → Browser boot: starts game
- Browser boot → Runtime data bundle: loads data
- Browser boot → Loop and input: starts loop
- Browser boot → Scene stack: pushes title
- Player → Loop and input: provides input
- Authored JSON → Runtime data bundle: compiled as
- World maps → Runtime data bundle: included in
- Story and events → Turn-based combat: starts fights
- Story and events → Character rules: creates heroes
- Behind fountains → Story and events: uses event systems
- Field exploration → World maps: reads map data
- Field exploration → Story and events: triggers events
- Scene stack → Menus and dialogue: presents menus
- Field exploration → Pixel art: draws tiles
- Pixel art → Sprites: supports rendering
- Pixel art → Monster art: supports rendering
- Scene stack → Game font: renders text
- Scene stack → Chiptune audio: plays audio
- Cradle scene → Chiptune audio: plays scene sound
- Dream scene → Chiptune audio: plays scene sound