A lightweight, browser-based procedural adventure game with isometric rendering, LLM-driven entropy, educational quizzes, and biome progression.
Screenshot is generated by Playwright capture in test mode (npm run screenshot / manually run .github/workflows/screenshot.yml); run the script locally if the image is missing
Emily's Game is an isometric, procedural world adventure designed for educational exploration and discovery. Players navigate a vast 1024×1024 cell world generated using novel LLM entropy mechanics, where language model outputs are mathematically processed into deterministic world seeds. The game incorporates educational elements through dynamic quizzes, a searchable in-game encyclopedia ("Book of Knowledge"), and subject-biased learning paths.
Key features include:
- Biome Progression: Forest → Cave → Castle with increasing difficulty
- LLM Entropy: SHA-256 hashed verb/noun pairs generate reproducible worlds
- Educational Content: 100-500 Q&A pairs per subject, rewritten for 12-year-olds
- Isometric Rendering: Canvas 2D with occlusion and depth sorting
- Procedural Generation: Hierarchical tile system with edge-matching and connectivity checks
- Isometric rendering engine with occlusion via height-based sorting
- Canvas 2D pipeline supporting emoji/SVG sprites
- Ego character with directional animations and collision detection
- Tile hierarchy: Micro (1×1), World Unit (5×5), Macro (5×5 chunks)
- Procedural solver with theme bias, rotation, placement, and BFS traversability
- Auto-tiling with bitmask neighbors for visual coherence
- Wordlist initialization with 50 verb/noun pairs (>10 letters each)
- Movement maps to pairs, hashed via SHA-256 for seeds
- Biome selection, cell flags, and growing entropy pool
- Fallback to RNG if LLM inference >1-2s
- Programmatic SVG character system with 3+ built-in variations
- 6-frame walking animations with caching
- Planned: Accessories, expressions, pixel art import
- Subject selection at game start (Math, Language, History, Science, Technology)
- Book of Knowledge: 50-100 articles per subject, searchable
- Word Bag for unfamiliar terms; "I don't know" quiz options
- Knowledge capture pipeline for content generation
- Sidebar UI for inventory, stats, interaction panel
- Save/load with 3-5 slots; fog-of-war; mini-map
- Performance optimizations: Throttled animations, GC reduction, DOM sync
- Sound via Web Audio API oscillators
- Language: TypeScript (v5.0+)
- Build: Vite
- Runtime: Browser (Canvas 2D)
- Assets: Emoji/SVG-based sprites
- LLM: BitNet 2B4T (local via subprocess/WASM)
- Content: JSON assets for quizzes and encyclopedia
- Node.js 16+
- npm 8+
- Local LLM server (BitNet) running on
http://127.0.0.1:8002(optional for development)
# Install dependencies
npm install
# Start dev server (hot reload)
npm run dev
# Build for production
npm run buildThe dev server will typically open at http://localhost:5173.
- Move: Arrow keys or WASD
- Interact: Space (when implemented)
- Quizzes: Answer educational questions to progress
- Explore: Navigate biomes, collect items, pet cats 🐈
npm run dev- Start development server (localhost:5173)npm run build- Build for productionnpm run typecheck- Run TypeScript type checkingnpm test- Run Playwright E2E testsnpm run screenshot- Capture game screenshot for README
src/
main.ts - Game loop, state management
render.ts - Isometric rendering pipeline
input.ts - Keyboard input handling
config/ - Game configuration files
ui.ts - DOM-based UI synchronization
gen.ts - Procedural world generation
llm.ts - LLM entropy system integration
index.html - Page template
Docs/ - Design documents (migrated to issues)
content/ - Educational JSON assets
tests/ - Playwright E2E tests
scripts/ - Automation scripts
.github/workflows/ - GitHub Actions CI/CD
See .github/workflows/ci-cd.yml for the automated build and test pipeline.
Note: GitHub Pages deployment is disabled as the game requires a local LLM server connection which is not available in static hosting environments.
- Isometric rendering with occlusion
- Basic player movement and collision
- Character sprites and animations
- UI sidebar and options menu
- Tile & world generation system
- LLM entropy integration
- Obstacle templates (doors, bridges)
- Save/load functionality
- Book of Knowledge encyclopedia
- Knowledge capture pipeline
- Subject selection and quiz biasing
- Sound effects and polish
- Performance optimizations
- CI/CD via GitHub Actions
- Accessibility features
- Multiplayer foundations
See the GitHub Issues for current tasks and epics. Planning documents have been migrated to issues for better project management.
- Issues: GitHub Issues - Active development roadmap
- Archived Docs: archived-planning/ - Historical reference
TBD
