Browser game starter
@gameforge/browser-game-starter
Turn a one-line game idea into a complete, playable single-file HTML5 canvas game: game loop, keyboard and touch input, score, best score, game over, and restart. Ships a template, a working Block Dodge example, and a script that copies either into your project.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "browser-game-starter",
- 3 "owner": "gameforge",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Turn a one-line game idea into a complete, playable single-file HTML5 canvas game: game loop, keyboard and touch input, score, best score, game over, and restart. Ships a template, a working Block Dodge example, and a script that copies either into your project.",
- 7 "category": "other",
- 8 "license": "MIT",
- 9 "compat": ["claude-code"],
- 10 "permissions": {
- 11 "shell": ["node scripts/new-game.mjs"],
- 12 "files": { "read": ["./game/**"], "write": ["./game/**"] }
- 13 },
- 14 "tests": {
- 15 "cases": [
- 16 {
- 17 "name": "scaffolds a titled game from the template",
- 18 "inputs": {},
- 19 "checks": [
- 20 {
- 21 "type": "command_exits_zero",
- 22 "command": "node scripts/new-game.mjs --title \"Star Catcher\" --idea \"catch stars, dodge meteors\" --out game/index.html"
- 23 },
- 24 { "type": "file_exists", "path": "game/index.html" },
- 25 { "type": "file_contains", "path": "game/index.html", "text": "<title>Star Catcher</title>" },
- 26 { "type": "file_contains", "path": "game/index.html", "text": "requestAnimationFrame(frame)" },
- 27 { "type": "file_contains", "path": "game/index.html", "text": "pointerdown" },
- 28 { "type": "file_not_contains", "path": "game/index.html", "text": "{{TITLE}}" }
- 29 ]
- 30 },
- 31 {
- 32 "name": "copies the Block Dodge example",
- 33 "inputs": {},
- 34 "checks": [
- 35 {
- 36 "type": "command_exits_zero",
- 37 "command": "node scripts/new-game.mjs --from example --out game/dodge.html"
- 38 },
- 39 { "type": "file_contains", "path": "game/dodge.html", "text": "<title>Block Dodge</title>" }
- 40 ]
- 41 },
- 42 {
- 43 "name": "replaces an existing game only with --force",
- 44 "inputs": { "game/index.html": "<p>old</p>\n" },
- 45 "checks": [
- 46 {
- 47 "type": "command_exits_zero",
- 48 "command": "node scripts/new-game.mjs --title \"Moon Hop\" --out game/index.html --force"
- 49 },
- 50 { "type": "file_contains", "path": "game/index.html", "text": "<title>Moon Hop</title>" },
- 51 { "type": "file_not_contains", "path": "game/index.html", "text": "<p>old</p>" }
- 52 ]
- 53 }
- 54 ]
- 55 }
- 56}
