@opengamehq/cli 0.9.8 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +37 -17
- package/CHANGELOG.md +11 -0
- package/README.md +7 -6
- package/dist/cli.mjs +135 -135
- package/dist/opengame-global.js +3 -3
- package/dist/preflight-worker.mjs +10 -10
- package/dist/runtime-builder.mjs +1 -1
- package/dist/skills/manifest.json +1406 -142
- package/dist/skills/opengame-accessibility/SKILL.md +48 -32
- package/dist/skills/opengame-all-in-one/SKILL.md +195 -0
- package/dist/skills/opengame-all-in-one/references/opengame-accessibility/README.md +102 -0
- package/dist/skills/opengame-all-in-one/references/opengame-api/README.md +107 -0
- package/dist/skills/opengame-all-in-one/references/opengame-assets/README.md +168 -0
- package/dist/skills/opengame-all-in-one/references/opengame-assets/references/pipeline.md +164 -0
- package/dist/skills/opengame-all-in-one/references/opengame-audio/README.md +238 -0
- package/dist/skills/opengame-all-in-one/references/opengame-audio/helpers/audio-chain.js +325 -0
- package/dist/skills/opengame-all-in-one/references/opengame-audio/references/mix-notes.md +125 -0
- package/dist/skills/opengame-all-in-one/references/opengame-audio/references/qa-without-ears.md +177 -0
- package/dist/skills/opengame-all-in-one/references/opengame-capture/README.md +128 -0
- package/dist/skills/opengame-all-in-one/references/opengame-capture/references/pipeline.md +114 -0
- package/dist/skills/opengame-all-in-one/references/opengame-capture/references/threejs.md +161 -0
- package/dist/skills/opengame-all-in-one/references/opengame-characters/README.md +180 -0
- package/dist/skills/opengame-all-in-one/references/opengame-characters/references/first-person-body.md +108 -0
- package/dist/skills/opengame-all-in-one/references/opengame-characters/references/integration.md +144 -0
- package/dist/skills/opengame-all-in-one/references/opengame-characters/references/player-og.md +160 -0
- package/dist/skills/opengame-all-in-one/references/opengame-cli/README.md +189 -0
- package/dist/skills/opengame-all-in-one/references/opengame-deploy/README.md +223 -0
- package/dist/skills/opengame-all-in-one/references/opengame-deploy/references/json-events.md +63 -0
- package/dist/skills/opengame-all-in-one/references/opengame-deploy/references/manifest.md +89 -0
- package/dist/skills/opengame-all-in-one/references/opengame-deploy/references/packaging.md +119 -0
- package/dist/skills/opengame-all-in-one/references/opengame-depth/README.md +154 -0
- package/dist/skills/opengame-all-in-one/references/opengame-enemies/README.md +155 -0
- package/dist/skills/opengame-all-in-one/references/opengame-enemies/references/pacing-and-bots.md +108 -0
- package/dist/skills/opengame-all-in-one/references/opengame-enemies/references/threejs.md +193 -0
- package/dist/skills/opengame-all-in-one/references/opengame-front-end/README.md +185 -0
- package/dist/skills/opengame-all-in-one/references/opengame-front-end/references/launch.md +50 -0
- package/dist/skills/opengame-all-in-one/references/opengame-front-end/references/menus.md +81 -0
- package/dist/skills/opengame-all-in-one/references/opengame-game-feel/README.md +181 -0
- package/dist/skills/opengame-all-in-one/references/opengame-game-feel/helpers/spring.js +146 -0
- package/dist/skills/opengame-all-in-one/references/opengame-game-feel/references/feel-numbers.md +142 -0
- package/dist/skills/opengame-all-in-one/references/opengame-game-feel/references/killcam.md +88 -0
- package/dist/skills/opengame-all-in-one/references/opengame-jam/README.md +114 -0
- package/dist/skills/opengame-all-in-one/references/opengame-lighting/README.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-lighting/helpers/light-pool.js +185 -0
- package/dist/skills/opengame-all-in-one/references/opengame-loading/README.md +135 -0
- package/dist/skills/opengame-all-in-one/references/opengame-loading/helpers/loading-count.mjs +115 -0
- package/dist/skills/opengame-all-in-one/references/opengame-loading/references/threejs.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-look/README.md +181 -0
- package/dist/skills/opengame-all-in-one/references/opengame-look/references/matching-a-reference.md +73 -0
- package/dist/skills/opengame-all-in-one/references/opengame-look/references/painterly.md +69 -0
- package/dist/skills/opengame-all-in-one/references/opengame-look/references/post-and-lens.md +73 -0
- package/dist/skills/opengame-all-in-one/references/opengame-maps/README.md +74 -0
- package/dist/skills/opengame-all-in-one/references/opengame-maps/references/map-spec.md +77 -0
- package/dist/skills/opengame-all-in-one/references/opengame-mobile/README.md +86 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/README.md +183 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/briefs.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/edge-cases.md +27 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/finishing.md +126 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/montage-capture.md +151 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/montage-gates.md +84 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/montage-genres.md +198 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/montage-ops.md +127 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/reference-study.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-make/references/song.md +64 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/README.md +193 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/briefs.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/montage-capture.md +151 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/montage-gates.md +84 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/montage-genres.md +198 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/montage-ops.md +127 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/reference-study.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-plan/references/song.md +64 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/README.md +174 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/briefs.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/finishing.md +126 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/montage-capture.md +151 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/montage-gates.md +84 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/montage-genres.md +198 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/montage-ops.md +127 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/reference-study.md +293 -0
- package/dist/skills/opengame-all-in-one/references/opengame-montage-review-and-improve/references/song.md +64 -0
- package/dist/skills/opengame-all-in-one/references/opengame-multiplayer/README.md +139 -0
- package/dist/skills/opengame-all-in-one/references/opengame-multiplayer/references/bot-lobbies.md +71 -0
- package/dist/skills/opengame-all-in-one/references/opengame-multiplayer/references/netcode.md +165 -0
- package/dist/skills/opengame-all-in-one/references/opengame-performance/README.md +177 -0
- package/dist/skills/opengame-all-in-one/references/opengame-performance/helpers/landing-pacer.mjs +86 -0
- package/dist/skills/opengame-all-in-one/references/opengame-performance/references/measuring.md +123 -0
- package/dist/skills/opengame-all-in-one/references/opengame-performance/references/webgpu.md +86 -0
- package/dist/skills/opengame-all-in-one/references/opengame-production/README.md +192 -0
- package/dist/skills/opengame-all-in-one/references/opengame-production/references/team.md +107 -0
- package/dist/skills/opengame-all-in-one/references/opengame-production/references/templates.md +153 -0
- package/dist/skills/opengame-all-in-one/references/opengame-quality-bar/README.md +170 -0
- package/dist/skills/opengame-all-in-one/references/opengame-quality-bar/references/cheap-tells.md +43 -0
- package/dist/skills/opengame-all-in-one/references/opengame-quality-bar/references/judges.md +95 -0
- package/dist/skills/opengame-all-in-one/references/opengame-quality-bar/references/review-prompt.md +32 -0
- package/dist/skills/opengame-all-in-one/references/opengame-rhythm/README.md +134 -0
- package/dist/skills/opengame-all-in-one/references/opengame-rhythm/references/charting.md +109 -0
- package/dist/skills/opengame-all-in-one/references/opengame-rhythm/references/timing.md +92 -0
- package/dist/skills/opengame-all-in-one/references/opengame-router/README.md +54 -0
- package/dist/skills/opengame-all-in-one/references/opengame-router/references/process.md +38 -0
- package/dist/skills/opengame-all-in-one/references/opengame-scene-audit/README.md +136 -0
- package/dist/skills/opengame-all-in-one/references/opengame-scene-audit/helpers/scene-audit.js +677 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/README.md +283 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/references/engines.md +93 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/references/frame.md +107 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/references/identity.md +111 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/references/leaderboards.md +115 -0
- package/dist/skills/opengame-all-in-one/references/opengame-sdk/references/radio.md +71 -0
- package/dist/skills/opengame-all-in-one/references/opengame-stability/README.md +112 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/README.md +160 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/archetypes.md +113 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/briefs.md +273 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/core.md +129 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/craft.md +299 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/edge-cases.md +27 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/finishing.md +126 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/gates.md +184 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/music.md +148 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/ops.md +154 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/review.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-make/references/title.md +92 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/README.md +172 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/archetypes.md +113 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/briefs.md +273 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/core.md +129 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/craft.md +299 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/edge-cases.md +27 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/finishing.md +126 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/gates.md +184 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/music.md +148 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/ops.md +154 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/reference-set.md +92 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/review.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-plan/references/title.md +92 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/README.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/archetypes.md +113 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/briefs.md +273 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/core.md +129 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/craft.md +299 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/edge-cases.md +27 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/filmable.md +244 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/finishing.md +126 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/gates.md +184 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/measure.md +282 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/music.md +148 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/ops.md +154 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/owner-eye.md +214 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/review.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-trailer-review-and-improve/references/title.md +92 -0
- package/dist/skills/opengame-all-in-one/references/opengame-verification/README.md +197 -0
- package/dist/skills/opengame-all-in-one/references/opengame-verification/helpers/browser-evidence.mjs +74 -0
- package/dist/skills/opengame-all-in-one/references/opengame-weapons/README.md +179 -0
- package/dist/skills/opengame-all-in-one/references/opengame-weapons/references/handling-numbers.md +114 -0
- package/dist/skills/opengame-all-in-one/references/opengame-weapons/references/reloads-and-hands.md +96 -0
- package/dist/skills/opengame-all-in-one/references/opengame-weapons/references/sights-and-scopes.md +98 -0
- package/dist/skills/opengame-all-in-one/references/opengame-weapons/references/threejs.md +240 -0
- package/dist/skills/opengame-all-in-one/references/opengame-world-physics/README.md +141 -0
- package/dist/skills/opengame-all-in-one/references/opengame-world-physics/references/measured-failures.md +79 -0
- package/dist/skills/opengame-api/SKILL.md +32 -6
- package/dist/skills/opengame-assets/SKILL.md +79 -31
- package/dist/skills/opengame-assets/references/pipeline.md +67 -0
- package/dist/skills/opengame-audio/SKILL.md +129 -41
- package/dist/skills/opengame-audio/references/mix-notes.md +44 -1
- package/dist/skills/opengame-audio/references/qa-without-ears.md +177 -0
- package/dist/skills/opengame-capture/SKILL.md +44 -20
- package/dist/skills/opengame-capture/references/pipeline.md +33 -1
- package/dist/skills/opengame-capture/references/threejs.md +17 -1
- package/dist/skills/opengame-characters/SKILL.md +94 -39
- package/dist/skills/opengame-characters/references/first-person-body.md +108 -0
- package/dist/skills/opengame-characters/references/player-og.md +1 -1
- package/dist/skills/opengame-cli/SKILL.md +4 -4
- package/dist/skills/opengame-deploy/SKILL.md +35 -15
- package/dist/skills/opengame-deploy/references/json-events.md +6 -5
- package/dist/skills/opengame-deploy/references/packaging.md +28 -26
- package/dist/skills/opengame-depth/SKILL.md +61 -33
- package/dist/skills/opengame-enemies/SKILL.md +96 -40
- package/dist/skills/opengame-enemies/references/pacing-and-bots.md +108 -0
- package/dist/skills/opengame-enemies/references/threejs.md +59 -0
- package/dist/skills/opengame-front-end/SKILL.md +85 -39
- package/dist/skills/opengame-front-end/references/menus.md +42 -8
- package/dist/skills/opengame-game-feel/SKILL.md +95 -47
- package/dist/skills/opengame-game-feel/references/feel-numbers.md +59 -0
- package/dist/skills/opengame-game-feel/references/killcam.md +88 -0
- package/dist/skills/opengame-jam/SKILL.md +42 -27
- package/dist/skills/opengame-lighting/SKILL.md +85 -34
- package/dist/skills/opengame-loading/SKILL.md +78 -38
- package/dist/skills/opengame-loading/helpers/loading-count.mjs +115 -0
- package/dist/skills/opengame-loading/references/threejs.md +32 -7
- package/dist/skills/opengame-look/SKILL.md +122 -51
- package/dist/skills/opengame-look/references/matching-a-reference.md +73 -0
- package/dist/skills/opengame-look/references/painterly.md +69 -0
- package/dist/skills/opengame-look/references/post-and-lens.md +10 -3
- package/dist/skills/opengame-maps/SKILL.md +78 -0
- package/dist/skills/opengame-maps/references/map-spec.md +77 -0
- package/dist/skills/opengame-mobile/SKILL.md +18 -18
- package/dist/skills/opengame-montage-make/SKILL.md +187 -0
- package/dist/skills/opengame-montage-make/references/briefs.md +293 -0
- package/dist/skills/opengame-montage-make/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-montage-make/references/edge-cases.md +27 -0
- package/dist/skills/opengame-montage-make/references/filmable.md +244 -0
- package/dist/skills/opengame-montage-make/references/finishing.md +126 -0
- package/dist/skills/opengame-montage-make/references/measure.md +282 -0
- package/dist/skills/opengame-montage-make/references/montage-capture.md +151 -0
- package/dist/skills/opengame-montage-make/references/montage-gates.md +84 -0
- package/dist/skills/opengame-montage-make/references/montage-genres.md +198 -0
- package/dist/skills/opengame-montage-make/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-montage-make/references/montage-ops.md +127 -0
- package/dist/skills/opengame-montage-make/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-montage-make/references/owner-eye.md +214 -0
- package/dist/skills/opengame-montage-make/references/reference-study.md +293 -0
- package/dist/skills/opengame-montage-make/references/song.md +64 -0
- package/dist/skills/opengame-montage-plan/SKILL.md +197 -0
- package/dist/skills/opengame-montage-plan/references/briefs.md +293 -0
- package/dist/skills/opengame-montage-plan/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-montage-plan/references/filmable.md +244 -0
- package/dist/skills/opengame-montage-plan/references/measure.md +282 -0
- package/dist/skills/opengame-montage-plan/references/montage-capture.md +151 -0
- package/dist/skills/opengame-montage-plan/references/montage-gates.md +84 -0
- package/dist/skills/opengame-montage-plan/references/montage-genres.md +198 -0
- package/dist/skills/opengame-montage-plan/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-montage-plan/references/montage-ops.md +127 -0
- package/dist/skills/opengame-montage-plan/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-montage-plan/references/owner-eye.md +214 -0
- package/dist/skills/opengame-montage-plan/references/reference-study.md +293 -0
- package/dist/skills/opengame-montage-plan/references/song.md +64 -0
- package/dist/skills/opengame-montage-review-and-improve/SKILL.md +178 -0
- package/dist/skills/opengame-montage-review-and-improve/references/briefs.md +293 -0
- package/dist/skills/opengame-montage-review-and-improve/references/day-one-questions.md +46 -0
- package/dist/skills/opengame-montage-review-and-improve/references/filmable.md +244 -0
- package/dist/skills/opengame-montage-review-and-improve/references/finishing.md +126 -0
- package/dist/skills/opengame-montage-review-and-improve/references/measure.md +282 -0
- package/dist/skills/opengame-montage-review-and-improve/references/montage-capture.md +151 -0
- package/dist/skills/opengame-montage-review-and-improve/references/montage-gates.md +84 -0
- package/dist/skills/opengame-montage-review-and-improve/references/montage-genres.md +198 -0
- package/dist/skills/opengame-montage-review-and-improve/references/montage-grammar.md +320 -0
- package/dist/skills/opengame-montage-review-and-improve/references/montage-ops.md +127 -0
- package/dist/skills/opengame-montage-review-and-improve/references/og-snipers-record.md +110 -0
- package/dist/skills/opengame-montage-review-and-improve/references/owner-eye.md +214 -0
- package/dist/skills/opengame-montage-review-and-improve/references/reference-study.md +293 -0
- package/dist/skills/opengame-montage-review-and-improve/references/song.md +64 -0
- package/dist/skills/opengame-multiplayer/SKILL.md +143 -0
- package/dist/skills/opengame-multiplayer/references/bot-lobbies.md +71 -0
- package/dist/skills/opengame-multiplayer/references/netcode.md +165 -0
- package/dist/skills/opengame-performance/SKILL.md +106 -65
- package/dist/skills/opengame-performance/helpers/landing-pacer.mjs +86 -0
- package/dist/skills/opengame-performance/references/measuring.md +51 -0
- package/dist/skills/opengame-performance/references/webgpu.md +86 -0
- package/dist/skills/opengame-production/SKILL.md +119 -54
- package/dist/skills/opengame-production/references/team.md +107 -0
- package/dist/skills/opengame-production/references/templates.md +106 -16
- package/dist/skills/opengame-quality-bar/SKILL.md +94 -42
- package/dist/skills/opengame-quality-bar/references/cheap-tells.md +14 -7
- package/dist/skills/opengame-quality-bar/references/judges.md +95 -0
- package/dist/skills/opengame-quality-bar/references/review-prompt.md +10 -5
- package/dist/skills/opengame-rhythm/SKILL.md +138 -0
- package/dist/skills/opengame-rhythm/references/charting.md +109 -0
- package/dist/skills/opengame-rhythm/references/timing.md +92 -0
- package/dist/skills/opengame-router/SKILL.md +10 -2
- package/dist/skills/opengame-scene-audit/SKILL.md +64 -47
- package/dist/skills/opengame-scene-audit/helpers/scene-audit.js +97 -19
- package/dist/skills/opengame-sdk/SKILL.md +26 -9
- package/dist/skills/opengame-sdk/references/engines.md +2 -2
- package/dist/skills/opengame-sdk/references/identity.md +10 -11
- package/dist/skills/opengame-stability/SKILL.md +59 -27
- package/dist/skills/opengame-trailer-make/SKILL.md +164 -0
- package/dist/skills/opengame-trailer-make/references/archetypes.md +113 -0
- package/dist/skills/opengame-trailer-make/references/briefs.md +273 -0
- package/dist/skills/opengame-trailer-make/references/core.md +129 -0
- package/dist/skills/opengame-trailer-make/references/craft.md +299 -0
- package/dist/skills/opengame-trailer-make/references/edge-cases.md +27 -0
- package/dist/skills/opengame-trailer-make/references/filmable.md +244 -0
- package/dist/skills/opengame-trailer-make/references/finishing.md +126 -0
- package/dist/skills/opengame-trailer-make/references/gates.md +184 -0
- package/dist/skills/opengame-trailer-make/references/measure.md +282 -0
- package/dist/skills/opengame-trailer-make/references/music.md +148 -0
- package/dist/skills/opengame-trailer-make/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-trailer-make/references/ops.md +154 -0
- package/dist/skills/opengame-trailer-make/references/owner-eye.md +214 -0
- package/dist/skills/opengame-trailer-make/references/review.md +141 -0
- package/dist/skills/opengame-trailer-make/references/title.md +92 -0
- package/dist/skills/opengame-trailer-plan/SKILL.md +176 -0
- package/dist/skills/opengame-trailer-plan/references/archetypes.md +113 -0
- package/dist/skills/opengame-trailer-plan/references/briefs.md +273 -0
- package/dist/skills/opengame-trailer-plan/references/core.md +129 -0
- package/dist/skills/opengame-trailer-plan/references/craft.md +299 -0
- package/dist/skills/opengame-trailer-plan/references/edge-cases.md +27 -0
- package/dist/skills/opengame-trailer-plan/references/filmable.md +244 -0
- package/dist/skills/opengame-trailer-plan/references/finishing.md +126 -0
- package/dist/skills/opengame-trailer-plan/references/gates.md +184 -0
- package/dist/skills/opengame-trailer-plan/references/measure.md +282 -0
- package/dist/skills/opengame-trailer-plan/references/music.md +148 -0
- package/dist/skills/opengame-trailer-plan/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-trailer-plan/references/ops.md +154 -0
- package/dist/skills/opengame-trailer-plan/references/owner-eye.md +214 -0
- package/dist/skills/opengame-trailer-plan/references/reference-set.md +92 -0
- package/dist/skills/opengame-trailer-plan/references/review.md +141 -0
- package/dist/skills/opengame-trailer-plan/references/title.md +92 -0
- package/dist/skills/opengame-trailer-review-and-improve/SKILL.md +145 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/archetypes.md +113 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/briefs.md +273 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/core.md +129 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/craft.md +299 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/edge-cases.md +27 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/filmable.md +244 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/finishing.md +126 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/gates.md +184 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/measure.md +282 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/music.md +148 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/og-clash-record.md +133 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/ops.md +154 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/owner-eye.md +214 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/review.md +141 -0
- package/dist/skills/opengame-trailer-review-and-improve/references/title.md +92 -0
- package/dist/skills/opengame-verification/SKILL.md +113 -48
- package/dist/skills/opengame-weapons/SKILL.md +129 -55
- package/dist/skills/opengame-weapons/references/handling-numbers.md +42 -0
- package/dist/skills/opengame-weapons/references/reloads-and-hands.md +96 -0
- package/dist/skills/opengame-weapons/references/sights-and-scopes.md +98 -0
- package/dist/skills/opengame-weapons/references/threejs.md +71 -0
- package/dist/skills/opengame-world-physics/SKILL.md +55 -24
- package/dist/skills/opengame-world-physics/references/measured-failures.md +28 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A geometry audit for a 3D game scene: floating props, buried props, solids driven
|
|
3
|
-
* through each other, coplanar faces that z-fight, visible solids with no collider,
|
|
4
|
-
*
|
|
3
|
+
* through each other, coplanar faces that z-fight, visible solids with no collider,
|
|
4
|
+
* colliders with nothing drawn (invisible walls), and a walk bot that climbs every
|
|
5
|
+
* staircase holding forward only. No GPU, no browser.
|
|
5
6
|
*
|
|
6
7
|
* Copy this file into the game and feed it the scene the game actually builds:
|
|
7
8
|
*
|
|
@@ -21,9 +22,12 @@
|
|
|
21
22
|
* group parts emitted together as one object; they may touch and overlap
|
|
22
23
|
* triangles optional [[ax,ay,az, bx,by,bz, cx,cy,cz], ...] for the coplanar check;
|
|
23
24
|
* boxes without triangles contribute their six faces
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* gridStep the step of the vertex grid this part is shipped on, in metres, when the
|
|
26
|
+
* format quantises positions; faces within two steps of one plane tie
|
|
27
|
+
* plus `colliders` (boxes the controller collides with, each optionally carrying
|
|
28
|
+
* `nodraw`: a reason the player can see why it stops them, such as "fence line"),
|
|
29
|
+
* `ramps` (invisible stair ramps), `groundY` (a number or a function of x and z),
|
|
30
|
+
* `floors` (walkable heights) and `routes` for the walk bot.
|
|
27
31
|
*
|
|
28
32
|
* EVERY CHECK PLANTS A DEFECT FIRST. Before measuring the real scene, each check runs on
|
|
29
33
|
* a copy with a known defect placed at a site it chooses from the real scene, and the
|
|
@@ -45,7 +49,9 @@ export const TOLERANCES = Object.freeze({
|
|
|
45
49
|
penFraction: 0.2, // a fifth of the smaller part inside the other
|
|
46
50
|
penSlack: 0.05, // slack on "deeper than the thinner part"
|
|
47
51
|
zEps: 0.002, // faces closer than this to one plane have no depth winner
|
|
52
|
+
gridStep: 0, // shipped vertex grid for every part; two steps widen zEps
|
|
48
53
|
zArea: 0.02, // overlap smaller than this many square metres is not visible
|
|
54
|
+
invisibleShare: 0.25, // a quarter of a collider with nothing drawn in it is a wall
|
|
49
55
|
bodyRadius: 0.35, bodyHeight: 1.8, stepHeight: 0.42, walkSpeed: 4.9,
|
|
50
56
|
stuckSeconds: 1.0, routeSeconds: 30,
|
|
51
57
|
});
|
|
@@ -261,20 +267,27 @@ export function overlapArea(t1, t2, n) {
|
|
|
261
267
|
*/
|
|
262
268
|
export function checkCoplanar(scene, tol = TOLERANCES) {
|
|
263
269
|
const faces = [];
|
|
270
|
+
// A format that stores positions on a grid rounds faces closer than a step or two
|
|
271
|
+
// into one plane, so "within 2 mm" passes real ties on a coarse grid. The pair's
|
|
272
|
+
// tolerance is two steps of the coarser of its two grids, or zEps if that is larger.
|
|
273
|
+
const stepOf = (p) => Math.max(tol.gridStep ?? 0, p.gridStep ?? 0);
|
|
274
|
+
let eps = tol.zEps;
|
|
275
|
+
for (const p of scene.parts) eps = Math.max(eps, 2 * stepOf(p));
|
|
276
|
+
const pairEps = (f, g) => Math.max(tol.zEps, 2 * Math.max(f.step, g.step));
|
|
264
277
|
for (const p of scene.parts) {
|
|
265
278
|
if (p.visible === false || !isSolid(p) || p.decal) continue;
|
|
266
279
|
for (const t of p.triangles ?? boxTriangles(p)) {
|
|
267
280
|
const n = triNormal(t);
|
|
268
281
|
if (!n) continue;
|
|
269
282
|
const d = n[0] * t[0] + n[1] * t[1] + n[2] * t[2];
|
|
270
|
-
if (n[1] < -0.999 && (scene.floors ?? [groundAt(scene, t[0], t[2])]).some((f) => f !== null && Math.abs(-d - f) < tol.zEps)) continue;
|
|
271
|
-
faces.push({ part: p.id, group: p.group, t, n, d, min: [0, 1, 2].map((a) => Math.min(t[a], t[3 + a], t[6 + a])), max: [0, 1, 2].map((a) => Math.max(t[a], t[3 + a], t[6 + a])) });
|
|
283
|
+
if (n[1] < -0.999 && (scene.floors ?? [groundAt(scene, t[0], t[2])]).some((f) => f !== null && Math.abs(-d - f) < Math.max(tol.zEps, 2 * stepOf(p)))) continue;
|
|
284
|
+
faces.push({ part: p.id, group: p.group, step: stepOf(p), t, n, d, min: [0, 1, 2].map((a) => Math.min(t[a], t[3 + a], t[6 + a])), max: [0, 1, 2].map((a) => Math.max(t[a], t[3 + a], t[6 + a])) });
|
|
272
285
|
}
|
|
273
286
|
}
|
|
274
287
|
const bins = new Map();
|
|
275
288
|
const keyOf = (f, slot) => `${Math.round(f.n[0] * 1000)},${Math.round(f.n[1] * 1000)},${Math.round(f.n[2] * 1000)},${slot}`;
|
|
276
289
|
for (const f of faces) {
|
|
277
|
-
const slot = Math.floor(f.d /
|
|
290
|
+
const slot = Math.floor(f.d / eps);
|
|
278
291
|
const key = keyOf(f, slot);
|
|
279
292
|
if (!bins.has(key)) bins.set(key, []);
|
|
280
293
|
bins.get(key).push(f);
|
|
@@ -282,14 +295,15 @@ export function checkCoplanar(scene, tol = TOLERANCES) {
|
|
|
282
295
|
const pairs = new Map();
|
|
283
296
|
let examined = 0;
|
|
284
297
|
for (const f of faces) {
|
|
285
|
-
const slot = Math.floor(f.d /
|
|
298
|
+
const slot = Math.floor(f.d / eps);
|
|
286
299
|
for (const s of [slot, slot + 1]) {
|
|
287
300
|
for (const g of bins.get(keyOf(f, s)) ?? []) {
|
|
288
301
|
if (g === f || g.part === f.part || (f.group !== undefined && f.group === g.group)) continue;
|
|
289
302
|
if (s === slot && g.part < f.part) continue; // count each cross-part pair once
|
|
290
|
-
|
|
303
|
+
const within = pairEps(f, g);
|
|
304
|
+
if (f.n[0] * g.n[0] + f.n[1] * g.n[1] + f.n[2] * g.n[2] < 0.9999 || Math.abs(f.d - g.d) > within) continue;
|
|
291
305
|
let apart = false;
|
|
292
|
-
for (let a = 0; a < 3; a++) if (f.min[a] > g.max[a] +
|
|
306
|
+
for (let a = 0; a < 3; a++) if (f.min[a] > g.max[a] + within || g.min[a] > f.max[a] + within) { apart = true; break; }
|
|
293
307
|
if (apart) continue;
|
|
294
308
|
examined++;
|
|
295
309
|
const area = overlapArea(f.t, g.t, f.n);
|
|
@@ -322,6 +336,49 @@ export function checkColliders(scene) {
|
|
|
322
336
|
return { name: "colliders", examined, findings };
|
|
323
337
|
}
|
|
324
338
|
|
|
339
|
+
/**
|
|
340
|
+
* invisible: the other direction. A collider with nothing drawn where it blocks is an
|
|
341
|
+
* invisible wall, and in our games it was the more repeated complaint of the two: one
|
|
342
|
+
* shooter's owner reported invisible walls in at least sixteen messages over ten days,
|
|
343
|
+
* one of them two hours after a removal was reported done. A collider counts as drawn where it
|
|
344
|
+
* lies inside a visible part that is neither walk-through (`nocollide`) nor a decal, so
|
|
345
|
+
* a collider over nothing but foliage is reported too. Collision under the ground is
|
|
346
|
+
* not judged: the share is of the part above ground, which is the part a body meets. A
|
|
347
|
+
* blocker the player can see the reason for (a fence line, a cliff edge) says so with
|
|
348
|
+
* `nodraw`. A flat collider (an invisible lid over a roof) is judged as if it had a thin
|
|
349
|
+
* thickness, so a sheet with no volume is still reported.
|
|
350
|
+
*
|
|
351
|
+
* Box level only: each part is its bounding box. An L-shaped mesh's box hides a collider
|
|
352
|
+
* in its empty corner, and a whole-map merged mesh or a terrain mesh read as one box
|
|
353
|
+
* hides every collider under its top, so split those into chunks (or leave terrain to
|
|
354
|
+
* `groundY`) before trusting a zero here. Run a ray sweep in the engine for the rest.
|
|
355
|
+
*/
|
|
356
|
+
export function checkInvisible(scene, tol = TOLERANCES) {
|
|
357
|
+
const colliders = scene.colliders ?? scene.parts.filter((p) => p.collider);
|
|
358
|
+
const drawn = scene.parts.filter((p) => p.visible !== false && !p.nocollide && !p.decal);
|
|
359
|
+
const m = tol.contactTol, n = 4, thin = 0.05;
|
|
360
|
+
const inside = (p, x, y, z) => x >= p.min[0] - m && x <= p.max[0] + m && y >= p.min[1] - m && y <= p.max[1] + m && z >= p.min[2] - m && z <= p.max[2] + m;
|
|
361
|
+
const findings = [];
|
|
362
|
+
colliders.forEach((c, i) => {
|
|
363
|
+
if (typeof c.nodraw === "string" && c.nodraw.trim()) return;
|
|
364
|
+
let empty = 0, above = 0;
|
|
365
|
+
for (let ix = 0; ix < n; ix++) for (let iy = 0; iy < n; iy++) for (let iz = 0; iz < n; iz++) {
|
|
366
|
+
const x = c.min[0] + ((ix + 0.5) / n) * sizeOf(c, 0), y = c.min[1] + ((iy + 0.5) / n) * sizeOf(c, 1), z = c.min[2] + ((iz + 0.5) / n) * sizeOf(c, 2);
|
|
367
|
+
const ground = groundAt(scene, x, z);
|
|
368
|
+
if (ground !== null && y <= ground) continue;
|
|
369
|
+
above++;
|
|
370
|
+
if (!drawn.some((p) => inside(p, x, y, z))) empty++;
|
|
371
|
+
}
|
|
372
|
+
if (above === 0) return;
|
|
373
|
+
const share = empty / above;
|
|
374
|
+
const volume = [0, 1, 2].reduce((v, a) => v * Math.max(sizeOf(c, a), thin), 1) * (empty / n ** 3);
|
|
375
|
+
if (share > tol.invisibleShare && volume > tol.penVolume) {
|
|
376
|
+
findings.push({ id: c.id ?? `collider${i}`, at: site(c), why: `${Math.round(share * 100)}% of this collider has nothing drawn in it and no nodraw reason: an invisible wall` });
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
return { name: "invisible", examined: colliders.length, findings };
|
|
380
|
+
}
|
|
381
|
+
|
|
325
382
|
/* the walk bot ---------------------------------------------------------------- */
|
|
326
383
|
|
|
327
384
|
function rampHeight(ramp, x, z) {
|
|
@@ -501,7 +558,11 @@ const PLANTS = {
|
|
|
501
558
|
coplanar(scene, tol) {
|
|
502
559
|
const s = plantSite(scene, tol); if (!s) return null;
|
|
503
560
|
const copy = clone(scene);
|
|
504
|
-
|
|
561
|
+
// On a quantised grid the plant sits a step and a half apart, not exactly tied, so a
|
|
562
|
+
// grid tolerance that stopped widening the check would miss it.
|
|
563
|
+
let step = tol.gridStep ?? 0;
|
|
564
|
+
for (const p of scene.parts) step = Math.max(step, p.gridStep ?? 0);
|
|
565
|
+
copy.parts.push(box("planted-panel-a", s.x - 0.25, s.y, s.z, 1, 1, 0.2, { gridStep: step }), box("planted-panel-b", s.x + 0.25, s.y + 0.3, s.z + 1.5 * step, 1, 1, 0.2, { gridStep: step }));
|
|
505
566
|
return { scene: copy, id: "planted-panel-a + planted-panel-b" };
|
|
506
567
|
},
|
|
507
568
|
colliders(scene, tol) {
|
|
@@ -510,12 +571,21 @@ const PLANTS = {
|
|
|
510
571
|
copy.parts.push(box("planted-ghost-wall", s.x, s.y, s.z, 1.6, 2, 0.2, { collider: false }));
|
|
511
572
|
return { scene: copy, id: "planted-ghost-wall" };
|
|
512
573
|
},
|
|
574
|
+
invisible(scene, tol) {
|
|
575
|
+
const s = plantSite(scene, tol); if (!s) return null;
|
|
576
|
+
const copy = clone(scene);
|
|
577
|
+
const wall = box("planted-invisible-wall", s.x, s.y, s.z, 1.6, 2, 0.2);
|
|
578
|
+
// A scene with its own collision layer gets the wall there; a scene whose drawn
|
|
579
|
+
// parts are their own colliders gets an undrawn part that collides.
|
|
580
|
+
if (copy.colliders) copy.colliders.push(wall); else copy.parts.push({ ...wall, visible: false });
|
|
581
|
+
return { scene: copy, id: "planted-invisible-wall" };
|
|
582
|
+
},
|
|
513
583
|
stairs(_scene, tol) {
|
|
514
584
|
return { scene: stairScene(0.17, tol.stepHeight + 0.08), id: "planted stairs" };
|
|
515
585
|
},
|
|
516
586
|
};
|
|
517
587
|
|
|
518
|
-
const CHECKS = { float: checkFloat, buried: checkBuried, interpenetration: checkInterpenetration, coplanar: checkCoplanar, colliders: checkColliders, stairs: checkStairs };
|
|
588
|
+
const CHECKS = { float: checkFloat, buried: checkBuried, interpenetration: checkInterpenetration, coplanar: checkCoplanar, colliders: checkColliders, invisible: checkInvisible, stairs: checkStairs };
|
|
519
589
|
|
|
520
590
|
/**
|
|
521
591
|
* Runs every check (or `only`), each after its plant. Returns
|
|
@@ -562,7 +632,9 @@ export function formatReport(report) {
|
|
|
562
632
|
/**
|
|
563
633
|
* Reads a three.js scene into the audit's shape. Pass the THREE namespace the game
|
|
564
634
|
* already imports. Mesh flags come from `userData`: `collider`, `nocollide` (a reason),
|
|
565
|
-
* `hangs` (a reason), `group`, `prop`, `decal
|
|
635
|
+
* `hangs` (a reason), `group`, `prop`, `decal`, `gridStep`; a collider object may carry
|
|
636
|
+
* `userData.nodraw` (a reason the player can see why it stops them), and a Box3 a
|
|
637
|
+
* `nodraw` property. A hidden mesh marked `collider` is read as a collider nothing draws. Transparent and alpha-tested materials
|
|
566
638
|
* are not opaque volume. `colliders` may be Box3s or meshes from the collision layer.
|
|
567
639
|
*/
|
|
568
640
|
export function fromThreeScene(THREE, root, { colliders = [], groundY = null, floors, triangles = true } = {}) {
|
|
@@ -570,14 +642,20 @@ export function fromThreeScene(THREE, root, { colliders = [], groundY = null, fl
|
|
|
570
642
|
const parts = [];
|
|
571
643
|
const v = new THREE.Vector3();
|
|
572
644
|
root.traverse((object) => {
|
|
573
|
-
if (!object.isMesh ||
|
|
645
|
+
if (!object.isMesh || object.isSkinnedMesh) return;
|
|
574
646
|
const material = Array.isArray(object.material) ? object.material[0] : object.material;
|
|
647
|
+
const data = object.userData ?? {};
|
|
648
|
+
// A mesh is drawn only if it and every ancestor are visible and its material draws.
|
|
649
|
+
// A hidden mesh that collides is still read, as an undrawn collider, so a collision
|
|
650
|
+
// layer kept in the scene graph can be judged by the invisible check.
|
|
651
|
+
let shown = material?.visible !== false;
|
|
652
|
+
for (let o = object; o && shown; o = o.parent) if (!o.visible) shown = false;
|
|
653
|
+
if (!shown && data.collider !== true) return;
|
|
575
654
|
const opaque = !material || (!material.transparent && (material.alphaTest ?? 0) === 0 && (material.opacity ?? 1) >= 1);
|
|
576
655
|
const bounds = new THREE.Box3().setFromObject(object);
|
|
577
656
|
if (bounds.isEmpty()) return;
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
collider: data.collider === true, nocollide: data.nocollide, hangs: data.hangs, group: data.group, prop: data.prop, decal: data.decal || material?.polygonOffset };
|
|
657
|
+
const part = { id: object.name || object.uuid, min: bounds.min.toArray(), max: bounds.max.toArray(), visible: shown ? undefined : false, solid: opaque && !data.decal,
|
|
658
|
+
collider: data.collider === true, nodraw: data.nodraw, nocollide: data.nocollide, hangs: data.hangs, group: data.group, prop: data.prop, decal: data.decal || material?.polygonOffset, gridStep: data.gridStep };
|
|
581
659
|
if (triangles && object.geometry?.attributes?.position) {
|
|
582
660
|
const position = object.geometry.attributes.position, index = object.geometry.index;
|
|
583
661
|
const count = index ? index.count : position.count;
|
|
@@ -593,7 +671,7 @@ export function fromThreeScene(THREE, root, { colliders = [], groundY = null, fl
|
|
|
593
671
|
});
|
|
594
672
|
const boxes = colliders.map((c, i) => {
|
|
595
673
|
const b = c.isBox3 ? c : new THREE.Box3().setFromObject(c);
|
|
596
|
-
return { id: c.name || `collider${i}`, min: b.min.toArray(), max: b.max.toArray() };
|
|
674
|
+
return { id: c.name || `collider${i}`, min: b.min.toArray(), max: b.max.toArray(), nodraw: c.userData?.nodraw ?? c.nodraw };
|
|
597
675
|
});
|
|
598
676
|
return { parts, colliders: boxes.length ? boxes : undefined, groundY, floors };
|
|
599
677
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
name: opengame-sdk
|
|
3
3
|
description: Integrate a browser game with OpenGame through @opengamehq/sdk, the injected global or a native engine bridge. Covers start-up, the player and their OG at load, names, leaderboards, achievements, events, pause, mute, fullscreen, keys inside the frame and threaded builds. Use when the person says integrate with OpenGame, add the SDK, show the player's name or OG, add a leaderboard or achievement, track events, fix fullscreen or keys in the game frame, or asks how a game talks to OpenGame.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.13"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Integrate a game with OpenGame
|
|
9
9
|
|
|
10
10
|
Inside an OpenGame page the SDK works as described here. Under `opengame dev` it runs a
|
|
11
|
-
local stand-in that keeps scores and events in the browser.
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
local stand-in that keeps scores and events in the browser. Any signed-in account can deploy
|
|
12
|
+
now. Until 18 November, a CLI with no login hears
|
|
13
|
+
"OpenGame opens for creators on 18 November." Sign in with `opengame login` first.
|
|
14
14
|
|
|
15
15
|
The SDK is what ends up inside the game. It talks only to the OpenGame page around
|
|
16
16
|
the game and to `https://api.opengame.gg`.
|
|
@@ -37,7 +37,7 @@ read the copy the game will ship before writing a call:
|
|
|
37
37
|
- `node_modules/@opengamehq/sdk/AGENTS.md`: the short rules and the error catalogue,
|
|
38
38
|
generated from the SDK's own error table.
|
|
39
39
|
- `node_modules/@opengamehq/sdk/dist/*.d.ts`: the exact signatures.
|
|
40
|
-
- With no package to hand, the SDK reference (
|
|
40
|
+
- With no package to hand, the SDK reference (`https://docs.opengame.io/reference/sdk`).
|
|
41
41
|
|
|
42
42
|
Never guess a name. A call that is not in that README does not exist in that version.
|
|
43
43
|
Where this skill and the installed README disagree, follow the README and tell the
|
|
@@ -126,7 +126,7 @@ Clash's scoreboard stuck open over the pause menu). Cancel the default of every
|
|
|
126
126
|
turn, arrow, Space and Page key the game consumes, so the page around it does not
|
|
127
127
|
scroll.
|
|
128
128
|
|
|
129
|
-
**HIGH: pause and mute are honoured.** `og.onPause` stops simulation, timers and audio;
|
|
129
|
+
**HIGH: pause and mute are honoured.** `og.onPause` stops simulation, timers and audio (a game in a shared online match stops only its own input and sound, and `opengame-multiplayer` says how a host hands over);
|
|
130
130
|
`og.audio.onHostMute` silences the game. The frame boots under a poster before the
|
|
131
131
|
player presses Play, muted and paused from the first handshake, so keep loading through
|
|
132
132
|
the pause. Start audio only from an `onHostMute(false)` that arrives after
|
|
@@ -136,8 +136,7 @@ the pause. Start audio only from an `onHostMute(false)` that arrives after
|
|
|
136
136
|
player for or shows as theirs, such as a call sign, trainer name, player name, nickname,
|
|
137
137
|
or their own HUD label or nameplate, is filled from `og.player.handle` inside
|
|
138
138
|
`og.player.onChange`, so a signed-in player starts with the name they chose on OpenGame.
|
|
139
|
-
`handle` is null for a guest, an account without a handle
|
|
140
|
-
in games and every private preview; then keep the game's own default. Stop filling once
|
|
139
|
+
`handle` is null for a guest, an account without a handle and every private preview; then keep the game's own default. Stop filling once
|
|
141
140
|
the player edits the field, and when the game restores a name the player saved, show
|
|
142
141
|
that one instead. Allow 20 characters, `_` and `-` included, in
|
|
143
142
|
the field's `maxlength`, in the game's own name check and wherever the name is drawn.
|
|
@@ -200,6 +199,24 @@ time are measured by the page; do not track them yourself.
|
|
|
200
199
|
Focus, the poster, pause, mute, fullscreen, keys, scrolling and opening an outside link
|
|
201
200
|
with `og.openLink`: [references/frame.md](references/frame.md).
|
|
202
201
|
|
|
202
|
+
## Invite links for a game's own lobbies
|
|
203
|
+
|
|
204
|
+
OpenGame runs no rooms; a multiplayer game brings its own (`opengame-multiplayer`). The
|
|
205
|
+
SDK gives it the link to share and the code a friend arrives with:
|
|
206
|
+
|
|
207
|
+
```js
|
|
208
|
+
await og.init()
|
|
209
|
+
if (og.invite.code) joinLobby(og.invite.code) // opened from an invite: skip the menu
|
|
210
|
+
else showInvite(og.invite.link(lobbyCode) ?? lobbyCode) // hosting: share this; the code when null
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**HIGH: share `og.invite.link(code)`, never the game's own address.** The link is the game's
|
|
214
|
+
page on opengame.io with `?join=CODE`: whoever opens it gets the game on OpenGame, as
|
|
215
|
+
themselves, and lands in the lobby. A link to `<label>.opengame.gg` opens a warning page instead of the
|
|
216
|
+
game. A code is 4 to 12 capitals and digits, or exactly 22 of `A-Z a-z 0-9 _ -`; `link`
|
|
217
|
+
returns null for anything else, rather than a link whose code the page would change.
|
|
218
|
+
Under `opengame dev` the link is the local page, so two tabs can try it.
|
|
219
|
+
|
|
203
220
|
## OG Radio
|
|
204
221
|
|
|
205
222
|
Players can pick OG Radio stations and songs in the game's menu and listen while they
|
|
@@ -266,5 +283,5 @@ Run each check and say which ones you could not run; an unrun check is unverifie
|
|
|
266
283
|
- Every board and achievement used in code is declared in `opengame.json`, and
|
|
267
284
|
`opengame check . --json` passes.
|
|
268
285
|
- On the published game, signed in as a confirmed member (the only accounts given a
|
|
269
|
-
player during the private rollout) with
|
|
286
|
+
player during the private rollout) with a handle, then as a guest: the handle
|
|
270
287
|
shows only in the first case.
|
|
@@ -89,5 +89,5 @@ isolation headers. The game still has three things to do:
|
|
|
89
89
|
All three must read `true`. `opengame dev . --contract` with the isolated contract
|
|
90
90
|
serves the same headers locally, but only the preview is the real page and frame.
|
|
91
91
|
|
|
92
|
-
Memory diagnostics, WebGPU and each engine's export settings are in the
|
|
93
|
-
|
|
92
|
+
Memory diagnostics, WebGPU and each engine's export settings are in the docs at
|
|
93
|
+
`https://docs.opengame.io/engines/overview`.
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
| Situation | `id` | `handle`, `ogNumber` | `avatar` | `signedIn` |
|
|
4
4
|
| --- | --- | --- | --- | --- |
|
|
5
|
-
| Signed in,
|
|
6
|
-
| Signed in,
|
|
7
|
-
| Signed in, no handle claimed yet | Stable as above | `null` | As sharing allows | `true` |
|
|
5
|
+
| Signed in, with a handle | Stable for this player in this game, on every device | Their public handle and number | Their head, and their outfit if they have one | `true` |
|
|
6
|
+
| Signed in, no handle claimed yet | Stable as above | `null` | Their OG, if they have made one | `true` |
|
|
8
7
|
| Guest | `null` while accounts are in private testing; otherwise stable in this browser for this game | `null` | `null` | `false` |
|
|
9
8
|
| Private preview | `null`. Identity is not offered; scores stay separate from public ones | `null` | `null` | `false` |
|
|
10
9
|
| Outside OpenGame, by default | `dev-guest` | `null` | `null` | `false` |
|
|
@@ -52,11 +51,11 @@ known, under the loading screen, fixed it.
|
|
|
52
51
|
|
|
53
52
|
- The per-game `id` cannot be joined across games: the same person has a different id
|
|
54
53
|
in every game. That is the point of it; do not try to work around it.
|
|
55
|
-
- `handle` and `ogNumber` are public profile values, the same across games,
|
|
56
|
-
|
|
57
|
-
them, link them and recognise a returning handle; say so in
|
|
58
|
-
it matters to players.
|
|
59
|
-
|
|
54
|
+
- `handle` and `ogNumber` are public profile values, the same across games, sent for
|
|
55
|
+
every signed-in player who has claimed a handle; there is no setting to withhold
|
|
56
|
+
them. A game may show them, link them and recognise a returning handle; say so in
|
|
57
|
+
the game's own copy if it matters to players. Fall back to a guest name when they
|
|
58
|
+
are `null`. They are never a storage key, because they can be
|
|
60
59
|
null for a signed-in player and can change.
|
|
61
60
|
- The SDK never gives the game an email, the account's real id, a friends list or a
|
|
62
61
|
browser fingerprint, and a game should never ask for them.
|
|
@@ -96,7 +95,7 @@ save your score"). The game keeps running; `onChange` fires when they return sig
|
|
|
96
95
|
## The player's OG
|
|
97
96
|
|
|
98
97
|
`og.player.avatar` is `{ seed, palette, look?, character? }`. `look` (the head) arrives
|
|
99
|
-
only when the player is signed in
|
|
98
|
+
only when the player is signed in and has made one;
|
|
100
99
|
`character` (the body and outfit) arrives only beside a `look`. A guest, and every
|
|
101
100
|
player in a private preview, gets null, and then `og.capabilities` has no `avatar`.
|
|
102
101
|
With no `look`, draw the game's default.
|
|
@@ -108,5 +107,5 @@ const stop = watchAvatar(og, avatar => avatar ? useYourOg(avatar) : useDefaultCh
|
|
|
108
107
|
|
|
109
108
|
`watchAvatar` calls at once and then only when the recipe changes, so a model is not
|
|
110
109
|
rebuilt on every session refresh. `readAvatar` names the parts of one recipe. Do not
|
|
111
|
-
store the recipe or send it anywhere; a player who
|
|
112
|
-
|
|
110
|
+
store the recipe or send it anywhere; a player who changes or deletes their OG expects
|
|
111
|
+
the game to follow. Building and showing it is in `opengame-characters`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: opengame-stability
|
|
3
|
-
description: Make a browser game crash-free on every device and browser, and prove it. Covers zero crashes as the release bar
|
|
3
|
+
description: Make a browser game crash-free on every device and browser, and prove it. Covers zero crashes as the release bar with recoveries counted, a structural guard per crash class, soak tests, named pools, crash reports that survive reload, a watchdog that tells a slow load from a hang, one composite per frame, no late timer that moves the game, no silent fallback, a booted fallback renderer and the served build checked. Use when the game crashes, freezes, reloads itself or breaks after a deploy.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.1.0"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Stability
|
|
@@ -12,31 +12,42 @@ crashes about 25 times ("we CANNOT have any crashES EVER on ANY device ANYWHERE"
|
|
|
12
12
|
Crashes took about five days to close from the first ask, among the slowest of any
|
|
13
13
|
problem, and stayed open on iPhone after launch. In the end a gate of full sessions on
|
|
14
14
|
real devices held, along with crash reports that named the cause and pools that warned
|
|
15
|
-
before they were full.
|
|
15
|
+
before they were full. OS's owner said it again ("we CANT HAVE THE GAME CRASH EVER!!! any
|
|
16
|
+
circumstance.. not an option."), and OS learned that a crash its safety net hides is
|
|
17
|
+
still a crash. OH's worst launch fault was not a crash at all: a boot timer that moved
|
|
18
|
+
the game out from under a song.
|
|
16
19
|
|
|
17
20
|
Rules carry five tags; `opengame-quality-bar` explains them and the game codes. Phone
|
|
18
21
|
memory kills are in `opengame-mobile`; load stalls and retries in `opengame-loading`;
|
|
19
|
-
proving a fix ran in
|
|
22
|
+
long-session memory growth in `opengame-performance`; proving a fix ran in
|
|
23
|
+
`opengame-verification`.
|
|
20
24
|
|
|
21
25
|
## Rules
|
|
22
26
|
|
|
23
|
-
### Zero crashes is the release gate
|
|
24
|
-
- **Invariant:** A build ships only when full sessions on every target device and browser end with no crash, freeze, self-reload or lost input, and a load that times out counts as a failure, not as clean.
|
|
25
|
-
- **Technique:** Keep a matrix of device class by browser by flow: cold boot to play, a full match with real input, pause and resume, a returning player with saved settings, a tab switch, a resize or rotation storm, and a GPU device loss. Drive it with real key, mouse and touch input from the title, not a shortcut into the match. Stress each crash class the game has: ammo refills, corpse and debris load, spawn bursts, character and weapon switches. Treat release-build assertions as live code: guard divisions by zero, negative indices and non-finite values. Count time on both the game clock and the wall clock.
|
|
26
|
-
- **Reference configuration:** OC's bar: 200 or more consecutive clean sessions, 20 cold boots per device class including a 6x CPU throttle, 60 s of live combat, pause and resume, and a returning player, with load timeouts never counted as clean. Real devices belong in the matrix (`opengame-mobile`).
|
|
27
|
+
### Zero crashes is the release gate, and a recovery counts as a crash
|
|
28
|
+
- **Invariant:** A build ships only when full sessions on every target device and browser end with no crash, freeze, self-reload, recovery or lost input, and a load that times out counts as a failure, not as clean.
|
|
29
|
+
- **Technique:** Keep a matrix of device class by browser by flow: cold boot to play, a full match with real input, pause and resume, a returning player with saved settings, a tab switch, a resize or rotation storm, and a GPU device loss. Drive it with real key, mouse and touch input from the title, not a shortcut into the match, and run it the way the owner and players start: through the real menus, under the browser's strict autoplay policy, with every saved setting and cheat they use, at their window shapes (including wider than 16:9), over a real throttled line, beside a second program on the GPU, and with a second run in the same page. Stress each crash class the game has: ammo refills, corpse and debris load, spawn bursts, character and weapon switches. Count every time the safety net recovered the game as a failed session. Treat release-build assertions as live code: guard divisions by zero, negative indices and non-finite values. Count time on both the game clock and the wall clock. Cold means an empty browser cache and an empty GPU driver shader cache (see `opengame-loading`).
|
|
30
|
+
- **Reference configuration:** OC's bar: 200 or more consecutive clean sessions, 20 cold boots per device class including a 6x CPU throttle, 60 s of live combat, pause and resume, and a returning player, with load timeouts never counted as clean. Real devices belong in the matrix (`opengame-mobile`). OS's lead: "A crash the net recovers from still counts as a crash to the owner". LC's repeated owner complaints each lived on a path nobody tested (every cheat saved, a return visit, a wider window, a screen recorder on the GPU, strict autoplay), and OH's blank board appeared only under gesture-gated autoplay. An OS capture that loaded straight into a map looked healthy (5,328 requests) while the gunsmith showed 0 rifles for about 4 h. OS's quick smoke is about 90 s through the real menus; an OS build that went live before its soak reached the owner as static, and one that passed a quick soak crashed after about a minute of fighting.
|
|
27
31
|
- **Applies when:** Every game anyone outside the team will play.
|
|
28
|
-
- **Verify:** The gate prints its matrix with a clean or failed verdict per cell and the session count behind each; one failed cell blocks the release.
|
|
32
|
+
- **Verify:** The gate prints its matrix with a clean or failed verdict per cell and the session count behind each, recoveries counted as failures; one failed cell blocks the release.
|
|
33
|
+
|
|
34
|
+
### Each crash class gets a structural guard
|
|
35
|
+
- **Invariant:** No asset, map, input or session length can trap, corrupt or exhaust the game, because each crash class found is removed by a guard in the structure rather than by a patch on the one case seen.
|
|
36
|
+
- **Technique:** Reproduce on the shipped build, then remove the class: bound retries and free everything a failed load reserved, build large meshes and colliders in pieces, size engine pools for a full match rather than a short test, and count pending shader compiles as progress so a watchdog does not trap a busy load. When a fault moves with content, bisect the content as well as the code, and in an instrumented build trap stores into read-only data to catch a corrupting write where it happens. Run a seeded careless-player fuzzer over every screen (keys, chords, control and right-to-left text, resizes, blur, pointer lock, pads, network drops) that shrinks each finding to its shortest repro. Static or noise from the speakers is memory corruption reaching the output: count it as a crash.
|
|
37
|
+
- **Reference configuration:** OS leaked a 256 MB arena per retry over 4,658 retries until it ran out of memory. An allocator returned null and overwrote 102,005 bytes of read-only data, triggered by content; the reasoned fix failed, and a store guard and a data-swap bisect found it. OS's engine pools went from 1,024, 2,048 and 2,048 to 4,096, 16,384 and 4,096 ("My 2-minute switch runs never filled a match"), and its collision is built in chunks of at most 32k triangles with a free-space check. A 10 s watchdog trapped 4K loads with 48 compiles pending. The fuzzer found the Ctrl+X trap the owner had hit, a black screen after a 1x1 resize, and Enter ignored after a key held over a tab switch. OS's "loud static noise ... that really hurt my ears" was a failed allocation writing 5.3 MB of PCM.
|
|
38
|
+
- **Applies when:** Browser and wasm games, above all on an engine you cannot patch.
|
|
39
|
+
- **Verify:** A soak over every map through the real menus, with read-only and null-page checks after every load: 0 traps and 0 recoveries. Each injected fault recovers once. The fuzzer runs a fixed seed list on every release.
|
|
29
40
|
|
|
30
41
|
### Soak full runs and count crashes per hundred sessions
|
|
31
42
|
- **Invariant:** Stability is measured as a crash count over many complete runs with real input, long enough to reach the late-game states where crashes live, not by one smoke test.
|
|
32
|
-
- **Technique:** Run whole matches end to end, many times, on every platform in the matrix, and keep a running crash count per build. Include cold loads as their own count. Make each soak session start from a cold boot and end at results, and log the build id, device and the last screen in every record. A short smoke test before promotion is a boot check, not a stability claim.
|
|
33
|
-
- **Reference configuration:** OC's crashes hit 57-437 s into play (a physics write past the end of an array, read as memory exhaustion for about 40 rounds) and 78-185 s into play (R94-R101), past the 90 s smoke test. After fixes: 0 WebAssembly traps in 300 or more gate sessions (R163-R181), 45 of 45 on the R163 matrix, and 60 of 60 cold loads on each of 3 platforms. That R164 "60/60" ran in Chrome emulation, and the real iPhone crashed within a day of launch.
|
|
43
|
+
- **Technique:** Run whole matches end to end, many times, on every platform in the matrix, and keep a running crash count per build. Include cold loads as their own count. Make each soak session start from a cold boot and end at results, and log the build id, device and the last screen in every record. In one long soak per release, switch maps repeatedly, make round trips through the menus, inject a trap, a stall, a corrupting write and a GPU loss, and carry on after each. A short smoke test before promotion is a boot check, not a stability claim.
|
|
44
|
+
- **Reference configuration:** OC's crashes hit 57-437 s into play (a physics write past the end of an array, read as memory exhaustion for about 40 rounds) and 78-185 s into play (R94-R101), past the 90 s smoke test. After fixes: 0 WebAssembly traps in 300 or more gate sessions (R163-R181), 45 of 45 on the R163 matrix, and 60 of 60 cold loads on each of 3 platforms. That R164 "60/60" ran in Chrome emulation, and the real iPhone crashed within a day of launch. OS's soak bars: zero crashes, pools under 95%, wasm growth under 512 MB per heap, read-only data and the null page unchanged byte for byte after every load, and the last third's frame time within the larger of 2 ms and 15% of the first's; it caught pool asserts, an out-of-memory on the 11th map and the 102,005-byte overwrite.
|
|
34
45
|
- **Applies when:** Every game with sessions longer than a minute.
|
|
35
46
|
- **Verify:** The release note states sessions run, crashes seen, and cold loads per platform, each tied to the build id, and lists which counts came from real devices.
|
|
36
47
|
|
|
37
48
|
### Every fixed pool is named, counted live and warned before it is full
|
|
38
49
|
- **Invariant:** Every fixed-size table (materials, textures, particles, decals, lights, trails, handles, audio voices, touch slots, instance buffers) has a declared size, a live count and a recorded peak, and warns before it fills; on overflow the game drops the lowest-priority item and logs an error that names the pool.
|
|
39
|
-
- **Technique:** Register every pool in one table with its name, size, current count and peak. Show the table in a debug overlay and write it into crash reports. Warn when a pool passes a high share of its size. On overflow in development, throw an error naming the pool and its size; in release, drop the lowest-priority item, log once, and keep running. Where pool sizes are sums written by hand, compute them at build time from the content instead. Three.js: read `renderer.info.memory` (geometries, textures) and `renderer.info.programs.length`, keep your own counts for particle, decal and voice pools, and `dispose()` on unload.
|
|
50
|
+
- **Technique:** Register every pool in one table with its name, size, current count and peak. Show the table in a debug overlay and write it into crash reports. Warn when a pool passes a high share of its size. On overflow in development, throw an error naming the pool and its size; in release, drop the lowest-priority item, log once, and keep running. Where pool sizes are sums written by hand, compute them at build time from the content instead. Size pools from counts taken over a full match. Three.js: read `renderer.info.memory` (geometries, textures) and `renderer.info.programs.length`, keep your own counts for particle, decal and voice pools, and `dispose()` on unload.
|
|
40
51
|
- **Reference configuration:** OC hit at least 15 distinct caps: at least 8 crashed or hung a build and at least 4 failed with no message (audio sources, touch buttons, local lights, hide lists). A trail cap of 444, a sum typed by hand, crashed R78 at boot and slipped 25 min of every agent's work by a round. Others: handles at 128 and 512, particle materials in a fixed 512 KB buffer, lights at 280 with overflow a crash, decals 256 of 256, batch instances 192 of 192. A material table of 4,096 filled at about 85 a second because one retry ran 2,432 times. The audio mixer dropped 75% of cues without a word.
|
|
41
52
|
- **Applies when:** Every game, and every engine or library with fixed capacities.
|
|
42
53
|
- **Verify:** A stress run (maximum enemies, every effect, every weapon) prints the pool table with peaks; each pool pushed past its warning logs its name, and pushed past its size the game keeps running.
|
|
@@ -49,36 +60,57 @@ proving a fix ran in `opengame-verification`.
|
|
|
49
60
|
- **Verify:** Throw from inside one system during a run and reload: the next boot shows or uploads a record whose stack names that function. Kill the tab from the OS: the next boot counts an unclean session.
|
|
50
61
|
|
|
51
62
|
### The watchdog tells a slow load from a hang
|
|
52
|
-
- **Invariant:** A stall detector measures progress (bytes received, load steps done, frames ticked), keeps a slow but moving load going, trips only on a real hang, names what it was waiting for, and never reloads the page on its own.
|
|
53
|
-
- **Technique:** Give each long job a heartbeat that resets its deadline when it makes progress. Fetch retries and the byte deadline for downloads are in `opengame-loading`. Watch loading by bytes and steps and the main loop by ticks, as separate detectors. When one trips, report the guard, the job and its last progress, and show a recovery card. Keep test-script timeouts out of player builds, and make sure a scripted test that runs past its script ends with a clean message, not a crash.
|
|
54
|
-
- **Reference configuration:** OC's runtime trapped any wait over 10 s, in release. It fired during loads under machine load and on slow phones, showed a crash card and auto-reloaded: "a big part of last night's iPhone crash and reload near 100% loops". A 12.8 s stall loading boss music ended a run. A test-runner timeout message was taken for a game crash by at least 7 streams. Turning the watchdog off with a URL flag was spotted by the owner in the address bar, and a reviewer noted "Watchdog-off suppresses detection; it does not resolve stalls". It was the most widely reported problem, in 14 notes.
|
|
63
|
+
- **Invariant:** A stall detector measures progress (bytes received, load steps done, shader compiles finished, frames ticked), keeps a slow but moving load going, trips only on a real hang, names what it was waiting for, and never reloads the page on its own.
|
|
64
|
+
- **Technique:** Give each long job a heartbeat that resets its deadline when it makes progress, and count pending pipeline compiles as progress. Fetch retries and the byte deadline for downloads are in `opengame-loading`. Watch loading by bytes and steps and the main loop by ticks, as separate detectors, and time them on the wall clock, never by summing a clamped frame delta. When one trips, report the guard, the job and its last progress, and show a recovery card. Keep test-script timeouts out of player builds, and make sure a scripted test that runs past its script ends with a clean message, not a crash.
|
|
65
|
+
- **Reference configuration:** OC's runtime trapped any wait over 10 s, in release. It fired during loads under machine load and on slow phones, showed a crash card and auto-reloaded: "a big part of last night's iPhone crash and reload near 100% loops". A 12.8 s stall loading boss music ended a run. A test-runner timeout message was taken for a game crash by at least 7 streams. Turning the watchdog off with a URL flag was spotted by the owner in the address bar, and a reviewer noted "Watchdog-off suppresses detection; it does not resolve stalls". It was the most widely reported problem, in 14 notes. OS's 10 s watchdog trapped 4K loads with 48 compiles pending, and an OS heartbeat that summed clamped deltas reloaded a live game running at about 3 fps.
|
|
55
66
|
- **Applies when:** Every game with a watchdog, timeout or "loading too long" handler.
|
|
56
|
-
- **Verify:** Throttle the network to slow but steady: no trip. Block one request for good: the trip names that file. Busy-wait the main loop: the frame detector names the system.
|
|
67
|
+
- **Verify:** Throttle the network to slow but steady: no trip. Block one request for good: the trip names that file. Busy-wait the main loop: the frame detector names the system. Run a 4K load with a cold shader cache: no trip.
|
|
57
68
|
|
|
58
69
|
### Recovery never loops and never hides a downgrade
|
|
59
|
-
- **Invariant:** After a crash the game recovers to a known screen without reloading itself in a loop, and any fallback build or reduced mode it switches to is shown to the player and keeps every feature.
|
|
60
|
-
- **Technique:** Count unclean sessions per build. Switch to a fallback only after repeated unclean sessions, for a limited time, keyed to that build so a fixed build starts fresh. Show a notice naming the fallback. Test the fallback as a real build with sound, input and saves. Never call `location.reload()` from an error handler.
|
|
61
|
-
- **Reference configuration:** OC's fallback pinned after 2 unclean sessions, for 24 h, per build. One fallback build shipped with no sound.
|
|
70
|
+
- **Invariant:** After a crash the game recovers to a known screen without reloading itself in a loop, any automatic reload is bounded and returns the player to where they were, and any fallback build or reduced mode it switches to is shown to the player and keeps every feature.
|
|
71
|
+
- **Technique:** Count unclean sessions per build. Switch to a fallback only after repeated unclean sessions, for a limited time, keyed to that build so a fixed build starts fresh. Show a notice naming the fallback. Test the fallback as a real build with sound, input and saves. Never call `location.reload()` from an error handler; if a guard must reload, cap how often and restore the same match. Prefer planned refreshes at natural boundaries (between matches) to reset long-lived state over emergency recovery in play.
|
|
72
|
+
- **Reference configuration:** OC's fallback pinned after 2 unclean sessions, for 24 h, per build. One fallback build shipped with no sound. OS's canary over read-only memory, checked every 2 s, reloads into the same match at most twice in 5 min; that invisible recovery took 16-66 s against a 15 s target. With planned refreshes at match boundaries, OS ran 30 maps with 0 recoveries.
|
|
62
73
|
- **Applies when:** Every game with a crash handler, a fallback bundle or automatic quality steps.
|
|
63
|
-
- **Verify:** Force two crashes in a row: the third boot runs the fallback with its notice, plays sound and accepts input; deploy a new build: it starts on the full version.
|
|
74
|
+
- **Verify:** Force two crashes in a row: the third boot runs the fallback with its notice, plays sound and accepts input; deploy a new build: it starts on the full version. Force a guarded reload mid-match: the player returns to the same match, and a third forced fault in the window does not reload again.
|
|
75
|
+
|
|
76
|
+
### No late timer moves the game, and nothing falls back without saying so
|
|
77
|
+
- **Invariant:** Once play is asked for, boot timers, loaders and deferred callbacks cannot move the game to another mode; a HUD with no playfield cannot persist unnoticed; and a missing or failed file is an error the player reads, never a guessed substitute.
|
|
78
|
+
- **Technique:** Have every timer and async callback check that the mode it was set in is still the mode before it acts, and cancel boot timers when play starts. Run a watchdog that restores play if the playfield is missing, and log an error after a short time of HUD with no board or world. Fetch a required data file twice, then say what failed by name. Never replace a missing chart, level or table with generated or default content, and treat a renderer warning that a feature was dropped (a missing attribute, an unsupported format) as an error in development builds.
|
|
79
|
+
- **Reference configuration:** OH's boot timer moved the game back to the menus under a song started from a link; the owner hit it twice ("charts not showing? cant even play it?"), and every capture had missed it because captures allowed autoplay. Fixed 81 min after the first report: play is restored within 0.25 s, the framing wait is capped at 6 s, and a song is fetched twice, 700 ms apart, before the player is told which file failed. A missing OH chart had once played a guessed 717 notes for a chart of 403. LC's 4 s press wait, made default from one sitting, sent New run back to the menu on a return visit ("hittin gnew run returned me back to main screen a bit and then eventually started game"). A missing `uv` attribute flattened every LC prop's normal map with nothing but a console warning.
|
|
80
|
+
- **Applies when:** Any game with direct links, async boot, deferred timers or data files.
|
|
81
|
+
- **Verify:** Reproduce with gesture-gated autoplay and a delayed request, before and after the fix. Return a 503 for a required file: the player reads which file failed. Delay every boot timer past the start of play: the mode never changes.
|
|
82
|
+
|
|
83
|
+
### One composite reaches the screen per frame
|
|
84
|
+
- **Invariant:** Nothing is drawn to the canvas after the full-screen composite, so no frame ever shows a half-built picture or loses a layer.
|
|
85
|
+
- **Technique:** Render the world, the playfield and any in-canvas overlays to their own targets, and composite them in one final pass to the canvas. Turn the canvas's own antialias, depth and stencil off, and smooth edges in the shader. Probe it in the page, per frame, over minutes of recorded play.
|
|
86
|
+
- **Reference configuration:** OH drew twice to the screen in a frame and lost its board on 4 of 880 frames (49 of 766 with a forced read-back); with one draw to the screen it lost 0 of 3,838 and 0 of 3,786. Judges stepping a clip found it, about 110 min of work. Runs with GL call logging on change the timing and are not evidence either way.
|
|
87
|
+
- **Applies when:** WebGL and WebGPU games with post-processing or layers drawn in separate passes.
|
|
88
|
+
- **Verify:** An in-page per-frame probe over minutes of recorded play counts frames missing a layer: zero.
|
|
89
|
+
|
|
90
|
+
### The fallback renderer is booted every time a default changes
|
|
91
|
+
- **Invariant:** The fallback path (WebGL 2 under a WebGPU game, or any second render path) is booted and played by an automated gate in the same job as any change to shaders or defaults, the game records which backend it got, and a capture that landed on the fallback without saying so fails.
|
|
92
|
+
- **Technique:** A gate forces the fallback, plays a short run, reads the backend inside the page, and fails on any console error, GL error, program link failure, lost context, failed request, or nothing arriving after the menu. Keep the shader's own error lines whole in the log. Add a static check for patterns that compile on one backend and fail on the other. Create the WebGPU device yourself with a bounded number of retries inside a deadline, because some browsers expose `navigator.gpu` before an adapter is ready, then fall back and record why; a missing `navigator.gpu` falls back at once. Three.js: `forceWebGL: true` boots the WebGL 2 backend, and `renderer.backend.isWebGLBackend` reports it.
|
|
93
|
+
- **Reference configuration:** LC's fallback drew no scattered props for about 11 hours ("Nothing in the project boots `?webgl`"), because one `min(int, float)` compiled in WGSL and failed to link in GLSL; three.js's GLSL builder emits that shape, so LC greps for an integer first argument to `min` and `max`. LC's gate was proved on the faulty build (`ERROR: 0:406: 'min'`) and on the fix. The fallback ran 44-49 fps against 58-60. Chrome on Linux exposed `navigator.gpu` before its adapter was ready. OC's fallback build once shipped with no sound.
|
|
94
|
+
- **Applies when:** Every three.js WebGPU game that ships a fallback, and any game with two render paths.
|
|
95
|
+
- **Verify:** Run the gate on a commit with a planted cross-backend fault (it fails) and on the fix (it passes); keep both results.
|
|
64
96
|
|
|
65
97
|
### The game survives losing the GPU
|
|
66
98
|
- **Invariant:** Losing the GPU device or context (a driver reset, a phone reclaiming memory, a long time in the background) leads to a restored game or a one-tap resume card, never a frozen frame.
|
|
67
99
|
- **Technique:** Listen for `webglcontextlost` (call `preventDefault()` so a restore can happen) and `webglcontextrestored`, or for WebGPU's `device.lost` promise, then request a new device and rebuild GPU resources from kept source URLs. Pause the simulation while the device is gone. Three.js: `WebGLRenderer` handles the WebGL events itself, so check that your own render targets, data textures and freed CPU copies come back; for `WebGPURenderer`, check your release's device-loss callback and test it.
|
|
68
|
-
- **Reference configuration:** OC's loading froze at 80% after a GPU device loss, with no recovery, for two rounds. Its runtime could not recreate the device, so OC showed a tap-to-reload card, and device loss joined the crash matrix.
|
|
100
|
+
- **Reference configuration:** OC's loading froze at 80% after a GPU device loss, with no recovery, for two rounds. Its runtime could not recreate the device, so OC showed a tap-to-reload card, and device loss joined the crash matrix. OH launched with WebGL context loss still untested. OS injects a GPU loss in every long soak.
|
|
69
101
|
- **Applies when:** Every WebGL and WebGPU game, most of all on phones and laptops that switch GPUs.
|
|
70
102
|
- **Verify:** Mid-match, call `WEBGL_lose_context.loseContext()` then `restoreContext()` (or `device.destroy()` on WebGPU): the game comes back or shows the card, and play continues after it.
|
|
71
103
|
|
|
72
104
|
### Dev commands do not work in public builds
|
|
73
105
|
- **Invariant:** A public build has no URL parameter, console hook or key that changes game state, grants items, skips progress or turns off a safety check, and runs that used a dev command never reach a leaderboard.
|
|
74
|
-
- **Technique:** Strip dev code at build time behind a build flag. If a dev surface must ship, gate it behind a key the server checks or a stored hash, never a plain parameter. Mark runs that used dev commands and have the leaderboard server reject them. Search the shipped bundle for dev markers as part of the release check.
|
|
75
|
-
- **Reference configuration:** OC's `?commands=` parameter and a global command hook worked on the public host; an agent guessed a URL could hand out a wonder weapon. OC fixed it with a key stored only as a SHA-256 hash.
|
|
106
|
+
- **Technique:** Strip dev code at build time behind a build flag. If a dev surface must ship, gate it behind a key the server checks or a stored hash, never a plain parameter. Mark runs that used dev commands and have the leaderboard server reject them. Search the shipped bundle for dev markers as part of the release check. Cheats meant for players are a designed feature, saved and labelled, and the team tests with them on, the way players have them.
|
|
107
|
+
- **Reference configuration:** OC's `?commands=` parameter and a global command hook worked on the public host; an agent guessed a URL could hand out a wonder weapon. OC fixed it with a key stored only as a SHA-256 hash. LC ships cheats as a player feature; its owner played with every cheat saved, and a spawn fault that only appeared with all of them on reached the owner four times.
|
|
76
108
|
- **Applies when:** Every game with debug commands, cheats or test hooks.
|
|
77
109
|
- **Verify:** On the public URL, try every dev parameter and console hook: nothing changes. Grep the shipped files for the dev command names: none match.
|
|
78
110
|
|
|
79
111
|
### The served build is checked against the tested build after every deploy
|
|
80
|
-
- **Invariant:** After each deploy, the files the public URL serves match, by hash, the build that passed the gate, and the previous good build can be restored in about a minute.
|
|
81
|
-
- **Technique:** Write a build receipt listing every file and its hash. After deploy, fetch the entry document and every file, or at least every entry point and binary, from the public URL with caches bypassed, and compare. Make the deploy script stop with an error on a mismatch instead of logging and carrying on.
|
|
82
|
-
- **Reference configuration:** OC's R162 served a binary that did not match its receipt, and "the outer launcher hid that failure". OC checked 701-714 file hashes per round and kept a 1-minute rollback. Its iOS bundle was "last built Oct 17" and shipped stale every round until R160. Production stayed on an old round while a deploy worker tried CDN experiments, and one redeploy did nothing because the script skipped the round being served.
|
|
112
|
+
- **Invariant:** After each deploy, the files the public URL serves match, by hash, the build that passed the gate, a page never mixes files from two publishes, and the previous good build can be restored in about a minute.
|
|
113
|
+
- **Technique:** Write a build receipt listing every file and its hash. After deploy, fetch the entry document and every file, or at least every entry point and binary, from the public URL with caches bypassed, and compare. Make the deploy script stop with an error on a mismatch instead of logging and carrying on. Serve each publish under its own stamped or hashed paths so a page stays on its build, and keep earlier builds on the host so a rollback only points the entry document back. Rebuild every platform variant from the same source on every round. After the hash check, run a cold boot on production through the real menus, never a direct load, to a running match.
|
|
114
|
+
- **Reference configuration:** OC's R162 served a binary that did not match its receipt, and "the outer launcher hid that failure". OC checked 701-714 file hashes per round and kept a 1-minute rollback. Its iOS bundle was "last built Oct 17" and shipped stale every round until R160. Production stayed on an old round while a deploy worker tried CDN experiments, and one redeploy did nothing because the script skipped the round being served. OS once served 79 newer-build files to an old page; with stamped paths, 3,568 of 3,568 requests matched. OS calls a deploy done only when production shows its full request count, 0 failed, 0 console errors and a running match.
|
|
83
115
|
- **Applies when:** Every self-hosted game. On OpenGame, play the private preview from `opengame-deploy` before calling the release good.
|
|
84
|
-
- **Verify:** Deploy, run the check: it passes. Corrupt one file on the host: it fails and names the file. Time a rollback to the previous build.
|
|
116
|
+
- **Verify:** Deploy, run the check: it passes. Corrupt one file on the host: it fails and names the file. Time a rollback to the previous build. Deploy while a page is mid-boot: it finishes on its own build.
|