game-engine
Installation
SKILL.md
Game Engine
Manages the game lifecycle from lobby to completion — state transitions, question progression, answer tracking, scoring, iframe communication, and real-time coordination between host and players.
Overview
- State Machine: lobby → playing → question → results → complete
- Host Controls: Start game, next question, show results
- Player Flow: Join lobby, play AI-generated game in sandboxed iframe, see feedback, view leaderboard
- Iframe Architecture: Parent owns game state, iframe is a dumb renderer, communication via MessageChannel
- Scoring: Points based on correctness + speed (validated server-side, not in iframe)
- Real-time: All state changes sync instantly via Convex