Added Tutorial Mode | Moksha
🕉️ Devlog — गुरु-दीक्षा: Teaching Karma Without Breaking Immersion "गुरु बिना ज्ञान नहीं।" Without a Guru, there is no knowledge. The Problem Moksha is a game rooted in Sanatan Shastra — Vedic Karma mechanics, Sanskrit concepts, rebirth cycles. It's intentionally deep. And that depth was quietly becoming its biggest barrier. New players would start the game and immediately face naama-jaap, vairaagya, prarabdha, chetana-jagriti — all at once, with no guidance. Within the first 30 seconds, most had no idea what they were doing or why. The game needed a tutorial. But it needed one that didn't betray what Moksha is. Why a Normal Tutorial Wouldn't Work The obvious solution — pause the game, show a tooltip, unpause — felt completely wrong for Moksha. Spiritually, a hard pause breaks the flow of consciousness. Mechanically, isPaused = true is deeply wired into audio ducking, gamepad state, and ambient layers. Hijacking it for tutorial logic would have introduced subtle bugs across every system. An earlier attempt at a tutorial (Issue #30) tried to live inside engine.js itself. That was worse — the engine is already the heaviest file in the codebase, and embedding tutorial step state there violated the entire modular architecture we'd been building toward. So I scrapped both approaches and started over. The Solution: गुरु-दीक्षा (Guru's Initiation) The new system is built around one philosophical reframe: a Guru doesn't stop the world to teach. They walk alongside you. This became the technical foundation too. A New Module — src/tutorial.js TutorialManager is a self-contained ES6 class. It doesn't import from engine.js or touch any game state directly. Instead, main.js passes it an engine state snapshot every frame via checkCompletion(state) . The tutorial reads — never writes. engine.js ──(no connection)──> tutorial.js main.js ──(snapshot feed)──> tutorial.js Zero coupling. Zero risk to existing systems. Slow Motion, Not Hard Pause When a tutorial card is visible, the game