원클릭으로
game-engine
Game state machine, lobby system, question flow, scoring, and real-time game coordination
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Game state machine, lobby system, question flow, scoring, and real-time game coordination
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
File upload, parsing (PDF, PPTX, DOCX, ODT, HTML, MD), and Convex storage for lesson materials
Convex database schema, queries, mutations, actions, and real-time subscriptions for LessonPlay
Gemini API integration for generating pedagogically-grounded game questions from lesson content
shadcn/ui patterns, game UI components, responsive layouts for classroom use
| name | game-engine |
| description | Game state machine, lobby system, question flow, scoring, and real-time game coordination |
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.
lobby → playing → question ←→ results → complete
↑ |
└──────────────┘ (next question)
| From | To | Trigger |
|---|---|---|
| lobby | question | Host clicks "Start Game" |
| question | results | Host clicks "Show Results" OR timer expires |
| results | question | Host clicks "Next Question" (if questions remain) |
| results | complete | Host clicks "Next Question" on last question |
Points = correctness_points + speed_bonus
correctness_points = correct ? 1000 : 0
speed_bonus = correct ? max(0, 500 * (1 - timeMs / timerDuration)) : 0
Max points per question: 1500 (correct + fastest possible)
TIME_UP to iframe via MessageChannelParent and iframe communicate via a private MessageChannel:
MessageChannel, transfers one port to iframe via initial postMessageallow-scripts + allow-same-origin in sandboxconvex/games.ts — Game state mutationsconvex/answers.ts — Answer submission and scoringconvex/players.ts — Player management and scorescomponents/GameIframe.tsx — Sandboxed iframe wrapper with MessageChannel