@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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Menus in practice
|
|
2
|
+
|
|
3
|
+
## Interface sound
|
|
4
|
+
|
|
5
|
+
- Quiet, recorded, matched to the game's world, on hover, focus and click, with keyboard
|
|
6
|
+
focus sounding like hover. AAA bar values: hover at 0.34, click at 0.26 of the
|
|
7
|
+
interface bus.
|
|
8
|
+
- Debounce rapid navigation; never stack a hover and a focus cue for one action.
|
|
9
|
+
- On a fresh profile the menu mix starts at 30% and never exceeds it, including when
|
|
10
|
+
restoring saved settings; a saved lower level, including zero, is preserved (ST).
|
|
11
|
+
- Mute applies to every interface cue and every menu film without changing the saved
|
|
12
|
+
level. Unlock audio from the player's gesture, and handle a refused play without
|
|
13
|
+
blocking the controls.
|
|
14
|
+
- A menu film's own soundtrack is the menu ambience. Never layer a second music bed under
|
|
15
|
+
it, and stop conflicting beds when moving between menu and play.
|
|
16
|
+
- Listen to the menu with nothing happening. OS's owner heard "footsteps" in a menu 4
|
|
17
|
+
times over 3 days; the third cause was an ambience bed generated from a prompt that said
|
|
18
|
+
"gravel crunching far away".
|
|
19
|
+
|
|
20
|
+
## Controls and the controls legend
|
|
21
|
+
|
|
22
|
+
- One action table drives input handling, HUD hints, menu help, the remapping screen and
|
|
23
|
+
playtests, so a legend can never disagree with the keys.
|
|
24
|
+
- Desktop shooter defaults (ST): WASD to move, mouse to look, left click to fire, right
|
|
25
|
+
click to hold aim and E to toggle it, Space to jump, Shift to sprint, C to crouch, F to
|
|
26
|
+
interact, R to reload, Q to cycle weapons, number keys for weapon slots, Escape to pause.
|
|
27
|
+
Use the bindings for mechanics the game has; genre conventions and the creator's choices
|
|
28
|
+
win. LC keeps E as a second aim key for laptop players without a mouse.
|
|
29
|
+
- Never bind a held action to Ctrl: Ctrl+W closes the tab (OS crouch).
|
|
30
|
+
- Holding aim still allows firing. Track mouse buttons with per-button events or the
|
|
31
|
+
buttons bitmask; `pointerdown` alone misses a second button pressed while one is held.
|
|
32
|
+
- Clear held keys and aim on pause, blur, death and restart. Ignore key repeat and text
|
|
33
|
+
fields.
|
|
34
|
+
- A word in a quick note is not a spec: OS's owner wrote "Hold F" and meant press. Ask, or
|
|
35
|
+
build the press and say so.
|
|
36
|
+
- Every control is remappable (see `opengame-accessibility`), and a rebind that takes a
|
|
37
|
+
held key swaps the two actions.
|
|
38
|
+
|
|
39
|
+
## Pause
|
|
40
|
+
|
|
41
|
+
A solo game's pause stops simulation, enemies, scoring and timers together. Resume
|
|
42
|
+
explicitly with a fresh time baseline. A pointer-lock refusal lands on a usable menu.
|
|
43
|
+
|
|
44
|
+
A game presented as online, with bots standing in for players, never pauses: the menu is
|
|
45
|
+
an overlay that captures input while the match, its timers, killcams and spawns go on and
|
|
46
|
+
world audio carries on ducked. OS's owner asked for this six times.
|
|
47
|
+
|
|
48
|
+
Safari and Firefox spend Escape on leaving fullscreen, and a host page or a fullscreen
|
|
49
|
+
browser can take Escape too, so pause has a second key (OH uses P beside Esc).
|
|
50
|
+
|
|
51
|
+
## Pointer lock and fullscreen
|
|
52
|
+
|
|
53
|
+
- Request the lock inside the handler of the press that starts play, then fullscreen only
|
|
54
|
+
after `pointerlockchange`; fullscreen first spends the user activation and the lock is
|
|
55
|
+
refused (OS). Inside OpenGame's frame `requestFullscreen` fails: the page owns
|
|
56
|
+
fullscreen, and a game's own button calls `og.fullscreen.request()` (`opengame-sdk`).
|
|
57
|
+
- One owner holds the lock state and confirms a held lock instead of asking again; a
|
|
58
|
+
second request dropped a held lock in 1 of 7 OS tours.
|
|
59
|
+
- Browsers refuse a lock requested from an Escape keydown.
|
|
60
|
+
- Headless browsers refuse pointer lock until one real click, and headless Chromium sends
|
|
61
|
+
a spurious mouse move of about (-960, -540) right after a lock lands (OS). Stage test
|
|
62
|
+
cameras with the game's own switches rather than mouse moves.
|
|
63
|
+
- Scripted calls into the page are granted user activation, so they never reach the
|
|
64
|
+
refusal paths; test those with a real click (LC).
|
|
65
|
+
|
|
66
|
+
## Reflow
|
|
67
|
+
|
|
68
|
+
Menus reflow at narrow widths and at 200% zoom without clipped actions or horizontal
|
|
69
|
+
scrolling, and touch targets are comfortably sized. Responsive menus do not make a game
|
|
70
|
+
playable by touch; say so if it is not (see `opengame-mobile`).
|
|
71
|
+
|
|
72
|
+
## Characters in menus
|
|
73
|
+
|
|
74
|
+
No character is cut by a frame edge, even while it moves; fade it out before any image
|
|
75
|
+
edge (OS: "no cut outs ... even fi they move"). A character card is ready only when this
|
|
76
|
+
subject is drawn on this visit, not when an earlier one was.
|
|
77
|
+
|
|
78
|
+
## Credits
|
|
79
|
+
|
|
80
|
+
When a shipped file's licence asks for attribution, the menu has a Credits or About
|
|
81
|
+
screen that shows it.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
> Carried from `opengame-game-feel` 1.1.0. Read it when: Make a browser game feel responsive and weighty. Covers hit and kill feedback on the hit frame, hits on the player, one game clock, a camera that is the mouse, a held weapon that rides the camera, killcams that replay what happened, input never dropped and proved with real events, motion judged on film, effects capped near the lens, springs, recoil and shake. Use when it feels floaty, stiff, laggy or jittery, hits do not land, the gun shakes, killcams look wrong, effects freeze, or add juice.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# Game feel
|
|
5
|
+
|
|
6
|
+
Feel is a set of small, measurable responses attached to real events: the camera
|
|
7
|
+
answers a shot, the world answers a hit, the simulation pauses for a kill. Each one is
|
|
8
|
+
cheap, and each one has a way to go wrong that players feel before they can name it.
|
|
9
|
+
Most of them live in motion and timing, which a still frame cannot show: OS's still
|
|
10
|
+
panels sat at 3 to 4 for about 135 builds while its owner's notes were about shake,
|
|
11
|
+
pacing and killcams, and LC's owner felt a 55 ms camera ease as a slow mouse.
|
|
12
|
+
|
|
13
|
+
Rules carry five tags; `opengame-quality-bar` explains them and the game codes.
|
|
14
|
+
[helpers/spring.js](helpers/spring.js) holds the spring, trauma shake and hitstop; its
|
|
15
|
+
`selfTest()` plants the Euler spring this replaces and proves it is caught. Gun handling,
|
|
16
|
+
view model size, reloads and kill reactions per weapon are in `opengame-weapons`. Killcam
|
|
17
|
+
recording is in [references/killcam.md](references/killcam.md), and the numbers from our
|
|
18
|
+
games, LC's chest camera among them, are in
|
|
19
|
+
[references/feel-numbers.md](references/feel-numbers.md).
|
|
20
|
+
|
|
21
|
+
## Rules
|
|
22
|
+
|
|
23
|
+
### Find the layer that jitters before fixing anything
|
|
24
|
+
- **Invariant:** In a third-person or follow view, the character, the camera and the world move smoothly when running, walking, strafing, stopping and standing still, and when something jitters the team proves which of the three moves before changing any of them.
|
|
25
|
+
- **Technique:** Measure each layer on its own: camera position second difference, the body's screen position per frame, and changed pixels with the camera still. Simulate on a fixed step and interpolate the render. Ease the follow camera with an exponential, `1 - exp(-k * dt)`. Pull the spring arm in quickly on collision, hold the closest distance briefly, and let it out slowly. Gait clip choice and pose weights belong to `opengame-characters`.
|
|
26
|
+
- **Reference configuration:** OC "fixed" the camera and then the world before the owner said "the character/OGs body is the thing jittering". The cause was a gait clip picked from raw speed, and an 80 ms ease ended it, 3.5 days and 6 or more asks after the first report. The stop jump fell from 6.6 to 2.5 px and the strafe jump from 3.1 to 1.0 px. OC's spring arm pulls in over 25 to 75 ms and holds the closest distance for 0.3 s; a side collision had snapped it up to 1.15 m. Framing: over the shoulder 2.6 m back and 1.15 m right, wide 4.8 m back and 2.0 m right, aiming 2.2 m back, with the character's centroid at most 0.30 of the frame width from the left edge. An earlier OC session noted jitter "judged by looking at screenshots and low-frame-rate recordings ... Nobody ever measured it".
|
|
27
|
+
- **Applies when:** Every game with a follow camera. First-person games run the same checks on the held weapon (below).
|
|
28
|
+
- **Verify:** Record at the display rate while running, stopping, strafing along a wall and idling. Plot the body's screen position and the camera's second difference per frame; neither shows single-frame spikes, and an idle character's legs do not move.
|
|
29
|
+
|
|
30
|
+
### A held weapon rides the camera and keeps only millimetres of its own motion
|
|
31
|
+
- **Invariant:** A held weapon or tool is still when the player is still, moves only for a cause the player made, and never jumps, twitches or shakes at any frame rate.
|
|
32
|
+
- **Technique:** Hang the weapon rig from the lens so it takes all of the camera's own breath, bob and lean, and give the weapon only millimetres of sway of its own. Integrate oscillator phase per frame, never `sin(time * rate)` with a changing rate. In a headless test at several frame rates plus an injected long frame, classify every frame's jolt by its cause and drive the uncaused count to zero; then add designed motion back on purpose (a turn trail, a strafe cant, a stop dip), with a fraction of it on the sights. Motion vectors and same-frame posing for the render side are in `opengame-weapons`.
|
|
33
|
+
- **Reference configuration:** LC's owner: "the guns jitter and shake so much when u move or run in diff directions and even like bounce up and down when ur just standing still?..." Its rig hung from the bare aim while the lens pitched, yawed and rolled with breath and stride, on top of the weapon's own 2 cm stride, eases written as a share per frame and hard clamps. After: own motion of 3.5 x 4 mm a stride (long arms 9 x 10) and 0.5 mm of breath; muzzle travel at 720p standing from 3 x 9 px to 0.5 x 1.6, walking 20 x 20 to 4.6 x 3.9, sprinting 68 x 57 to 9.9 x 9.8 (worst frame 1.8 px); uncaused jolts from 1,917 to 233 in 88,372 frames; jolts on a mouse turn in 67 of 108 frames to 0 to 2. Then, at the owner's ask ("as u move aroundin the concept art ur gun changes angle too"), a turn trail of 0.028 rad per rad/s (at most 7.5 degrees), a 5 degree strafe cant and a 2 degree stop dip, a fifth of each on the sights. OS's still-hold numbers are in `opengame-weapons`.
|
|
34
|
+
- **Applies when:** First-person games with a held weapon or tool.
|
|
35
|
+
- **Verify:** The muzzle's per-frame pixel track standing, walking and sprinting at 30, 60 and 144 fps with a hitch; the uncaused count is zero.
|
|
36
|
+
|
|
37
|
+
### The camera is the mouse, one to one, in the frame the input arrives
|
|
38
|
+
- **Invariant:** The same mouse travel turns the view by the same angle at any frame rate, the picture is never more than one frame behind the input, and any lag or trail lives in the held weapon, never in the camera.
|
|
39
|
+
- **Technique:** Apply look input to the camera in the frame it is read, with no ease. Put trails on the weapon. Show sensitivity in physical units (distance per full turn at a stated mouse resolution) with a live tester. Where aim assist slows one device, decide the device by recent motion so a resting stick never slows the mouse, and never let assist turn a still view. Measure the age of the picture the player sees, not the frame rate.
|
|
40
|
+
- **Reference configuration:** LC: 1,428 counts turn 180.00 degrees at 60, 30, 15 and 8 fps. The camera had trailed the mouse by a 55 ms ease (4.3 degrees, two to three frames late at a turn's end), which the owner felt as low sensitivity ("my mouse sntivity/how hard it is to turn is correlated with fps and perf it seem s"); 0.0022 rad a count is 9.1 cm per 360 at 800 cpi at 1.00x. A resting stick had flipped the device every frame and slowed the mouse with aim help. Beside a screen recorder sharing the GPU, mouse to photon was 65 to 140 ms. OS ran cancels on elapsed time "so 20 fps and 144 fps decide a press the same way".
|
|
41
|
+
- **Applies when:** Every mouse-aimed game.
|
|
42
|
+
- **Verify:** Throttle the page to 30, 15 and 8 fps and turn by a fixed count of real input: the angle is identical and the picture is one frame old.
|
|
43
|
+
|
|
44
|
+
### Hits on the player read light or heavy at a glance
|
|
45
|
+
- **Invariant:** A player who takes a hit knows how hard it was and where it came from on the next frame, the centre of the screen stays clear, and reduced motion keeps every cue while dropping the motion.
|
|
46
|
+
- **Technique:** Score severity per attacker and scale every response by it instead of firing one maximum response. Kick the view away from the attacker, never a random shake, through a critically damped spring. Draw an edge arc toward the attacker and claw marks at the screen edge only. Add a heartbeat and desaturation as health falls. Run combat before the camera in the frame so the flinch is not a frame late.
|
|
47
|
+
- **Reference configuration:** OC passes a heavy hit when at least 6% of the screen changes by 25 or more levels within 0.1 s; an 80 ms flash was "too timid". Severity runs from 0.3 to 1.0 across the four enemy types; before that, every hit maxed out at about 28 damage on a 250 HP player. Edge arcs are 19 to 38 px at 1080p and fade over 0.7 to 0.9 s. Claws stay in the outer 18%, one per side, stack to three, tear in over 90 ms and dry to brown over 1.5 to 2 s. The low-health vignette stays in the outer 0.15 of the width at 35% opacity or less (it had covered 45% of the frame). Reduced motion caps hitstop at 40 ms and turns the kick off. OC's camera ran before combat, so the flinch landed a frame late. LC's blow kick had stayed unsettled at 11.09 degrees after 53 frames; stepped exactly, it settles from 4.14 degrees by frame 11.
|
|
48
|
+
- **Applies when:** Games where the player takes damage from directions.
|
|
49
|
+
- **Verify:** Take a light hit and a heavy hit from each side and capture the next six frames: the two read differently, each points at the attacker, and a centre box is unchanged.
|
|
50
|
+
|
|
51
|
+
### Hit and kill confirmation lands on the hit frame, once per enemy
|
|
52
|
+
- **Invariant:** The hit marker, confirm sound, enemy flinch and blood or sparks appear on the frame the hit resolves and only for damage that was scored; hits, headshots and kills each have their own marker; each enemy shows one counting score pop; the crosshair never changes colour to report what it is over.
|
|
53
|
+
- **Technique:** Drive every confirmation from the one resolved damage event, never from the button or a second calculation in the HUD. Keep one marker per hit type with its own lifetime, merge score pops per enemy into one counting number, and give flesh blood and metal sparks.
|
|
54
|
+
- **Reference configuration:** OC markers last 130, 165 and 240 ms for hit, headshot and kill, with a 500 ms headshot-kill marker, a cyan X for a hit and an off-white X for a kill. Score pops merge within 0.15 to 0.25 s in three rows 30 px apart. The enemy flinch peaks one frame after the hit and recovers in about 150 ms. Blood is 24 droplets at 2 to 5 m/s with a #5a1212 mist. The fire cue reaches a quarter of its peak within 3 ms. OC's crosshair had turned red whenever it was over the boss and was changed to never turn red. OS's owner: "im also getting too many hitmarkers... when i shoudlnt be", fixed by firing markers only on scored damage.
|
|
55
|
+
- **Applies when:** Shooters, brawlers and any game where the player hits things.
|
|
56
|
+
- **Verify:** Fire a burst into one enemy and step the recording frame by frame: marker, sound and flinch share the hit frame, and one pop counts up.
|
|
57
|
+
|
|
58
|
+
### One game clock for hitstop and slow motion, and wall time for the interface
|
|
59
|
+
- **Invariant:** Every timer that should slow with the game reads one time scale, hitstop and slow motion are measured in game time, effects keep moving through a hitstop, a cinematic can switch hitstop off, and menus, countdowns, input arming and logged durations run on real elapsed time.
|
|
60
|
+
- **Technique:** Keep one clock object that hands out a scaled delta for the simulation and an unscaled delta for UI and anything meant to ignore slow motion, and make each subsystem choose one. Search the code for raw frame delta and frame counters in gameplay timers, effect emitters and physics steps. Slow actors and bosses by scaling their own delta, never by freezing them. Run interface animations, countdowns and input gates on wall time with a capped step, never on the simulation's clamped delta, and time a rule on the same clock it is spaced on. Test every effect at a quarter speed.
|
|
61
|
+
- **Reference configuration:** OC's kill hitstop and melee holds ran on raw frame delta, so in slow motion they held runs of near-frozen frames, and the owner saw "frozen flips" in a film take after an audit had predicted the defect. A global hitstop froze the boss's clips and springs while targets kept moving, and the boss read as "jagged". A hitstop that held the effect clock froze shot flashes on screen ("why do the gun bullets and juice like just freeze"), which OC logged as a P0. OS found six bugs from a 50 ms delta clamp on its interface: a 180 ms wipe that took about 2 s, clicks unarmed for 1.7 s at 3 fps and a title that ignored presses for about 7 s; a countdown on clamped game time ran about twice as long on slow machines; bot jams spaced on match time but timed on frame time lasted 90 s, not 30. The interface side is in `opengame-front-end`, and the frame counts at quarter speed are in `opengame-capture`.
|
|
62
|
+
- **Applies when:** Any game with hitstop, slow motion, kill cams, capture for trailers, or a delta clamp.
|
|
63
|
+
- **Verify:** Kill the same enemy at full speed and at 0.25x and record both: the hold lasts the same game time, effects and UI keep moving through it, and no effect strobes. Under a 4x CPU throttle, wipes and countdowns match a stopwatch.
|
|
64
|
+
|
|
65
|
+
### Hitstop pauses the simulation, never the render
|
|
66
|
+
- **Invariant:** On a kill or a heavy hit, the simulation holds for a moment while rendering and input keep running, and repeated hitstops never stack into stutter.
|
|
67
|
+
- **Technique:** Return a reduced simulation step from a hitstop object (`createHitstop` in the helper) and render as normal. A freeze that ends mid-frame hands back the remainder. Rate-cap it, and keep it for heavy moments rather than every kill.
|
|
68
|
+
- **Reference configuration:** The ST starter holds 45 ms on a kill and 60 ms on a heavy hit; 30 to 60 ms is the useful range. None of DK, MC, AW or SR has hitstop, and each would gain from it. OC slowed play to 8% speed for 45 ms on a kill and 30 ms on a headshot, 100 ms on a downing blow and 40 to 60 ms on melee (an axe went from 75 to 60). Before a cap of once per 0.6 s it added up to 225 ms of freeze per second, which read as hitching, and OC ended with no hitstop on ordinary gun kills. OH, a rhythm game, uses none.
|
|
69
|
+
- **Applies when:** Melee, brawlers, shooters with kill beats. Not in precision platforming or timing games, where a pause eats an input window or moves the next note.
|
|
70
|
+
- **Verify:** Log simulated time and rendered frames through a kill: frames keep coming, simulated time stalls for the hold, and the mouse still turns the view. Kill a crowd in one burst and count the holds per second.
|
|
71
|
+
|
|
72
|
+
### Camera motion sells movement but never moves the aim
|
|
73
|
+
- **Invariant:** Sway, bob, flinch, landing jolts and FOV kicks make movement felt, while the shot always goes where the unshaken view points, aimed views stay calm, and the player can turn shake and blur down.
|
|
74
|
+
- **Technique:** Put sway and kick on a child of the aiming camera and cast shots from the parent. Kick the FOV per weapon class. Remove sway and bob while aiming. Blur the world with motion blur and keep the held weapon sharp. Offer an FOV slider and a shake setting. In third person, let the drawn body trail the aim through a spring while hits stay on the simulation.
|
|
75
|
+
- **Reference configuration:** OC: sprint sway 1.6 to 1.8 degrees per two steps, bob 0.4 to 0.8 degrees, walk 0.2 degrees; a heavy flinch of 3.9 degrees is back at rest in 0.12 s; the flinch spring is pitch 0.026, yaw 0.018, roll 0.055 rad at 7 Hz and damping 0.5. FOV kicks are 2.0 degrees for a shotgun, 2.4 for a launcher, 1.6 for a sniper and 0.2 for an SMG; landing jolts scale over 3 to 15 m/s of fall speed. Motion blur is on by default with the gun sharp, and the FOV slider runs 80 to 120. Sway and bob while aimed was "a big regression" in the owner's words. LC's landing sinks the lens by impact speed (8 cm standing, about 11 sprinting), and its aim assist never turns a still view. OS's drawn bodies trail aim through a 0.06 s spring capped at 0.6 rad.
|
|
76
|
+
- **Applies when:** First-person and over-the-shoulder shooters.
|
|
77
|
+
- **Verify:** Sprint and fire at a fixed target with sway on and then off; the spread on the target is the same. Aim and stand still; the view does not move.
|
|
78
|
+
|
|
79
|
+
### No input is ever dropped
|
|
80
|
+
- **Invariant:** Every press registers, the action starts on the frame of the input, a press made slightly early is buffered rather than lost, nothing locks the player out after a landing, releases are heard wherever the pointer is, and work held at a station is never lost to another action.
|
|
81
|
+
- **Technique:** Buffer jump and fire presses for a short window and replay them when they become legal, and add no lockout after landing. Let fire and reload run while sprinting, and let firing run during a held station action without resetting its progress. Listen for releases on the window, not the canvas, and handle cancel events so nothing stays pressed. Latch a held confirm key until it is released so it does not advance several menus. Request pointer lock inside the gesture that starts play and never request a held lock again. Inside OpenGame's frame the page owns fullscreen: call `og.fullscreen.request()` from a click, never `requestFullscreen` (`opengame-sdk`); elsewhere, ask for fullscreen only after the lock lands.
|
|
82
|
+
- **Reference configuration:** OC buffers jump for 140 ms, so a press in the last 140 ms of a fall jumps on landing, and the air jump refills only on ground contact. Build placement lands on the click frame. A held Enter kept moving the owner through menus until it got a release latch; the menu-click case is in `opengame-front-end`. LC buffers 0.1 s with no landing lockout after "where is there a pause after u alnd after a jump before u can jump again?", and after "u should be able to shoot while cranking generators and that shouldnt stop/reset the generator progress" firing no longer cancels a crank. OS: "and again i said get rid of this weird spawn in shit wher eu dont spawn in and it says click to take control!"; fullscreen had spent the gesture, and "lock+fullscreen both hold in that order, every other order loses the lock"; a second lock request dropped the lock in 1 of 7 tours.
|
|
83
|
+
- **Applies when:** Every game with real-time input.
|
|
84
|
+
- **Verify:** Record input and frames together: tap jump just before landing, release the mouse outside the window, hold Enter on a menu, fire during a station action, and start play with one real click. Each press acts once, on the next frame, and the lock holds.
|
|
85
|
+
|
|
86
|
+
### Timing is proved with real input events
|
|
87
|
+
- **Invariant:** Every timing claim (a press acting, a shot landing during a raise, a buffered jump, a note judged) is proved with real input events on the page the player loads, and every press is judged at its own event time, not the frame it was read in.
|
|
88
|
+
- **Technique:** Drive benches with real key and mouse events at fixed delays after a trigger, and count outcomes per dozen. Stamp each press with its event timestamp and judge it against the game's clock. Scripted page calls grant user activation, so pointer lock and autoplay refusals never happen in them: begin at least one run with a real press on the real page. Leave the feel to the owner's hands once the bench passes, and never report a bench as feel.
|
|
89
|
+
- **Reference configuration:** OS's scope bench went from 0 to 2 of 12 hits to 12 of 12 from 100 ms, and passed while the owner still saw "a weird frame". OH stamped keys with their own event time: real presses landed at +1 ms mean, p95 under 5 ms, with no misses under stalls (`opengame-rhythm`). LC: "None of my 34 earlier spawns was begun by a real press", a headless "23 of 23" pointer-lock pass came from the test tool's own activation, and no button on the lobby's panel answered a real press until the director pressed one.
|
|
90
|
+
- **Applies when:** Every game with real-time input, and every report that says a timing works.
|
|
91
|
+
- **Verify:** A bench table per action at fixed delays from real input, and one run begun by a real press on the page the player loads.
|
|
92
|
+
|
|
93
|
+
### Motion is judged on film, at a quarter speed and at full speed
|
|
94
|
+
- **Invariant:** Anything defined by motion or timing (holds, reloads, recoil, flinches, deaths, killcams, aiming, transitions, shake) is accepted only from recordings stepped frame by frame and then watched at speed in the player's own picture, never from stills.
|
|
95
|
+
- **Technique:** Record every drawn frame on the game's clock and play it at a quarter speed beside a sheet of consecutive frames, then watch the whole act at full speed, as the player sees it. Film enemies from the side as well as from the lens. Mask screen-fixed overlays out of any score. Say in the report when nobody has watched a film at speed. Capture methods are in `opengame-capture`.
|
|
96
|
+
- **Reference configuration:** LC accepted motion only from quarter-speed video: side-lens films showed library falls were stunt breakfalls, and a leap that looked right from beside went under the bottom of the picture from the lens. Its owner asked to "inspect things at each frame with super harsh critics eye", yet its leads made 72 reload films and watched none at speed, while the owner judged the whole act at speed in the player's own picture, not a fingertip at one frame, as its director put it. OS's still panels sat at 3 to 4 for about 135 builds, and still judges polished a bullet cam the owner had banned. OH counted a change only at 1:1 or in consecutive frames.
|
|
97
|
+
- **Applies when:** Anything that moves.
|
|
98
|
+
- **Verify:** A sheet per motion with named faults or "none" read at full size, and a note of who watched it at speed.
|
|
99
|
+
|
|
100
|
+
### Killcams replay recorded truth at normal speed
|
|
101
|
+
- **Invariant:** A killcam shows the killer's real weapon, finish, attachments, field of view, moves, hit markers and sounds, and the whole action from its start, at normal speed; only a final killcam slows, around the deciding shot.
|
|
102
|
+
- **Technique:** Record the state of every rendered frame (camera, view model pose, scope state, the weapon and finish in hand) plus rival animation and an event ring, in a ring sized by time that reaches back to the start of the action, such as the last hip frame before a scope-in. Snapshot identity with an explicit unset value, since zero is a valid finish. Replay the recorded transforms each frame and never smooth or resample them. Play sound as a tape of the live one-shots at their own pitch. A killcam the owner turns off by default keeps its logic and its tests.
|
|
103
|
+
- **Reference configuration:** OS: "normal killcams shoudl be normal killcams not slow mo or follow the bullet shit just normal cod style killcams...", which reversed a bullet cam that judges and research had wanted; then "it even change dthe fucking gun that i had? and no hitmarkers" and "final killcams dont show the full ads / scope in and out etc anymore". It had resampled at 30 to 60 Hz and taken the field of view from the live rifle. A fixed 4.0 s lead opened hardscopes already scoped; a ring of 2,048 frames at up to 120 a second covers 17 s at any refresh rate and reaches back 8 s. Slow-motion rivals stood or jumped on 26 of 86 frames until the renderer took each frame's recorded transform (0 of 56). Killcams took about 11 days and seven rebuilds. Partway through, the owner turned ordinary killcams off by default ("by default lets NOT show killcams") with the logic kept, and the later rebuilds were the recording and the final killcam.
|
|
104
|
+
- **Applies when:** Any killcam, replay, spectator view or death recap.
|
|
105
|
+
- **Verify:** Change loadout after a kill: the replay keeps the old gun. Diff a replayed kill with a flip against the live capture at 60 and 144 Hz.
|
|
106
|
+
|
|
107
|
+
### The final killcam keeps its pace and hands back control in one frame
|
|
108
|
+
- **Invariant:** The final killcam plays the last seconds at normal speed, slows around the deciding shot, returns to normal speed, holds, then shows the scoreboard and the winner without a button; the victim stays in view, no frame is black, and leaving any replay lands the player alive with a full HUD on one frame.
|
|
109
|
+
- **Technique:** Keep the beat sheet as data keyed to the kill time and paced on wall time, and end the replay only after the settle. Ray-test the replay camera's view of the victim. Route every exit (the end, a skip, the menu) through one transaction that picks the life, writes the spawn and clears the view on the same frame. Stand the bots down after the final kill so the replay records nothing new.
|
|
110
|
+
- **Reference configuration:** OS's owner: "then last ckill has a lead up o f slow mo and after shot too just all fucking smooth ... then ramp back to normal speed then stya there for a sec and then show the scoreboard and then winner scene", and "like a 1/10 and needs to get to 9.5/10 compared to a mw2 final klilcam clip". Its replay had been "complete immediately on the first post-shot frame", and "a tree trunk fills the scope and the victim never appears". After: VICTORY for 2.3 s over the held game, the killer's eyes, an ease to 0.25x from 0.95 s before the shot to 0.22 s before, 1x by 1.1 s after, the scoreboard, the winner, shown only when the local player wins; no black frame in 848. Skip broke 5 times in 4 days. Critics without the reference clip scored it 8.4 to 9.4 while the owner called it 1 of 10.
|
|
111
|
+
- **Applies when:** Shooters with an end-of-match replay.
|
|
112
|
+
- **Verify:** Capture from the final kill to results with a beat timeline and adjacent-frame checks; skip with real keys on every exit, and check that the first frame after is live.
|
|
113
|
+
|
|
114
|
+
### Effects near the lens are capped
|
|
115
|
+
- **Invariant:** No muzzle flash, explosion, fire, glow or particle covers more than a small share of the frame or whites it out, however close to the camera it happens, and every shot shows a flash, a tracer, brass and an impact.
|
|
116
|
+
- **Technique:** Scale effects by distance to the camera, clamp HDR values before tonemapping, cull or fade particles near the lens, keep the flash short and warm, and draw tracers with a pixel floor so they never go sub-pixel. Build near fire from many small tongues rather than a few large cards. Raise a sprite's brightness by multiplying, never by adding, so its quad stays dark.
|
|
117
|
+
- **Reference configuration:** OC: a wonder-weapon flash at HDR 10 within 1 m whited out the screen, and a 2.1 m crescent at 1.45 m filled 80% of the frame. The flash lasts 40 to 60 ms (two frames) and stays under 2% of the frame; the third-person flash is 1.9x (2.6x was too big); tracer cores are at least 3.2 px. One fix overshot the flash to 42% of its size, read as "hard to see", and settled at two thirds. LC's near fire keeps nothing within 0.3 to 0.75 m of the eye and no sprite wider than 0.22 rad (about an eighth of the frame), caps bloom at 4 before halation, and drops the muzzle flash on a flamethrower, which strobed the zombies white ten times a second; its brass went dull after "three fat white cylinders glowing in a dark hall".
|
|
118
|
+
- **Applies when:** Games with flashes, explosions, fire or bright effects near the player.
|
|
119
|
+
- **Verify:** Trigger each effect at 1, 3 and 10 m from the camera and count the pixels above 0.95; the share stays under the game's cap at every distance.
|
|
120
|
+
|
|
121
|
+
### Springs and eases that cannot explode or ring
|
|
122
|
+
- **Invariant:** Every spring, follow, lurch and return settles to rest at any frame time the game can produce, lands in the same place at any frame rate, never rings, never moves a fixed share of the distance per frame, and never hard-clamps.
|
|
123
|
+
- **Technique:** Solve the critically damped spring in closed form (`spring` in the helper) instead of integrating it step by step. Frame-rate independent easing toward a target uses `damp`, an exponential, never a fixed fraction per frame. Turn any target jump over a threshold into a timed, eased travel. Test at uneven frame lengths, not one fixed step, and again after ten minutes of play.
|
|
124
|
+
- **Reference configuration:** DK's recoil spring at omega 22, integrated explicitly, went unstable below about 44 fps and spun the camera. The helper's self-test shows a semi-implicit Euler spring at the same omega exploding at a 50 ms frame and drifting between 30 and 150 fps. LC's exact step, `x' = (x + (v + r x) h) e^(-r h)`, is "the same at 30 and 120 frames a second and cannot ring": its hit kick went from 11.09 degrees unsettled after 53 frames to 4.14 settled by frame 11, and target jumps over 8 cm became 0.25 s travels (a hand's worst step from 385 to 11.7 mm). A zombie gait change tested at one fixed frame length broke in the browser, with 28 gait changes in 16 s.
|
|
125
|
+
- **Applies when:** Any spring, follow camera, sway, procedural motion or smoothing.
|
|
126
|
+
- **Verify:** `springProperties(spring)` returns no failures, and the same scripted motion at 30, 60 and 144 fps with a 100 ms hitch gives curves that overlay.
|
|
127
|
+
|
|
128
|
+
### Recoil returns to the aim
|
|
129
|
+
- **Invariant:** After firing stops, the view returns to where the player was aiming, not to where recoil left it.
|
|
130
|
+
- **Technique:** Recoil is its own spring per axis, added on top of the aim and never written into it. Clamp each axis and drop the velocity into the clamp so the view does not bounce off the limit.
|
|
131
|
+
- **Reference configuration:** DK: omega 22 pitch, 20 yaw, 17 roll; clamps 0.11, 0.07, 0.09 rad. SR recoils the weapon only, with `exp(-24t) * cos(21t)` over 0.28 s, and shakes nothing. OC's per-class recoil springs and LC's mass-driven recoil are in `opengame-weapons`.
|
|
132
|
+
- **Applies when:** Shooters and any game with a kicking weapon or tool.
|
|
133
|
+
- **Verify:** Fire a burst at a fixed mark, stop, and wait half a second: the reticle is back on the mark.
|
|
134
|
+
|
|
135
|
+
### Shake is trauma squared, and it decays
|
|
136
|
+
- **Invariant:** Camera shake scales with how hard the event was, fades on its own, and never fights the player's aim.
|
|
137
|
+
- **Technique:** Events add trauma between zero and one; trauma decays linearly; the shake is trauma squared driving a few detuned sines per axis. Most of it is removed while aiming. Pick shake or weapon-only recoil for the game, not both, and write the choice into every critic's brief.
|
|
138
|
+
- **Reference configuration:** DK: three sines per axis at 30 Hz, amplitudes 0.038 yaw, 0.032 pitch, 0.024 roll rad, decaying 1.6 per second; a shot adds 0.08, a heavy shot 0.22, a landing up to 0.35, an explosion up to 0.5; 25% kept while aiming. OC shakes for explosions out to 3.5 times their radius and has a shake setting. OH's owner wanted no shake at all ("the background is hsaking so much and not looking aaa at all"), and its judges kept recommending "a 6 px shake that decays over 150 ms" until the rule reached their rubric.
|
|
139
|
+
- **Applies when:** Action games with impacts. Puzzle, calm and music-synced games usually want none.
|
|
140
|
+
- **Verify:** After the largest event in the game, the view is still within a second.
|
|
141
|
+
|
|
142
|
+
### Bob follows the feet
|
|
143
|
+
- **Invariant:** Head bob and footsteps match distance travelled, so they keep pace with the feet at any speed and stop when the player stops.
|
|
144
|
+
- **Technique:** Advance a bob phase by distance walked over stride length, not by time, and fire footstep sounds on that phase.
|
|
145
|
+
- **Reference configuration:** DK: stride 1.35 m walking, 1.65 m sprinting, 0.95 m crouched; a 2:1 Lissajous at amplitude 0.042, cut by 86% while aiming. OC removes bob entirely while aiming. LC's bob cusp at each footfall was one of its causes of gun jitter; ease through the footfall.
|
|
146
|
+
- **Applies when:** First-person games on foot. Third-person games drive the same timing from the animation instead.
|
|
147
|
+
- **Verify:** Walk into a wall holding forward: the bob and the footsteps stop.
|
|
148
|
+
|
|
149
|
+
### The field of view answers speed
|
|
150
|
+
- **Invariant:** Speed is felt through the lens: sprinting and sliding widen the view, and it eases back faster than it widened.
|
|
151
|
+
- **Technique:** A held FOV kick eased with `damp`, a faster rate out than in, plus a short punch on entering a slide or dash.
|
|
152
|
+
- **Reference configuration:** DK: +9 degrees sprinting, in at rate 5.5 and out at 9; +6 sliding plus a 5 degree punch. SR widens 7 degrees with descent speed.
|
|
153
|
+
- **Applies when:** First-person and chase-camera games with speed changes.
|
|
154
|
+
- **Verify:** Record FOV per frame through a sprint start and stop; both are smooth curves with no step.
|
|
155
|
+
|
|
156
|
+
### The view model is its own pass
|
|
157
|
+
- **Invariant:** The player's weapon or hands render at a fixed lens with their own depth and light, never clipping into walls and never smeared by world effects.
|
|
158
|
+
- **Technique:** A separate camera and pass for the view model, after every depth-consuming world pass, at a fixed field of view and a tiny near plane, with its own small light rig and environment on its own layer. The three.js setup, its motion vectors and same-frame posing are in `opengame-weapons`.
|
|
159
|
+
- **Reference configuration:** DK: a 75 degree lens, near 0.012, a key of 1.34 and a cool rim of 0.44 on the view-model layer; the world's near plane moved out to 0.15 for a three times depth-precision gain. OC: world FOV 85 (65 to 110 on the slider), view model 75 degrees at near 0.012, pulling to 58.5 degrees when aimed; its studio environment gave 41% of the gun's brightness and the two directional lights about 3 luma. OS fixed its view model lens at 68 degrees so a FOV slider from 65 to 120 moves the gun under 0.8%.
|
|
160
|
+
- **Applies when:** First-person games with a visible weapon or tool.
|
|
161
|
+
- **Verify:** Press the view model into a wall and sweep the FOV slider; the weapon neither clips nor changes size.
|
|
162
|
+
|
|
163
|
+
### Every surface answers a hit
|
|
164
|
+
- **Invariant:** An impact looks and sounds like the material it hit, and its mark outlasts its dust.
|
|
165
|
+
- **Technique:** A per-surface table (dust, chips, sparks, decal colour and size, sound family, light flash) looked up by the hit surface. Decals live in a fixed ring so the oldest goes first.
|
|
166
|
+
- **Reference configuration:** DK: metal throws 9 sparks and concrete none, a 0.35 light flash on metal, a ring of 64 decals oriented to the surface, holes living 40 s and fading over their last fifth.
|
|
167
|
+
- **Applies when:** Any game where things are hit.
|
|
168
|
+
- **Verify:** Shoot or strike each surface type once and capture the next second; each reads differently.
|
|
169
|
+
|
|
170
|
+
### One complete feedback set per action, and the big moment is rare
|
|
171
|
+
- **Invariant:** Each player action has anticipation, impact, sound, camera response and a trace that lingers, all driven by the resolved outcome; no animation ever delays the input that started it; and a full-screen effect is rare, timed and decided in one place.
|
|
172
|
+
- **Technique:** Drive hit, shield-break and kill feedback from resolved damage events, not from the attack button. Stack a kill on several channels: marker, protected sound, score popup, a voice or callout. Start the action on the input frame and let presentation catch up. Let systems only ask for a big effect, and have one tested function decide whether it fires, so it neither repeats like a clock nor never comes.
|
|
173
|
+
- **Reference configuration:** MC and AW stack kill confirmation on four channels. ST's craft defaults: never delay input for an animation, and keep a stable cue for reduced motion. OH answers each hit within a fifth of a second (a splat of 0.12 s, a halo of 0.1 s) and fires its full-screen hit about once a phrase, on a run of 8, a milestone or the first second of its power mode; earlier gates fired "like a clock every 2.4 s", then never in 35 s, then at a combo of 2.
|
|
174
|
+
- **Applies when:** Every game.
|
|
175
|
+
- **Verify:** Measure input to first visible response with a frame recording; it is the next frame. Kill something and list every channel that answered. Log the big effect's firings over a long run.
|
|
176
|
+
|
|
177
|
+
## More numbers
|
|
178
|
+
|
|
179
|
+
Muzzle flashes, explosions scaled by radius, loot that lands, third-person camera values
|
|
180
|
+
from SR and OC, OC's player-damage and confirmation tables, and LC's chest-camera feel
|
|
181
|
+
(placement, recoil, jumps, input) are in [references/feel-numbers.md](references/feel-numbers.md).
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera and hit-feel primitives that stay correct at any frame time. Copy this file
|
|
3
|
+
* into the game; it imports nothing and touches no scene object. Each piece returns
|
|
4
|
+
* numbers the game adds to its camera or its simulation step, so aim, collision and
|
|
5
|
+
* where a shot goes stay the game's own truth.
|
|
6
|
+
*
|
|
7
|
+
* import { spring, damp, createTrauma, createHitstop, selfTest } from "./spring.js";
|
|
8
|
+
*
|
|
9
|
+
* const recoil = { x: 0, v: 0 }; // one per axis
|
|
10
|
+
* recoil.v += kick; // on a shot
|
|
11
|
+
* camera.rotation.x += spring(recoil, 0, 22, dt);
|
|
12
|
+
*
|
|
13
|
+
* const shake = createTrauma(); // shake.add(0.3) on an impact
|
|
14
|
+
* const o = shake.update(dt, { aiming }); // o.yaw, o.pitch, o.roll in radians
|
|
15
|
+
*
|
|
16
|
+
* const stop = createHitstop(); // stop.hold(0.05) on a kill
|
|
17
|
+
* const simDt = stop.step(dt); // simulate with simDt, render with dt
|
|
18
|
+
*
|
|
19
|
+
* Run `selfTest()` once after editing this file. It plants the integrator this file
|
|
20
|
+
* exists to replace and fails unless that planted version is caught.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A critically damped spring, solved in closed form. `state` is `{ x, v }` and is
|
|
25
|
+
* updated in place; the new position is returned. Exact for a constant target, so the
|
|
26
|
+
* result after one second is the same at 30 fps, 144 fps or one 50 ms hitch.
|
|
27
|
+
* `omega` is the angular frequency in radians per second: higher is stiffer.
|
|
28
|
+
*/
|
|
29
|
+
export function spring(state, target, omega, dt) {
|
|
30
|
+
const d = state.x - target;
|
|
31
|
+
const e = Math.exp(-omega * dt);
|
|
32
|
+
const c = state.v + omega * d;
|
|
33
|
+
state.x = target + (d + c * dt) * e;
|
|
34
|
+
state.v = (state.v - c * omega * dt) * e;
|
|
35
|
+
return state.x;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Frame-rate independent approach toward a target, for FOV kicks and blends. */
|
|
39
|
+
export function damp(current, target, rate, dt) {
|
|
40
|
+
return target + (current - target) * Math.exp(-rate * dt);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Trauma-squared shake. Events add trauma between 0 and 1; trauma decays linearly;
|
|
45
|
+
* the shake is trauma squared, so small hits barely move the view and big ones do.
|
|
46
|
+
* Three detuned sines per axis read as noise without allocating or seeding anything.
|
|
47
|
+
* Defaults are Der Koloss's reference configuration; tune per game.
|
|
48
|
+
*/
|
|
49
|
+
export const TRAUMA_DEFAULTS = Object.freeze({
|
|
50
|
+
decayPerSecond: 1.6, hz: 30, amplitude: { yaw: 0.038, pitch: 0.032, roll: 0.024 }, aimingKeeps: 0.25,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function createTrauma(tuning = TRAUMA_DEFAULTS) {
|
|
54
|
+
let trauma = 0, t = 0;
|
|
55
|
+
return {
|
|
56
|
+
add(amount) { trauma = Math.min(1, trauma + Math.max(0, amount)); },
|
|
57
|
+
get trauma() { return trauma; },
|
|
58
|
+
update(dt, { aiming = false } = {}) {
|
|
59
|
+
trauma = Math.max(0, trauma - dt * tuning.decayPerSecond);
|
|
60
|
+
t += dt * tuning.hz;
|
|
61
|
+
const s = trauma * trauma * (aiming ? tuning.aimingKeeps : 1);
|
|
62
|
+
return {
|
|
63
|
+
yaw: (Math.sin(t * 1.3) * 0.6 + Math.sin(t * 3.7) * 0.4) * tuning.amplitude.yaw * s,
|
|
64
|
+
pitch: (Math.cos(t * 1.7) * 0.6 + Math.cos(t * 4.3) * 0.4) * tuning.amplitude.pitch * s,
|
|
65
|
+
roll: (Math.sin(t * 2.3) * 0.6 + Math.sin(t * 5.1) * 0.4) * tuning.amplitude.roll * s,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Hitstop: a short freeze of the SIMULATION on a kill or a heavy hit. The render loop
|
|
73
|
+
* and input keep running, so the frame holds while the game still answers the mouse.
|
|
74
|
+
* `step(dt)` returns the time the simulation should advance this frame; a freeze that
|
|
75
|
+
* ends part-way through a frame hands back the remainder rather than swallowing it.
|
|
76
|
+
*/
|
|
77
|
+
export function createHitstop() {
|
|
78
|
+
let remaining = 0;
|
|
79
|
+
return {
|
|
80
|
+
hold(seconds) { remaining = Math.max(remaining, seconds); },
|
|
81
|
+
get frozen() { return remaining > 0; },
|
|
82
|
+
step(dt) {
|
|
83
|
+
if (remaining <= 0) return dt;
|
|
84
|
+
const spent = Math.min(remaining, dt);
|
|
85
|
+
remaining -= spent;
|
|
86
|
+
return dt - spent;
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** The integrator this file replaces: semi-implicit Euler on the same spring. */
|
|
92
|
+
function eulerSpring(state, target, omega, dt) {
|
|
93
|
+
const a = -omega * omega * (state.x - target) - 2 * omega * state.v;
|
|
94
|
+
state.v += a * dt;
|
|
95
|
+
state.x += state.v * dt;
|
|
96
|
+
return state.x;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Runs a spring from a recoil kick for `seconds` at a fixed `dt`. */
|
|
100
|
+
function settle(step, omega, dt, seconds) {
|
|
101
|
+
const state = { x: 0, v: 1 };
|
|
102
|
+
let peak = 0;
|
|
103
|
+
for (let time = 0; time < seconds - 1e-9; time += dt) peak = Math.max(peak, Math.abs(step(state, 0, omega, dt)));
|
|
104
|
+
return { final: Math.abs(state.x), peak };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The two properties the game relies on, measured against `step`:
|
|
109
|
+
* - stable: a recoil kick returns to rest within a second, even at a 50 ms frame;
|
|
110
|
+
* - frame-rate independent: the pose after half a second is the same at 30 and 144 fps.
|
|
111
|
+
* Returns a list of failures; empty means the properties hold.
|
|
112
|
+
*/
|
|
113
|
+
export function springProperties(step, omega = 22) {
|
|
114
|
+
const failures = [];
|
|
115
|
+
for (const dt of [1 / 144, 1 / 60, 1 / 30, 1 / 20]) {
|
|
116
|
+
const { final, peak } = settle(step, omega, dt, 1);
|
|
117
|
+
if (!(final < 1e-3) || !(peak < 1)) failures.push(`unstable at ${Math.round(1 / dt)} fps: final ${final.toExponential(2)}, peak ${peak.toFixed(3)}`);
|
|
118
|
+
}
|
|
119
|
+
const slow = settle(step, omega, 1 / 30, 0.5).final, fast = settle(step, omega, 1 / 150, 0.5).final;
|
|
120
|
+
if (Math.abs(slow - fast) > 1e-6) failures.push(`frame-rate dependent: ${slow.toExponential(3)} at 30 fps, ${fast.toExponential(3)} at 150 fps`);
|
|
121
|
+
return failures;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Plants the Euler spring first and requires the properties to catch it, then checks
|
|
126
|
+
* this file's spring, trauma and hitstop. Returns `{ ok, examined, failures }`.
|
|
127
|
+
*/
|
|
128
|
+
export function selfTest() {
|
|
129
|
+
const failures = [];
|
|
130
|
+
let examined = 0;
|
|
131
|
+
const planted = springProperties(eulerSpring); examined++;
|
|
132
|
+
if (!planted.length) failures.push("planted Euler spring was not caught; the property check is broken");
|
|
133
|
+
const real = springProperties(spring); examined++;
|
|
134
|
+
failures.push(...real.map((f) => `spring: ${f}`));
|
|
135
|
+
|
|
136
|
+
const shake = createTrauma(); shake.add(1); examined++;
|
|
137
|
+
let last = 0;
|
|
138
|
+
for (let i = 0; i < 120; i++) last = Math.abs(shake.update(1 / 60).yaw);
|
|
139
|
+
if (shake.trauma > 0 || last !== 0) failures.push("trauma was still shaking the view two seconds after a full hit");
|
|
140
|
+
|
|
141
|
+
const stop = createHitstop(); stop.hold(0.05); examined++;
|
|
142
|
+
let simulated = 0;
|
|
143
|
+
for (let i = 0; i < 6; i++) simulated += stop.step(1 / 60);
|
|
144
|
+
if (Math.abs(simulated - (6 / 60 - 0.05)) > 1e-9) failures.push(`hitstop simulated ${simulated.toFixed(4)} s of 0.05 s after a 0.05 s hold`);
|
|
145
|
+
return { ok: failures.length === 0, examined, failures };
|
|
146
|
+
}
|
package/dist/skills/opengame-all-in-one/references/opengame-game-feel/references/feel-numbers.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Feel numbers from our games
|
|
2
|
+
|
|
3
|
+
Reference configurations, each from the game named. Use them as a starting point for a
|
|
4
|
+
game of the same kind and scale, then tune by feel with frame recordings.
|
|
5
|
+
|
|
6
|
+
## Muzzle flash and shots (DK, MC)
|
|
7
|
+
|
|
8
|
+
- A 45 to 58 ms HDR core, a few streaks, one wisp of smoke that builds into a haze under
|
|
9
|
+
sustained fire, and a 55 ms point light from the light pool.
|
|
10
|
+
- Each shot adds 0.07 of exposure flash (a heavy shot 0.16), decaying at 7 per second.
|
|
11
|
+
- Pad rumble where a gamepad is connected: a shot (0.08, 0.22, 45 ms), damage taken
|
|
12
|
+
(0.35, 0.15, 110 ms).
|
|
13
|
+
|
|
14
|
+
## Explosions, scaled by radius k (DK)
|
|
15
|
+
|
|
16
|
+
A 26k fireball, 22k bouncing embers, 20k smoke, a 16k ground ring, a 0.42 s light, and
|
|
17
|
+
trauma of 0.5k.
|
|
18
|
+
|
|
19
|
+
## Loot that lands (SR)
|
|
20
|
+
|
|
21
|
+
Items eject with a 0.085 s stagger on a 0.62 s ballistic arc at g = 14 with spin, settle
|
|
22
|
+
over 0.24 s, then hover at 0.34 m with a 0.055 m bob. Hover, spin and glow are
|
|
23
|
+
presentation only; the pickup position is where the item landed.
|
|
24
|
+
|
|
25
|
+
## Third-person camera (SR)
|
|
26
|
+
|
|
27
|
+
- Boom distance and shoulder offset from the character's height, not constants.
|
|
28
|
+
- Rotate the boom instantly on mouse input; ease only its length and obstruction with
|
|
29
|
+
`1 - exp(-14 dt)`.
|
|
30
|
+
- Pull 0.15 to 0.22 m inside a collision hit; stay 0.4 m above terrain.
|
|
31
|
+
- Smooth stair steps with a separate offset clamped to 0.35 m either way, so the camera
|
|
32
|
+
does not hop with every riser.
|
|
33
|
+
|
|
34
|
+
## Idle sway
|
|
35
|
+
|
|
36
|
+
Golden-ratio frequencies (1, 0.618, 0.382) so its loop is never seen, about 0.8 degrees
|
|
37
|
+
peak to peak (DK).
|
|
38
|
+
|
|
39
|
+
## Hit reactions on bodies (MC)
|
|
40
|
+
|
|
41
|
+
An additive layer of 0.34 s, `exp(-5p) * sin(2.2 pi p)` from the lower back to the head, signed by the
|
|
42
|
+
side that was hit. Directional deaths: dot the fatal shot against facing, plus or minus
|
|
43
|
+
0.35, and pick front, back, head or collapse.
|
|
44
|
+
|
|
45
|
+
## Callouts (MC)
|
|
46
|
+
|
|
47
|
+
Queued medals fade in over 0.22 s, hold 1.35 s, fade out over 0.45 s, stagger 0.55 s, at
|
|
48
|
+
most three visible.
|
|
49
|
+
|
|
50
|
+
## Hits on the player (OC)
|
|
51
|
+
|
|
52
|
+
- Severity per attacker type: 0.3, 0.5, 0.9 and 1.0 for OC's four zombie types, scaling
|
|
53
|
+
every response below.
|
|
54
|
+
- Directional kick instead of random shake; 45 ms hitstop on heavy hits, 100 ms on the
|
|
55
|
+
downing blow.
|
|
56
|
+
- Edge arcs 19 to 38 px at 1080p facing the attacker, fading over 0.7 to 0.9 s.
|
|
57
|
+
- Claws in the outer 18% of the screen, one per side, stacking to three, tearing in over
|
|
58
|
+
90 ms and drying to brown over 1.5 to 2 s.
|
|
59
|
+
- Desaturation, vignette and heartbeat as health drops; the vignette stays in the outer
|
|
60
|
+
0.15 of the width at 35% opacity or less.
|
|
61
|
+
- Reduced motion caps hitstop at 40 ms and disables the kick.
|
|
62
|
+
- Pass test: a heavy hit changes at least 6% of the screen by 25 or more levels within
|
|
63
|
+
0.1 s.
|
|
64
|
+
|
|
65
|
+
## Confirmation (OC)
|
|
66
|
+
|
|
67
|
+
- Markers: 130 ms hit, 165 ms headshot, 240 ms kill, 500 ms headshot kill. Cyan X for a
|
|
68
|
+
hit, off-white X for a kill. Hidden in camera views with no crosshair.
|
|
69
|
+
- Score pops merge per enemy within 0.15 to 0.25 s, in three rows 30 px apart.
|
|
70
|
+
- Enemy flinch: torso about 8 to 9 degrees, pelvis back 4 to 6 cm, peak within one frame,
|
|
71
|
+
recovery about 150 ms; a stagger only above 35% of max health in one hit (50% on the
|
|
72
|
+
heaviest type), 0.35 to 0.45 s with a 1.2 s cooldown, so big enemies never stun-lock.
|
|
73
|
+
- Blood: 24 droplets at 2 to 5 m/s, 5 cm streaks living 0.25 to 0.5 s, mist #5a1212.
|
|
74
|
+
|
|
75
|
+
## Third-person camera (OC)
|
|
76
|
+
|
|
77
|
+
- Over the shoulder 2.6 m back and 1.15 m right; wide 4.8 m back and 2.0 m right; aiming
|
|
78
|
+
pulls to 2.2 m. Exactly three views, with the same aim key in all of them.
|
|
79
|
+
- Downed camera high: 3.0 m back, 3.1 m up, about 43 degrees down.
|
|
80
|
+
- Spring arm pulls in over 25 to 75 ms and holds the closest distance 0.3 s.
|
|
81
|
+
- Objects within 0.65 m of the lens dither-fade, reaching 30% at 0.3 m.
|
|
82
|
+
- Jitter metrics: camera position second difference, body screen pixels per frame (stop
|
|
83
|
+
6.6 to 2.5 px after the fix), arm pops over 10 and 25 cm.
|
|
84
|
+
|
|
85
|
+
## First person on a chest camera (LC)
|
|
86
|
+
|
|
87
|
+
LC is a body-camera survival shooter: the lens sits on the player's breastbone, not at
|
|
88
|
+
the eyes, so the gun and hands sit lower and closer than in an eye-camera shooter. These
|
|
89
|
+
are its numbers after the owner's notes on jitter, sensitivity and jumps.
|
|
90
|
+
|
|
91
|
+
- **Placement.** The lens 0.10 m under the chest plate and 7 cm under the shoulder joints:
|
|
92
|
+
1.30 m standing, 1.105 m crouch-walking, 0.895 m crouched, 9 cm proud of the plate. At
|
|
93
|
+
the throat (1.42 m) the holds needed wrists at 73 to 91 degrees; at the sternum, 34 to
|
|
94
|
+
55. The shoulders stand 0.22 m behind the lens, and reach is measured from there.
|
|
95
|
+
- **Looking down** bends the trunk at the hips and the lens rides it: height
|
|
96
|
+
1.30 - (0.38 sin L - 0.09 (1 - cos L)). The look stops at 1.2 rad (1.05 moving, 0.9
|
|
97
|
+
sprinting). The arms follow 0.07 of the look, so the pistol rises in the frame as the
|
|
98
|
+
look goes down.
|
|
99
|
+
- **Composition.** The pistol at rest fills 4.5 to 5% of the picture's width, 18 cm from
|
|
100
|
+
the lens, rear sight 70% of the way down, both gloves lit; arms enter from the lower
|
|
101
|
+
right, the firing hand 5 cm right of the lens. Hip fire converges on the picture's
|
|
102
|
+
middle at 8 m. Hold heights are set against the bottom edge computed from the live
|
|
103
|
+
aspect.
|
|
104
|
+
- **Weapon steadiness.** The rig takes all of the lens's turn, breath and stride; the
|
|
105
|
+
weapon's own stride is 3.5 x 4 mm (long arms 9 x 10) and its breath 0.5 mm. Designed
|
|
106
|
+
motion: a turn trail of 0.028 rad per rad/s, at most 7.5 degrees; a 5 degree cant into
|
|
107
|
+
a strafe; a 2 degree dip on stopping; a fifth of each on the sights.
|
|
108
|
+
- **Recoil.** kick = 0.5 x impulse / kg^0.72 x brace x (1 - steady); per round the view
|
|
109
|
+
takes back 0.9 + 0.9 kick, pitch 5 + 9 kick and a random roll of 3 + 8 drift, scaled
|
|
110
|
+
1 / (0.6 + 0.35 kg) and by (1 - 0.45) on the sights.
|
|
111
|
+
- **Blows taken.** A critically damped lurch stepped exactly: 4.14 degrees, settled by
|
|
112
|
+
frame 11.
|
|
113
|
+
- **Jumps.** A 75 ms knee gather (the lens dips 4 cm), 3.53 m/s up under 10.4 m/s^2, a
|
|
114
|
+
hang at the apex, a fall under 14.3 m/s^2: 59 cm high in 0.68 s (it had been 24 cm in
|
|
115
|
+
0.33 s: "jumps feel very not aaa and very short height and too fast too"). A press in
|
|
116
|
+
the last 0.1 s of a fall is buffered, there is no landing lockout, and stamina ends
|
|
117
|
+
jump chains.
|
|
118
|
+
- **Landing** sinks the lens by impact speed: 8 cm standing, about 11 sprinting. A body
|
|
119
|
+
push eases to 2.2 m/s; the old push threw the lens up to 1 m in one frame.
|
|
120
|
+
- **Movement.** Walk 3.1 m/s, sprint 6.3, winded 4.3, crouch 1.55; acceleration 15 and
|
|
121
|
+
deceleration 18 m/s^2.
|
|
122
|
+
- **Mouse.** 0.0022 rad a count; 2,856 counts a full turn at 1.00x, 9.1 cm at 800 cpi,
|
|
123
|
+
shown beside the slider with a live tester. The lens takes the look in the frame the
|
|
124
|
+
input arrives.
|
|
125
|
+
- **Aim assist** (keys and pads only, default 0.6): 34 m reach, a 0.085 rad window, slow
|
|
126
|
+
to 0.52, pull 0.42 rad/s, 2.6x for 0.22 s as the sights rise. It never turns a still
|
|
127
|
+
view or aims through a wall; a mouse that moved in the last 3 s owns the device.
|
|
128
|
+
- **Sights.** The field of view narrows 1.35x for long arms and 1.6x for pistols, and
|
|
129
|
+
the look slows by the same ratio. Eye relief per weapon is in `opengame-weapons`.
|
|
130
|
+
|
|
131
|
+
## Hit feedback in a rhythm game (OH)
|
|
132
|
+
|
|
133
|
+
- Every judged hit answers in its lane within a fifth of a second: a splat of 0.12 s,
|
|
134
|
+
ticks of 0.15 s, flecks of 0.16 s and a lane-coloured halo of 0.1 s (a white ring read
|
|
135
|
+
as generic).
|
|
136
|
+
- Hit sounds synthesised: band-pass noise at `2200 + 420 * lane` Hz for 35 ms plus a
|
|
137
|
+
short sweep; a miss is a 130 to 62 Hz "dead string".
|
|
138
|
+
- The full-screen hit (ink 70 ms, flat 70 ms, wipe 120 ms, from the struck catcher) fires
|
|
139
|
+
only through one tested gate: a run of 8, a milestone or the first second of the power
|
|
140
|
+
mode, about once a phrase, at least 8 beats and 6 s apart.
|
|
141
|
+
- No hitstop and no camera shake. World motion lands on bars and four-bar phrases: a push
|
|
142
|
+
of 2.5% (3% on a phrase line), in 0.25 s and out 1.35 s. More in `opengame-rhythm`.
|