How nikhil0074-dev/echoes-of-the-crypt-voice-controlled-ai-dungeon-crawler works
Echoes of the Crypt is a voice- and text-controlled dungeon crawler. The player speaks or types into the client; speech becomes a transcript, the interpreter produces a proposed command, and the deterministic game engine validates and executes it before the Phaser scene displays the result. The README documents optional server-side AI interpretation; the server also exposes command validation and preview. The graph preserves major UI, game-rule, persistence, and voice capabilities. Some connections are documented rather than verified in sampled implementation excerpts, so those edges are dashed.
Main entry points: GameController.ts Game controller · app.ts REST API · pipeline.ts Interpretation pipeline · engine.ts Game engine
Components 24
Game client
- App and menu
apps/game-client/src/App.tsx - Game screen
apps/game-client/src/components/GameScreen.tsx - HUD and panels
apps/game-client/src/components - Dungeon scene
apps/game-client/src/game/DungeonScene.ts - Game controller
apps/game-client/src/controller/GameController.ts - Save manager
apps/game-client/src/persistence/saveManager.ts - Settings storage
apps/game-client/src/persistence/settings.ts - Voice feedback and sound
apps/game-client/src/voice/VoiceFeedback.ts
Voice and commands
- Speech recognition
apps/game-client/src/voice/SpeechRecognitionManager.ts - Transcript processing
apps/game-client/src/voice/TranscriptProcessor.ts - Command interpreter
apps/game-client/src/controller/interpreter.ts - Interpretation pipeline
packages/ai-command-engine/src/pipeline.ts - Local parser
packages/ai-command-engine/src/localParser.ts - Text normalizer
packages/ai-command-engine/src/normalize.ts - Command validator
packages/ai-command-engine/src/validator.ts - LLM provider
packages/ai-command-engine/src/providers.ts
Game rules
- Game engine
packages/game-core/src/engine.ts - Grid and visibility
packages/game-core/src/grid.ts - Level construction
packages/game-core/src/level.ts - Game definitions
packages/game-core/src/constants.ts
Server services
- REST API
apps/server/src/app.ts - Rate limiter
apps/server/src/rateLimit.ts - Socket service
apps/server/src/sockets.ts
Other components
- Player
Connections 27
- Player → App and menu: starts game
apps/game-client/src/App.tsx - App and menu → Game controller: starts or loads
apps/game-client/src/App.tsx - App and menu → Game screen: renders
apps/game-client/src/App.tsx - Game screen → HUD and panels: renders
apps/game-client/src/components/GameScreen.tsx - Player → Speech recognition: speaks command
README.md - Speech recognition → Game controller: submits transcript
apps/game-client/src/components/hooks.ts - Game controller → Transcript processing: processes text
apps/game-client/src/controller/GameController.ts - Game controller → Command interpreter: interprets command
apps/game-client/src/controller/GameController.ts - Command interpreter → Interpretation pipeline: uses pipeline
- Interpretation pipeline → Local parser: parses locally
packages/ai-command-engine/src/pipeline.ts - Local parser → Text normalizer: normalizes text
packages/ai-command-engine/src/localParser.ts - Interpretation pipeline → Command validator: validates output
packages/ai-command-engine/src/pipeline.ts - Interpretation pipeline → LLM provider: requests interpretation
packages/ai-command-engine/src/pipeline.ts - Game controller → Game engine: executes command
apps/game-client/src/controller/GameController.ts - Game engine → Grid and visibility: uses grid rules
packages/game-core/src/engine.ts - Game engine → Game definitions: uses definitions
packages/game-core/src/engine.ts - Level construction → Grid and visibility: uses grid helpers
packages/game-core/src/level.ts - Game controller → Dungeon scene: updates game view
apps/game-client/src/game/DungeonScene.ts - Game controller → Save manager: loads and saves
apps/game-client/src/controller/GameController.ts - Game controller → Settings storage: loads and saves
apps/game-client/src/controller/GameController.ts - Game controller → Voice feedback and sound: plays feedback
apps/game-client/src/controller/GameController.ts - REST API → Rate limiter: limits requests
apps/server/src/app.ts - REST API → Interpretation pipeline: interprets transcript
apps/server/src/app.ts - REST API → Command validator: validates command
apps/server/src/app.ts - REST API → Game engine: dry-runs command
apps/server/src/app.ts - Player → REST API: requests server AI
README.md - Player → Socket service: connects live
README.md