From Napkin
Builds web-based game engines and games using HTML5 Canvas, WebGL, and JavaScript. Covers game loops, physics, collision detection, sprites, tilemaps, audio, controls, and multiplayer via WebRTC.
How this skill is triggered — by the user, by Claude, or both
Slash command
/napkin:game-engineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build web-based games and game engines using HTML5 Canvas, WebGL, and JavaScript. This skill includes starter templates, reference documentation, and step-by-step workflows for 2D and 3D game development with frameworks such as Phaser, Three.js, Babylon.js, and A-Frame.
assets/2d-maze-game.mdassets/2d-platform-game.mdassets/gameBase-template-repo.mdassets/paddle-game-template.mdassets/simple-2d-engine.mdreferences/3d-web-games.mdreferences/algorithms.mdreferences/basics.mdreferences/game-control-mechanisms.mdreferences/game-engine-core-principles.mdreferences/game-publishing.mdreferences/techniques.mdreferences/terminology.mdreferences/web-apis.mdBuild web-based games and game engines using HTML5 Canvas, WebGL, and JavaScript. This skill includes starter templates, reference documentation, and step-by-step workflows for 2D and 3D game development with frameworks such as Phaser, Three.js, Babylon.js, and A-Frame.
The following concepts form the foundation of every web-based game engine.
Every game engine revolves around the game loop -- a continuous cycle of:
Use requestAnimationFrame for smooth, browser-optimized rendering.
<canvas> elementrequestAnimationFrameStarter templates are available in the assets/ folder. Each template provides a complete, working example that can be used as a starting point for a new project.
| Template | Description |
|---|---|
paddle-game-template.md | 2D Breakout-style game with pure JavaScript |
2d-maze-game.md | Maze game with device orientation controls |
2d-platform-game.md | Platformer game using Phaser framework |
gameBase-template-repo.md | Game base template repository structure |
simple-2d-engine.md | Simple 2D platformer engine with collisions |
Detailed reference material is available in the references/ folder. Consult these files for in-depth coverage of specific topics.
| Reference | Topics Covered |
|---|---|
basics.md | Game development introduction and anatomy |
web-apis.md | Canvas, WebGL, Web Audio, Gamepad, and other web APIs |
techniques.md | Collision detection, tilemaps, async scripts, audio |
3d-web-games.md | 3D theory, frameworks, shaders, WebXR |
game-control-mechanisms.md | Touch, keyboard, mouse, and gamepad controls |
game-publishing.md | Distribution, promotion, and monetization |
algorithms.md | Raycasting, collision, physics, vector math |
terminology.md | Game development glossary |
game-engine-core-principles.md | Core design principles for game engines |
| Issue | Solution |
|---|---|
| Canvas is blank | Check that you are calling drawing methods after getting the context and inside the game loop |
| Game runs at different speeds | Use delta time in update calculations instead of fixed values |
| Collision detection is inconsistent | Use continuous collision detection or reduce time steps for fast-moving objects |
| Audio does not play | Browsers require user interaction before playing audio; trigger playback from a click handler |
| Performance is poor | Profile with browser dev tools, reduce draw calls, use object pooling, and optimize asset sizes |
| Touch controls are unresponsive | Prevent default touch behavior and handle touch events separately from mouse events |
| WebGL context lost | Handle the webglcontextlost event and restore state on webglcontextrestored |
npx claudepluginhub ani1797/forge --plugin copilot-sdk3plugins reuse this skill
First indexed Jun 6, 2026
Routes game projects to the right platform, dimension, and engine sub-skill. Use when starting a game, choosing between Phaser, PixiJS, Three.js, Babylon.js, Godot, Unity, or Ink/Twine.
Scaffolds and implements a playable 2D (Phaser) or 3D (Three.js) game prototype with core loop, input, scoring, and dev server. For fast prototyping without assets or polish.
Orchestrates game development projects by routing to platform-specific sub-skills based on context. Teaches core principles including game loop, pattern selection, input abstraction, and performance budgeting.