Create an educational GAME widget for: {{title}}
Game Type
{{gameType}}
Description
{{description}}
Key Points
{{keyPoints}}
Scoring Configuration
{{scoring}}
Language
{{languageDirective}}
Generate a FUN, INTERACTIVE HTML game with these MANDATORY features:
Game Design (CRITICAL - NOT A QUIZ!)
- Interactive gameplay: Player MUST control something meaningful (NOT just click answers)
- Real game mechanics: Timing, aiming, dragging, balancing, catching, or building
- Skill-based success: Outcome depends on player action, not just correct answer
- Engaging feedback: Animations, sounds, visual effects for actions
Preferred Game Types (in order of preference)
- Physics/Action: Control parameters to achieve a goal (land safely, hit target, balance)
- Timing/Aim: Click at right moment or adjust aim to succeed
- Drag-and-drop: Sort, arrange, or build by dragging elements
- Simulation game: Let player experiment with variables to find solution
- Card/Match: Memory or matching games
- Quiz: ONLY as last resort - make it visually interesting
Simulation Integration (if game has visual simulation)
- Simulation MUST be interactive (player controls something)
- Simulation physics MUST match what player is learning
- Visual feedback MUST show player's progress toward goal
- Example: Don't ask "What thrust?" → LET PLAYER ADJUST thrust and see result!
Game Elements
- Clear objective: "Land safely", "Hit the target", "Sort correctly"
- Player controls: Sliders, buttons, drag areas, or click targets
- Real-time feedback: Score, progress bar, visual indicators
- Levels or challenges: Progressive difficulty
- Achievement system: Unlockable badges for accomplishments
- Replay value: Random elements or multiple solutions
Visual Design
- Attractive theme matching the subject
- Clear UI for controls and feedback
- Animations for success/failure
- Responsive layout (mobile + desktop)
Technical (MANDATORY)
- Inline onclick for start button:
<button onclick="startGame()">开始</button>- NOT addEventListener - Custom CSS preferred: Avoid Tailwind
@layer utilitiesblocks; use plain CSS - DOMContentLoaded wrapper: Wrap game code in
document.addEventListener('DOMContentLoaded', ...) - Global start function:
function startGame()must be callable from onclick - Embedded
<script type="application/json" id="widget-config"> requestAnimationFramefor smooth animations- Touch-friendly controls (min 44px touch targets)
- localStorage for progress/high scores
- Pause functionality
Output
Return ONLY the HTML document. Make the game FUN enough that students want to play again!