@opengamehq/skills 1.3.0 → 1.5.0
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/CHANGELOG.md +44 -0
- package/README.md +12 -4
- package/dist/.claude-plugin/marketplace.json +26 -0
- package/dist/skills/manifest.json +1409 -145
- package/dist/skills/opengame-accessibility/CHANGELOG.md +4 -0
- package/dist/skills/opengame-accessibility/SKILL.md +48 -32
- package/dist/skills/opengame-all-in-one/CHANGELOG.md +21 -0
- 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/CHANGELOG.md +12 -0
- package/dist/skills/opengame-api/SKILL.md +39 -13
- package/dist/skills/opengame-assets/CHANGELOG.md +11 -0
- package/dist/skills/opengame-assets/SKILL.md +79 -31
- package/dist/skills/opengame-assets/references/pipeline.md +67 -0
- package/dist/skills/opengame-audio/CHANGELOG.md +11 -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/CHANGELOG.md +10 -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/CHANGELOG.md +15 -0
- 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/CHANGELOG.md +20 -0
- package/dist/skills/opengame-cli/SKILL.md +12 -11
- package/dist/skills/opengame-deploy/CHANGELOG.md +30 -0
- package/dist/skills/opengame-deploy/SKILL.md +43 -23
- package/dist/skills/opengame-deploy/references/json-events.md +6 -5
- package/dist/skills/opengame-deploy/references/manifest.md +9 -3
- package/dist/skills/opengame-deploy/references/packaging.md +32 -30
- package/dist/skills/opengame-depth/CHANGELOG.md +8 -0
- package/dist/skills/opengame-depth/SKILL.md +61 -33
- package/dist/skills/opengame-enemies/CHANGELOG.md +10 -0
- 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/CHANGELOG.md +4 -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/CHANGELOG.md +11 -0
- 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/CHANGELOG.md +12 -0
- package/dist/skills/opengame-jam/SKILL.md +48 -33
- package/dist/skills/opengame-lighting/CHANGELOG.md +9 -0
- package/dist/skills/opengame-lighting/SKILL.md +85 -34
- package/dist/skills/opengame-loading/CHANGELOG.md +4 -0
- 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/CHANGELOG.md +9 -0
- 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/CHANGELOG.md +9 -0
- 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/CHANGELOG.md +4 -0
- package/dist/skills/opengame-mobile/SKILL.md +18 -18
- package/dist/skills/opengame-montage-make/CHANGELOG.md +5 -0
- 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/CHANGELOG.md +5 -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/CHANGELOG.md +5 -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/CHANGELOG.md +15 -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/CHANGELOG.md +8 -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/CHANGELOG.md +13 -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/CHANGELOG.md +10 -0
- 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/CHANGELOG.md +5 -0
- 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/CHANGELOG.md +12 -0
- package/dist/skills/opengame-router/SKILL.md +14 -7
- package/dist/skills/opengame-scene-audit/CHANGELOG.md +15 -0
- 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/CHANGELOG.md +16 -0
- package/dist/skills/opengame-sdk/SKILL.md +27 -10
- package/dist/skills/opengame-sdk/references/engines.md +2 -2
- package/dist/skills/opengame-sdk/references/identity.md +10 -11
- package/dist/skills/opengame-sdk/references/leaderboards.md +11 -1
- package/dist/skills/opengame-sdk/references/radio.md +1 -1
- package/dist/skills/opengame-stability/CHANGELOG.md +4 -0
- package/dist/skills/opengame-stability/SKILL.md +59 -27
- package/dist/skills/opengame-trailer-make/CHANGELOG.md +5 -0
- 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/CHANGELOG.md +5 -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/CHANGELOG.md +5 -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/CHANGELOG.md +11 -0
- package/dist/skills/opengame-verification/SKILL.md +113 -48
- package/dist/skills/opengame-weapons/CHANGELOG.md +11 -0
- 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/CHANGELOG.md +9 -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,88 @@
|
|
|
1
|
+
# Killcams that replay what happened
|
|
2
|
+
|
|
3
|
+
How OS built "Killcams replay recorded truth" and "The final killcam keeps its pace" in
|
|
4
|
+
`SKILL.md`. OS is a snipers-only shooter where every rival is a bot presented as a
|
|
5
|
+
person, so its killcams were watched for anything a person would not do. Its killcam took
|
|
6
|
+
about 11 days and seven rebuilds; most of that time went to the faults below. Partway
|
|
7
|
+
through, the owner turned ordinary killcams off by default and kept the logic, so the
|
|
8
|
+
later work was the recording and the final killcam.
|
|
9
|
+
|
|
10
|
+
## Record what was rendered, as state
|
|
11
|
+
|
|
12
|
+
A killcam is a recording, not a re-simulation. Re-simulating from inputs, or resampling
|
|
13
|
+
at a fixed rate with the live loadout, lost flips and swapped rifles ("it even change dthe
|
|
14
|
+
fucking gun that i had? and no hitmarkers").
|
|
15
|
+
|
|
16
|
+
Per rendered frame of each player who could appear in a replay, keep:
|
|
17
|
+
|
|
18
|
+
- the time on the game clock and the wall clock;
|
|
19
|
+
- the camera's position, rotation and field of view, taken from the frame as drawn, not
|
|
20
|
+
from the live weapon's settings;
|
|
21
|
+
- the view model's pose, the aim progress and the scope state (in, out, which optic);
|
|
22
|
+
- the weapon, finish and attachments in hand, as identities with an explicit unset value,
|
|
23
|
+
because 0 is a valid finish and "unset" must not read as the first one;
|
|
24
|
+
- for everyone in view, their root transform and animation state, so the renderer draws
|
|
25
|
+
each frame's recorded pose instead of interpolating (slow-motion rivals had stood or
|
|
26
|
+
jumped on 26 of 86 frames, then 0 of 56).
|
|
27
|
+
|
|
28
|
+
Beside it keep an event ring: shots, hits with zone and damage, hit markers, kills,
|
|
29
|
+
footsteps and every one-shot sound with its pitch.
|
|
30
|
+
|
|
31
|
+
## Size the ring by time
|
|
32
|
+
|
|
33
|
+
A frame count is not a duration at a variable refresh rate. OS's ring holds 2,048 frames,
|
|
34
|
+
which at up to 120 frames a second covers 17 s on any display. Reach back to the start of
|
|
35
|
+
the action, not a fixed lead: a fixed 4.0 s lead opened hardscopes already scoped ("final
|
|
36
|
+
killcams dont show the full ads / scope in and out etc anymore"), so the replay starts at
|
|
37
|
+
the last hip frame before the scope-in, up to 8 s back.
|
|
38
|
+
|
|
39
|
+
## Play it back
|
|
40
|
+
|
|
41
|
+
- Draw each recorded frame's transforms exactly. Never smooth or resample recorded motion:
|
|
42
|
+
a smoothing pass is how a flip disappears.
|
|
43
|
+
- Sound is a tape of the live one-shots at their recorded times and pitches, not a new
|
|
44
|
+
mix of what the replay thinks happened.
|
|
45
|
+
- Hit markers come from the recorded hit events.
|
|
46
|
+
- Ordinary killcams play at 1x. "normal killcams shoudl be normal killcams not slow mo or
|
|
47
|
+
follow the bullet shit just normal cod style killcams..." reversed a bullet cam that
|
|
48
|
+
judges and research had wanted; still judges went on polishing it after the ban.
|
|
49
|
+
- A recording that fixes what the simulation got wrong is not a replay. Fix the
|
|
50
|
+
simulation: stand bots down after the final kill, make a respawn one same-frame
|
|
51
|
+
transaction, and keep the dying figure alive in memory (that removed a 3.97 MB upload
|
|
52
|
+
per death).
|
|
53
|
+
|
|
54
|
+
## The final killcam's beat sheet
|
|
55
|
+
|
|
56
|
+
Data keyed to the time of the deciding shot, paced on wall time:
|
|
57
|
+
|
|
58
|
+
| Beat | OS |
|
|
59
|
+
|---|---|
|
|
60
|
+
| Victory card over the held game | 2.3 s |
|
|
61
|
+
| Cut to the killer's eyes | from the recorded camera |
|
|
62
|
+
| Normal speed | the last seconds before the shot |
|
|
63
|
+
| Ease down | to 0.25x between 0.95 s and 0.22 s before the shot |
|
|
64
|
+
| Ease back | to 1x by 1.1 s after the shot |
|
|
65
|
+
| Hold | about a second at 1x |
|
|
66
|
+
| Scoreboard, then the winner scene | no button press needed |
|
|
67
|
+
|
|
68
|
+
Shown only when the local player wins. Before, the replay had been "complete immediately
|
|
69
|
+
on the first post-shot frame". After, no black frame in 848.
|
|
70
|
+
|
|
71
|
+
## Keep the victim in view
|
|
72
|
+
|
|
73
|
+
Ray-test the replay camera's line to the victim on every frame of the slow part. "a tree
|
|
74
|
+
trunk fills the scope and the victim never appears" was a replay that played perfectly
|
|
75
|
+
and showed nothing.
|
|
76
|
+
|
|
77
|
+
## One exit
|
|
78
|
+
|
|
79
|
+
Every way out (the end, a skip key, the menu) goes through one transaction
|
|
80
|
+
that picks the life, writes the spawn and clears the replay view on the same frame. Skip
|
|
81
|
+
broke five times in four days while each exit had its own code; a grey death card shown
|
|
82
|
+
after a skip was the last of them.
|
|
83
|
+
|
|
84
|
+
## Judge it against the reference clip
|
|
85
|
+
|
|
86
|
+
Critics who had not seen the reference clip scored the final killcam 8.4 to 9.4 while the
|
|
87
|
+
owner called it 1 of 10. Give judges the reference film and the owner's words, and judge
|
|
88
|
+
motion on film at speed (`SKILL.md`, "Motion is judged on film").
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
> Carried from `opengame-jam` 1.0.9. Read it when: Enter a game in an OpenGame jam. Finds the open jams, their tracks and rules, checks the game against them, deploys one exact release, and hands the person the deploy's page, where they enter it with their own answers and certify. Use when the person says enter the jam, submit to the jam, which track should I pick, am I eligible, what are the jam rules, or mentions the OpenGame Global AI Game Jam.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# Enter an OpenGame jam
|
|
5
|
+
|
|
6
|
+
OpenGame opens on 18 November 2026. The jam kicks off on 18 November, and entries close on
|
|
7
|
+
18 December, 11:59 pm PT. After the close, a game entered in the jam keeps the version that was live
|
|
8
|
+
then, and a new build cannot replace it, in the jam or in the gallery.
|
|
9
|
+
|
|
10
|
+
Any signed-in account can enter the launch jam now, before 18 November as well as
|
|
11
|
+
after it. A CLI with no login hears "OpenGame opens for creators on 18 November." until
|
|
12
|
+
then: run `opengame login` first.
|
|
13
|
+
|
|
14
|
+
While the jam runs, until it closes on 18 December, 11:59 pm PT, a new original game goes on
|
|
15
|
+
OpenGame only as a jam entry, up to 2 per account, unless the
|
|
16
|
+
account is an OpenGame admin or an approved publisher. A mod or a decomp is never an entry:
|
|
17
|
+
it goes on OpenGame under Just for fun at any time. After the close anyone can publish to
|
|
18
|
+
the gallery, outside the jam. A jam entry is one exact release, reviewed automatically, then
|
|
19
|
+
judged by people. Deploy the game first: read `opengame-deploy` if the game has no
|
|
20
|
+
`releaseId` yet.
|
|
21
|
+
|
|
22
|
+
No jam is built into the CLI. Tracks, fields, rules and the certification text come
|
|
23
|
+
from the server, so the next jam needs no new CLI. Read them fresh each time; do
|
|
24
|
+
not answer from memory or from this file.
|
|
25
|
+
|
|
26
|
+
## Find the jam and its rules
|
|
27
|
+
|
|
28
|
+
1. `opengame jams --json` lists the jams with their slug, state, tracks and a rules link.
|
|
29
|
+
2. Read the rules page. Tell the person, in a sentence each, the rules their game might
|
|
30
|
+
break. Eligibility is theirs to decide.
|
|
31
|
+
|
|
32
|
+
## Check the game against the rules before submitting
|
|
33
|
+
|
|
34
|
+
The first jam's published rules, as an example of what to check (the server's copy is
|
|
35
|
+
the authority):
|
|
36
|
+
|
|
37
|
+
- **Made during the jam.** Started after kickoff. Earlier libraries and boilerplate
|
|
38
|
+
are fine; an earlier prototype of this game is not.
|
|
39
|
+
- **Exports a web build.** Any engine works if its web build (HTML5, WebGL, WebGPU
|
|
40
|
+
or WebAssembly) runs from static files. `opengame check` names the engine it detects
|
|
41
|
+
and reports the problems it can find before a deploy.
|
|
42
|
+
- **Runs in a desktop browser** with nothing to install, no account, no sign-in and no
|
|
43
|
+
email address, and responds to the window being resized.
|
|
44
|
+
- **May call out, within the platform rules.** At runtime the game may call AI models,
|
|
45
|
+
third-party APIs and its own servers, besides `https://api.opengame.gg` for
|
|
46
|
+
scores. It must still draw its first frame offline, because review runs without the
|
|
47
|
+
internet. Keys stay on the creator's server, never in the bundle.
|
|
48
|
+
- **Free to play, with no crypto, ads or tracking.** No payments, tips or donations, no
|
|
49
|
+
wallets or tokens, no ads or ad pixels, no session recording. `opengame-deploy` has
|
|
50
|
+
the full rules.
|
|
51
|
+
- **Inside the bundle limits:** 4096 MiB zipped,
|
|
52
|
+
5120 MiB unzipped, 25,000 files.
|
|
53
|
+
- **The person owns the art, audio, models, fonts and code**, or holds a licence to
|
|
54
|
+
ship them.
|
|
55
|
+
- **A game or a world, not a decomp or a mod.** Read `kind` in `opengame.json`. A decomp
|
|
56
|
+
or a mod is made from someone else's game, so it cannot meet the rules above, and the
|
|
57
|
+
server refuses it as an entry (`kind_not_in_jam`). It still goes on OpenGame, under Just
|
|
58
|
+
for fun, at any time. If the kind is wrong, fix it in `opengame.json` and
|
|
59
|
+
deploy again; do not change it only to get past this rule.
|
|
60
|
+
- **Individual creators, 18 or over, no teams**, up to
|
|
61
|
+
2 entries each.
|
|
62
|
+
|
|
63
|
+
If something looks like it breaks a rule, tell the person what and where, and let them
|
|
64
|
+
decide. Do not hide a dependency, rewrite history or relabel a library to pass a rule.
|
|
65
|
+
|
|
66
|
+
## Pick a track with the person
|
|
67
|
+
|
|
68
|
+
The person answers these on the deploy's page. Help them prepare the answers; do not
|
|
69
|
+
answer for them.
|
|
70
|
+
|
|
71
|
+
- **Genre track:** one per entry, required. The page starts on the track that matches the
|
|
72
|
+
game's genre; the person keeps it or chooses another.
|
|
73
|
+
- **Models used:** ask the person which models they used; do not guess from the code.
|
|
74
|
+
- **Sponsor tracks:** earned, not picked. A sponsor's track opens only once a model from
|
|
75
|
+
that sponsor is listed under models used, and asks for the email of the account the
|
|
76
|
+
person used there.
|
|
77
|
+
|
|
78
|
+
`opengame jams <slug> --json` lists the whole form.
|
|
79
|
+
|
|
80
|
+
## Deploy, then the person enters it
|
|
81
|
+
|
|
82
|
+
Follow `opengame-deploy` for installation, sign-in and the deploy. Use the exact release
|
|
83
|
+
the creator played. Once the deploy is ready, review starts by itself; nobody runs a
|
|
84
|
+
command for it. When `opengame status --json` shows `data.review.state` as
|
|
85
|
+
`awaiting_details`, give the person `data.review.url`, the deploy's page. Signed in there in
|
|
86
|
+
their browser, they press Confirm details, choose the track, the models and any sponsor
|
|
87
|
+
tracks, and certify.
|
|
88
|
+
|
|
89
|
+
Do not run `opengame submit` to enter the jam or to publish. The CLI cannot confirm a
|
|
90
|
+
release its deploy already sent to review. It answers with that submission and a
|
|
91
|
+
`jam_answers_unused` notice, and the answers go nowhere.
|
|
92
|
+
|
|
93
|
+
## What only the person can do
|
|
94
|
+
|
|
95
|
+
**Certification is the person's legal statement**, made in their browser under a
|
|
96
|
+
versioned set of terms. When the result asks for it, give the person the link and tell
|
|
97
|
+
them what it is for. Do not open it for them, click through it, or tell them it is
|
|
98
|
+
done. A later revision of the same entry under the same terms skips it.
|
|
99
|
+
|
|
100
|
+
The person also decides whether they are eligible (age, one account), whether they own
|
|
101
|
+
the assets, which track they want, and what their sponsor evidence claims.
|
|
102
|
+
|
|
103
|
+
## After submitting
|
|
104
|
+
|
|
105
|
+
`opengame status . --watch --json` follows review until it finishes or the watch
|
|
106
|
+
ends. The result's `review` has the state, `done`, and `next`, the command to run. No
|
|
107
|
+
person reviews a game. Review either lets it through or returns it with the reason, and
|
|
108
|
+
people judge the jam. A returned entry's findings come as `finding` events, the same as a
|
|
109
|
+
deploy's. Fix them and deploy again; the new release goes to review by itself. While the jam
|
|
110
|
+
takes entries, a redeploy of a game whose entry is live is entered again with the same
|
|
111
|
+
answers, so it keeps its place.
|
|
112
|
+
|
|
113
|
+
The jam's judging criteria are published on its rules page. Fun and craft carry the
|
|
114
|
+
most weight; the craft skills (`opengame-quality-bar` first) are how to raise them.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
> Carried from `opengame-lighting` 1.1.0. Read it when: Light a three.js browser game so it reads as a place. Covers characters that are not silhouettes, wide lenses, the light limit, a shadow key that does not crawl, exposure from a meter, auto-exposure and measured darkness, a fixed pool of real lights, a carried torch, the player's hands, real indirect light and lit effects. Use when the person says the lighting is flat, characters look black, shadows flicker, it is too dark or too bright, the flashlight or hands look wrong, or add lamps.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# Lighting
|
|
5
|
+
|
|
6
|
+
Most flat-looking games have one problem: everything is lit by an ambient term, so
|
|
7
|
+
nothing is darker than anything else. The fix is a costed rig: one real shadow-casting
|
|
8
|
+
key, a weak fill, real indirect light, and a fixed number of point lights however many
|
|
9
|
+
lamps the level has. Dark games add a second problem: the exposure. In a game lit by a
|
|
10
|
+
torch and a muzzle flash, how the sensor meters is the look, and it is set by numbers
|
|
11
|
+
measured from the reference, not by eye on a bright monitor.
|
|
12
|
+
|
|
13
|
+
Rules carry five tags; `opengame-quality-bar` explains them and the game codes.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
### No character is a silhouette
|
|
18
|
+
- **Invariant:** Every character, creature and held item shows form and colour against every background it appears on, and none reads as a black silhouette.
|
|
19
|
+
- **Technique:** Light characters on purpose: an ambient or hemisphere term that reaches skinned materials, a rim from the side away from the key, and a fill so hands and faces keep detail in backlight. Confirm the character shader receives each term, because a fill that reads an empty input has no effect. Give the view model its own environment. In three.js add a `HemisphereLight`, a Fresnel rim through `onBeforeCompile` on the character's `MeshStandardMaterial`, and a PMREM environment on the view-model scene.
|
|
20
|
+
- **Reference configuration:** OC's first review found "black silhouettes with glowing balls stuck on them". The renderer gave skinned meshes no rim, fill or ambient, and the ambient term it did have read zero without a sky probe; fixing it took shader edits in 3 streams. The view model's studio environment gave 41% of the gun's brightness. OC keeps zombie flesh lighter than the floor (its albedo L was 17 against a target of 50 or more) and the boss at 2:1 contrast or better against its background (pit fog had cut it to 1.12:1). LC tints near-camera zombie hands to 0.6 of the face with roughness at least 0.86, because a hand 0.4 m from a lamp gets about 7 times what a face at 1.1 m does.
|
|
21
|
+
- **Applies when:** Every 3D game with characters, dark scenes above all.
|
|
22
|
+
- **Verify:** Capture each character type in the darkest spot and the most backlit spot of each level, then sample face, hands and torso against the floor behind them.
|
|
23
|
+
|
|
24
|
+
### Light figures about the line to the eye under a wide lens
|
|
25
|
+
- **Invariant:** Under a wide lens every figure shows a lit side and a shade side wherever it stands in the frame, so a figure at the edge reads as shaped as one at the centre.
|
|
26
|
+
- **Technique:** Build each figure's light direction per fragment from the line between the figure and the eye (`cross(up, toEye)`), not from one camera-space direction, which lights every surface off axis from the front. In a banded style use two flat values with one drawn edge, and keep halftone to the core shadow. When shading will not show, colour the shader's own decision (lit, shade, edge) in a debug view before changing any value.
|
|
27
|
+
- **Reference configuration:** OH: with the light in camera space, every crowd surface 40 degrees off axis under a 104 degree lens came out lit. Five passes changed values and failed; the light about the line to the eye fixed it in one, found by colouring the branch the shader took. It matters above roughly 70 degrees of field of view.
|
|
28
|
+
- **Applies when:** Wide lenses, stylised or banded lighting, and crowds spread across the frame.
|
|
29
|
+
- **Verify:** A debug snapshot coloured by branch, and 1:1 crops of figures at the centre and the edges of the frame.
|
|
30
|
+
|
|
31
|
+
### Count the light sources against the light limit on day one
|
|
32
|
+
- **Invariant:** Before anyone tunes the look, the team has counted the things that look like they emit light and measured the light limit the renderer applies, adaptive quality included.
|
|
33
|
+
- **Technique:** List every fire, lamp, screen and glow the concept implies and compare that count with the limit the renderer uses at runtime. Where sources outnumber lights, plan for it: bake static fire into lightmaps or probes, show the nearest sources through the pool below, and let emissive plus bloom carry the rest. Pin quality in captures so adaptive quality cannot drop lights unseen. In three.js `WebGLRenderer` shades every light for every lit fragment and recompiles when the light count changes; in `WebGPURenderer` the light set is part of every lit shader's key, so adding a light or toggling its `visible` or `castShadow` rebuilds every lit material in view. Create every light at boot at intensity zero.
|
|
34
|
+
- **Reference configuration:** OC's arena had 218 to 224 fire sites against a 32-light cap, and adaptive quality dropped captures to "8 of 224". The cap surfaced only after about 6 rejections on day one; 224 clustered lights measured about 0.2 ms, so raising the cap was cheap. LC fixes its set at boot: a hemisphere, a near fill, lightning, the weapon light (the one shadow caster in play), two alternating muzzle-flash points and three lamp points.
|
|
35
|
+
- **Applies when:** Any level lit by many practicals: fires, torches, neon, screens.
|
|
36
|
+
- **Verify:** Log the active light count each frame with quality pinned and unpinned. It matches the plan, and a walk past every fire shows no source going dark.
|
|
37
|
+
|
|
38
|
+
### One shadow-casting key that does not crawl
|
|
39
|
+
- **Invariant:** One directional light casts the world's shadows, it clears the terrain that frames the play space, its shadow box covers the play area around the player only, and shadow edges do not shimmer as the player walks.
|
|
40
|
+
- **Technique:** Follow the player with the shadow camera and snap its centre to the shadow map's texel grid. Check which unit the engine's bias is counted in (texels or world units) before setting it, then tune depth bias and normal bias against acne and peter-panning on moving casters. Fade the shadow to nothing over the outer edge of the box rather than cutting it. Lower a sun only along its existing bearing, and dump the direction the shader receives.
|
|
41
|
+
- **Reference configuration:** DK: a 34 m box biased forward of the player, texel-snapped, bias about -0.0003 to -0.00035, normal bias 0.05 to 0.10, ramped out over the outer 14% of the box, on a 2048 map. SR uses a 120 m box for its island. OS: a bias of 0.02 set as metres came out at 0.4 mm against 8.8 mm texels and drew the owner's "hard-edged rectangle" on the near cascade, fixed at depth 1.0 and normal 0.5 texels, found by turning caster groups off one at a time; cascades 6, 18, 54 and 150 m. OS suns sat 2 to 10 degrees under their ridges, and a "12deg" title sun "actually lit from 51deg".
|
|
42
|
+
- **Applies when:** Outdoor and large-interior 3D scenes with a sun or moon. A small interior lit only by practicals may use a local shadow instead.
|
|
43
|
+
- **Verify:** Record a slow walk along a wall edge: the shadow's stair-step outline stays still. Shrink the box on purpose and check the edge fades instead of cliff-cutting.
|
|
44
|
+
|
|
45
|
+
### Shadow is darker than light
|
|
46
|
+
- **Invariant:** Shadowed surfaces are clearly darker than lit ones of the same material, and the difference is warm against cool.
|
|
47
|
+
- **Technique:** Lower the fill before raising the key. Measure a lit surface and its shadowed neighbour in a linear capture, not by eye on a bright monitor.
|
|
48
|
+
- **Reference configuration:** Shadowed at 15 to 40% of lit across our earlier games; the ST look pass targets 15 to 20%. MC: sun 3.5 at about 17 degrees elevation, hemisphere 0.18, ambient 0.34, environment 0.30. DK contrasts a cold moon (0xa8c0f0, 2.6) with warm sodium practicals (0xffb765, 5 cd, 22 m, decay 2). OS sets fill at 0.2 to 0.3 of the sun. LC pushes warm lights toward rose (1, 0.74, 0.8), because "amber on pale cloth is yellow".
|
|
49
|
+
- **Applies when:** Lit 3D looks. Stylised looks state their band count and ratio in the look page instead.
|
|
50
|
+
- **Verify:** Sample the luminance of matched lit and shadowed pixels in a capture with the grade off and report the ratio.
|
|
51
|
+
|
|
52
|
+
### Expose each map from a meter, and gate its frames on numbers
|
|
53
|
+
- **Invariant:** Each map's exposure comes from a meter, its frames meet written targets for highlights, crushed shadow and visible sky, and its own light preset is what reaches the shader, with nothing leaking from a title, menu or parent game.
|
|
54
|
+
- **Technique:** Expose so a mid-grey card in full sun reads one fixed scene value, and treat any per-map exposure setting as an offset from it. Set fill as a fraction of the sun and the sky as a multiple of a sunlit white wall, choosing the ratios by A/B in one page load. Set the gates (median luma, a bright percentile, the share of crushed pixels) before capturing, and capture from fixed cameras beside the concept. Indoors, widen eye adaptation only under a detected roof. Read each map's effective light values from the renderer after a trip through the menus, and check the pre-match and countdown views in every weather, not only play.
|
|
55
|
+
- **Reference configuration:** OS: a horizontal 18% card in sun reads 0.21 scene (sRGB about 135); sky 1.25 to 1.6 times a sunlit white wall, where a 4 times horizon clipped and its probes filled every shadow ("flat overcast white sky"); fill 0.2 to 0.3 of the sun. Gates: p50 95 to 130, p95 205 or more, crushed (all channels under 20) 3% or less, against first captures at p95 100 to 160 and crushed 14 to 34% ("Highlights are missing, not shadows"). One map's card read 0.0735 against 0.195, so its exposure rose 2.65 times: the only art change judges preferred across 20 rounds. Eye adaptation capped at plus 0.3 EV outdoors and plus 2.2 EV under a roof; the pre-match screen gets plus 0.35 EV and a toe lift ("Moody, not black").
|
|
56
|
+
- **Applies when:** Lit 3D games with several maps or screens, forks of another game, or roofed spaces in an outdoor game. A dark game whose exposure adapts also follows the next two rules.
|
|
57
|
+
- **Verify:** Luma statistics on fixed cameras beside the concept for every map, screen and weather. A light-strength sweep that changes no pixel means the light's falloff ends before the surface, not that the intensity is right.
|
|
58
|
+
|
|
59
|
+
### Auto-exposure leans on what is lit and never strobes
|
|
60
|
+
- **Invariant:** In a game whose exposure adapts, a lit subject never burns white, unlit space falls to black, a darker scene stays darker instead of being undone by the sensor, and firing never strobes the frame.
|
|
61
|
+
- **Technique:** Meter on the GPU and never read the result back: build the HDR target's mip chain once, read a small level into a one-pixel target, and weight the mean toward the brightest parts (clamped) blended with the plain average. Close fast and open slowly. Cap how far the sensor may open by the light that falls on the subject: raycast the main light's centre, compute its illuminance there, and never open past where a mid-grey card at that point sits at the key, opening less when an enemy is in the cone. Cap the dip after a muzzle flash against the level before the burst, and recover a black frame to visible at once. Take every reading with the game's population present, and never let warm-up frames feed the meter.
|
|
62
|
+
- **Reference configuration:** LC: key 0.36 to 0.42 of white (0.3 at the darkest night), range minus 9 to plus 0.7 stops ("more than that and the night reads as dusk"), close in 0.04 s, open in 0.21 s, at most 4 stops down a frame, weighted 3:1 brightest to mean with anything over 4 whites counted as 4, a black frame visible within 0.04 s, otherwise at most 3 stops a second. Ceiling card = log2(key·π/(0.18·E)) with plus one stop on the world and none with an enemy in the cone: a 3% wreck went to minus 2.8 stops, and a figure at 10 m reads "a man in a tunic". A flash dip capped at 1.25 stops cured an unreported white and black strobe at 10 rounds a second. A zombie in the unlit beam moved the meter 0.8 of a stop, so every night still taken without one read 0.8 stop bright. Warm-up frames fed the meter and blacked the title. The meter equalising albedo once whited out a near board while three hours went into restyling materials (`opengame-look`).
|
|
63
|
+
- **Applies when:** Night, interior, horror or flashlight games with HDR and adaptive exposure.
|
|
64
|
+
- **Verify:** Figure-against-background luminance per frame with figures at several distances in the beam (LC used 2.8, 5, 10 and 15 m), consecutive frames during full-auto fire, and a lamp-off empty field.
|
|
65
|
+
|
|
66
|
+
### Darkness is a measured target, reached with light rather than exposure
|
|
67
|
+
- **Invariant:** The darkness of every key state is written as numbers from the reference and the owner's word, reached by changing the scene's light rather than the sensor, and checked with the game's population present.
|
|
68
|
+
- **Technique:** Measure box luminance in reference stills of the same state, and write a target per state (lamp off, lamp on, flash, lightning) in the look page. To match, raise the night's own light and cut sensor gain by the same number of stops, and give the dark a hue from the reference. Take readings at a fixed weather time. When the owner's word and the reference differ, follow the owner and write down where. After darkening, recheck indoors with the carried light on: a darker night can make a space unplayable, which is answered with the carried light, not by lifting the dark.
|
|
69
|
+
- **Reference configuration:** LC's film: forest 0.009 to 0.020 of white, sky 57 to 80 of 255, pool tops 111 to 124; night light up and sensor gain down by 4.2 to 4.8 stops. Then the owner: "when u have ur flashlight off its a bit too bright/still tooe asy to see around needs to be much horro more scary where muzzle flash is really how u can see clearly ... make it scarier...". Targets became 6 to 9 of 255 in the middle of the frame with the lamp off, and 90 to 110 at the centre at 3 m with it on, under 12 outside the cone; the first zone went from 49.8 to 10.1 lamp off. That made indoors unplayable and led to the torch rebuild in the next rules. Night levels moved with the weather minute (11.7 against 15.6 of 255 at one stand).
|
|
70
|
+
- **Applies when:** Every dark or horror game, and every game matched to a reference.
|
|
71
|
+
- **Verify:** Four stills per change at fixed stands (lamp off, lamp on, flash, lightning) with enemies present, box means compared with the targets.
|
|
72
|
+
|
|
73
|
+
### A fixed pool of real lights, given to what counts at the camera
|
|
74
|
+
- **Invariant:** The number of real point and spot lights never changes during play, so no shader recompiles mid-game, each slot goes to the lamps that matter most at the camera, and a lit light never jumps or flickers by being swapped.
|
|
75
|
+
- **Technique:** Create the pool once and leave it in the scene. Each frame, rank the authored sources by what they put on the view (distance, intensity, fog transmission), swap a source in only when it clearly outranks the weakest shown one, and hand a slot over on the frame its intensity is exactly zero. Never toggle `visible` on a light; set intensity to zero. Draw glows beyond the pool as unlit colour above white. [helpers/light-pool.js](helpers/light-pool.js) does this, and its `selfTest()` plants a shrinking pool, a ranked pool and a pool without fades to prove its checks.
|
|
76
|
+
- **Reference configuration:** DK shows about 68 authored lamps through 4, 6 or 8 real lights by quality tier, with 1.7 times hysteresis and 0.25 s fades; DK defines a lit-light teleport as a pooled light moving more than 0.25 m in a frame with non-zero intensity, excluding sources that really moved. LC runs three pooled points with a quarter hysteresis: before it ranked by what counts at the lens, a 1,600 cd yard lamp 87.5 m away took the light of a post 27 m away, and a 225 cd strobe "takes one of the engine's three lamps from across the map". Up to 8 nearer lamps glow in the air without being lights.
|
|
77
|
+
- **Applies when:** More authored lights than the budget allows real ones, which is almost every level with lamps.
|
|
78
|
+
- **Verify:** The renderer's program count (`renderer.info.programs.length` in `WebGLRenderer`) is unchanged after walking the whole level past every lamp, the helper's `measurePool` reports zero count changes and zero lit teleports, and a per-frame log shows which lamp holds each slot.
|
|
79
|
+
|
|
80
|
+
### Lights on the camera are deliberate
|
|
81
|
+
- **Invariant:** The only camera-held lights that reach the world are designed ones (a carried torch or weapon light, a muzzle flash) costed and measured as part of the rig; view-model fills and the light that makes hands and weapons read never reach the world pass, and the view model never casts into it.
|
|
82
|
+
- **Technique:** Put view-model lights on the view model's own layer and pass, or make them a term in the view model's material that adds no engine light. A camera-parented light that lights the world by accident moves at player speed and defeats shadows, pools and every measurement of the rig; a carried torch is costed, shadowed and measured like any other key (next rule).
|
|
83
|
+
- **Reference configuration:** DK's weapon rig carries a fill parented to the camera on its own layer, a key 1.34 and a cool rim 0.44 for the weapon only, excluded from pool measurements as a source that really moves. OC moved its fills near the hands away and lower and halved them instead of dimming the scene; its third-person muzzle light is about 0.12 of the first-person one, 30 cm ahead of the gun. LC's whole night is lit by a carried torch, which the old wording of this rule forbade; the lamp on the operator's own hands is a material "return" term that adds no engine light, and the hands cast no shadow.
|
|
84
|
+
- **Applies when:** First-person games and any game with a view model.
|
|
85
|
+
- **Verify:** List lights at runtime with their parent chain and layers: the only camera-held lights on the world layer are the declared carried light and muzzle flashes.
|
|
86
|
+
|
|
87
|
+
### A carried light throws from its real bore
|
|
88
|
+
- **Invariant:** A torch or weapon light leaves from where it is mounted, lights distant targets the way a real torch does, with a hot spot and soft spill rather than a disc, and is never shadowed by the player's own body or weapon.
|
|
89
|
+
- **Technique:** Share one beam-profile function between the light's cookie, any marched beam in the air and the atmosphere. Give it real intensity on axis, a tight hot spot, a corona and a little spill, a long near field so it falls off with distance the way a real torch does, and a retro term so a surface lit from where it is seen is not darkened by the cosine. Turn shadow casting off on every view-model mesh before warm-up, so nothing near the lens can shadow the beam, and then bring the shadow's near plane close: a far near plane paints slabs on near faces. Ease the output right at the lens.
|
|
90
|
+
- **Reference configuration:** LC's first light: 1800 cd (7000 blacked out everything outside the pool), hot spot 6.5 degrees, corona 15 degrees, 3% spill to 37 degrees, leaving the muzzle 17 cm under the lens and crossing the centre at 7 m. Rebuilt for the darker night: 12,000 cd on axis, end 30 m, near field 22.4 m, hot spot 0.13 rad, corona 0.2 rad, spill 1/20, retro term (1 + 0.4(1 - c²)/c); a grey card on axis at 3, 5, 10, 15 and 25 m read 109/76/43/36/38 before and 108/104/93/80/42 after. Shadow near plane 0.12 m (0.45 painted slabs), normal bias 3 cm, redrawn every frame at Ultra and every second or third frame below.
|
|
91
|
+
- **Applies when:** Flashlight, headlamp and weapon-light games.
|
|
92
|
+
- **Verify:** A grey card on axis at five distances, and a capture with figures at three distances showing a round pool with heads lit.
|
|
93
|
+
|
|
94
|
+
### Light the player's hands from the lens, on their draws only
|
|
95
|
+
- **Invariant:** In a dark first-person game the player's gloves, sleeves and weapon read (each finger, the seams, the top of the weapon), stay darker than the brightest lit world surface, and never pump with exposure.
|
|
96
|
+
- **Technique:** Add a fill after exposure on the view model's draws only (emissive plus albedo times fill), peaking at the hands and falling toward elbow and muzzle, lower with the carried light off, with no rim term and cloth albedo at or below the glove's. Hold carried things inside a luminance band pinned to a reference the owner accepted, and test the fill in the real build rather than patched in at capture time.
|
|
97
|
+
- **Reference configuration:** LC: fill 0.35 to 0.7 in output units where the key is 0.36 (1.3 drew white), a third of that with the light off, cloth albedo 0.08 to 0.18: "The limit is the light on the hands, not the maps." Carried things sit about 25/255 at rest, 30 at most on the sights, never above the snow, with the darkest twentieth at 4 to 11. Raising the gloves' fill for one reload drew a glove "paper-white"; pinned at 0.2 of the accepted pistol's fill, the glove reads 44 to 51 where the pistol reads 55 to 57. A fill tested by patching at capture time drew the hands white in the real build.
|
|
98
|
+
- **Applies when:** Dark first-person games, and any game whose view model is lit apart from the world.
|
|
99
|
+
- **Verify:** Stills at rest, aiming and reloading, light on and off: count the fingers, and the gloves are never the brightest thing in the frame.
|
|
100
|
+
|
|
101
|
+
### Part the light terms on a near-camera object before editing its maps
|
|
102
|
+
- **Invariant:** Before any map of a near-camera object (a held weapon, hands, gloves) is edited, the team knows which light term carries its brightness.
|
|
103
|
+
- **Technique:** Hold each light term at its uniform in turn (lens fill off, carried light off, environment off, then a pure red map) and read the object's masked luminance each time. Never re-grade a shared map to answer one weapon's light. With a light at the camera, put form into the colour: pale tops, dark channels.
|
|
104
|
+
- **Reference configuration:** LC's held weapon: 39.6/255 as it was, 6.7 with the lens fill off, 36.3 with the torch's return off, 4.3 with all three off; the fill carried 32 of 39 levels and the torch 4. Every "pale magazine, cream brass, salmon stock" was the light, and a metalness pass on twenty guns changed nothing. A lamp at the camera shades no relief, so glove pad tops were rubbed pale and channels darkened in the albedo.
|
|
105
|
+
- **Applies when:** First-person games, and anything lit by a light on or near the camera.
|
|
106
|
+
- **Verify:** A parting table for one object per class, and a grey-percentile count beside the accepted reference.
|
|
107
|
+
|
|
108
|
+
### Real indirect light
|
|
109
|
+
- **Invariant:** Light bounces: a sunlit floor warms the wall beside it and a dark hallway is darker than an open courtyard, from an actual bounce or occlusion solution rather than a brighter ambient.
|
|
110
|
+
- **Technique:** Bake it. Per-vertex or lightmapped irradiance for static geometry, plus a grid of spherical-harmonic probes sampled by moving actors. three's `LightProbeGrid` (examples, WebGL only) bakes probe grids on the GPU; lightmaps can be baked offline. The cheap version bakes sky visibility per vertex at load. Decode packed values per vertex, never after interpolation. Hemisphere fill, environment maps and ambient occlusion alone are not global illumination, and calling them that is a false claim.
|
|
111
|
+
- **Reference configuration:** SR bakes single-bounce irradiance into a per-vertex atlas for static geometry and nine-coefficient SH probes for actors, validated against a signature of the world so a stale bake refuses to load. OS bakes sky visibility at load (7 rays per vertex, in a spare vertex channel) plus bounce through doorways: 40 to 125 ms once and nothing per frame, and it answered "interiors lit like the yard" on 15 of 17 maps; decoding after interpolation banded every wall. OS desaturates occluded indirect light, not albedo.
|
|
112
|
+
- **Applies when:** Any game that wants depth from light, most of all interiors and mixed indoor and outdoor spaces. A flat style chosen in the look page may skip it.
|
|
113
|
+
- **Verify:** Isolate the indirect term in a debug view: it varies across the level and is darker in enclosed spaces. Keep the bake source and confirm the shipped data matches the shipped geometry.
|
|
114
|
+
|
|
115
|
+
### Emissive is not a light
|
|
116
|
+
- **Invariant:** Anything that looks like it lights its surroundings does light them, through a real light in the pool or a baked contribution, and its light reaches the surfaces it should.
|
|
117
|
+
- **Technique:** Pair each practical (lamp, screen, fire, sign) with a pooled source or a baked contribution. Flicker a practical on three detuned sines and drive its emissive from the same value so the bulb and the light agree. Size each lamp's range from its hang height, because a light whose range ends before the floor looks the same at any intensity.
|
|
118
|
+
- **Reference configuration:** DK's practicals (hanging lamps, wall lamps, fluorescents, emergency domes, fires) are driven per frame with their emissive following the light. OS: 64 lamps looked identical from intensity 3 to 52,000 because "The engine's light fades to exactly zero at its radius"; a range of 1.8 times the hang height keeps about 82% at the floor. LC's lamps are inverse-square at 400 cd, a pool about 8 m across.
|
|
119
|
+
- **Applies when:** Any scene with visible light sources.
|
|
120
|
+
- **Verify:** Turn a practical's light off in a debug build: the surfaces near it change, not just the bulb.
|
|
121
|
+
|
|
122
|
+
### Environment for reflections
|
|
123
|
+
- **Invariant:** Reflective materials reflect something real: the sky, or a probe of the place.
|
|
124
|
+
- **Technique:** A PMREM of the sky in `scene.environment`, or a captured cube of the level, regenerated after a lost WebGL context. Where areas differ, give each its own environment, and set reflection strength per material class (`envMapIntensity` in three.js).
|
|
125
|
+
- **Reference configuration:** DK bakes its procedural sky into a 256 PMREM; SR captures a 128 cube. OC's titan chain links at metallic 0.7 mirrored the night sky and went black, and iron without a metal flag read as grey cloth. LC's open mud was "a black mirror of a dark sky" over three quarters of it.
|
|
126
|
+
- **Applies when:** PBR looks with any metal or gloss.
|
|
127
|
+
- **Verify:** Capture a metal surface while turning: its highlight and reflection move with the view and match the sky.
|
|
128
|
+
|
|
129
|
+
### Effects take the scene's light
|
|
130
|
+
- **Invariant:** Particles, smoke, blood, rain and other effects are lit by the place they are in, unless they emit light themselves.
|
|
131
|
+
- **Technique:** Turn effect lighting on explicitly, since many particle systems ship unlit, or feed the scene's ambient and nearest light colour into the effect shader. In three.js `SpriteMaterial` and `PointsMaterial` ignore lights: draw lit effects as instanced quads with `MeshLambertMaterial` or `MeshStandardMaterial`, or pass a light colour uniform sampled from a `LightProbe` or the light pool.
|
|
132
|
+
- **Reference configuration:** OC's particles were unlit by default, so its blood read "salmon pink" in 3 reports and was never fixed. LC lights each rain streak's ends by the torch's profile, the flashes, the lamps, the lightning and one shadow-map texel, for 0.15 ms of GPU.
|
|
133
|
+
- **Applies when:** Any lit 3D look with particles. Emissive effects (sparks, muzzle flash, magic) stay unlit on purpose.
|
|
134
|
+
- **Verify:** Fire the same effect in a fire-lit spot and in shadow: its brightness and tint follow the location.
|
|
135
|
+
|
|
136
|
+
### One owner for exposure, one rig per screen
|
|
137
|
+
- **Invariant:** One person or agent owns exposure and light intensity, every change is made against the merged build, and each screen (arena, menu, results) has its own rig.
|
|
138
|
+
- **Technique:** Keep light rigs in a table per screen in the look page. Make brightness changes relative to the current merged values, not on top of another stream's unmerged boost, and attach a capture to each change. A change that lowers, darkens or brightens anything gets a check from the player's view before it ships, since each one tends to cause the next note.
|
|
139
|
+
- **Reference configuration:** OC's arena boosts leaked onto menu figures and gave them a foil look. Two streams' brightening would have stacked to 2.55 times. A 300,000 rifle light caused the defect agents were chasing, and light powers were "a guess". Lightning is clamped and runs at 25% in cinematics. LC's darker night made indoors unplayable, and its brighter gloves turned one "paper-white"; OS's maps without presets inherited another screen's light.
|
|
140
|
+
- **Applies when:** Any game where several people or agents touch the look.
|
|
141
|
+
- **Verify:** Diff light values between merged main and each pending change; each screen's capture matches its rig table.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fixed pool of real lights standing in for any number of authored ones.
|
|
3
|
+
*
|
|
4
|
+
* Three.js compiles the light count into every lit shader. Add a point light, remove
|
|
5
|
+
* one, or toggle `visible`, and every material recompiles on the next frame: a stall in
|
|
6
|
+
* the middle of play. So the game creates `size` real lights once, never changes how
|
|
7
|
+
* many exist, and lets this pool decide each frame which authored sources they show.
|
|
8
|
+
*
|
|
9
|
+
* import { createLightPool, selfTest } from "./light-pool.js";
|
|
10
|
+
* const pool = createLightPool({ size: 6 });
|
|
11
|
+
* const real = Array.from({ length: pool.size }, () => { const l = new THREE.PointLight(0xffffff, 0); scene.add(l); return l; });
|
|
12
|
+
* // each frame, with sources = [{ id, x, y, z, intensity, range, color }]
|
|
13
|
+
* pool.update(dt, sources, camera.position).forEach((slot, i) => {
|
|
14
|
+
* real[i].position.set(slot.x, slot.y, slot.z);
|
|
15
|
+
* real[i].intensity = slot.intensity; // 0 when empty: never toggle visible
|
|
16
|
+
* real[i].distance = slot.range;
|
|
17
|
+
* if (slot.color !== undefined) real[i].color.set(slot.color);
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* Two behaviours make a pool watchable rather than a flicker machine:
|
|
21
|
+
* - hysteresis: a waiting source replaces a shown one only when it scores clearly
|
|
22
|
+
* higher, so two lamps of similar strength do not trade places every frame;
|
|
23
|
+
* - handover at zero: a replaced slot fades out, moves on the frame its intensity is
|
|
24
|
+
* exactly zero, then fades in at the new source. A lit light never teleports.
|
|
25
|
+
*
|
|
26
|
+
* Defaults are Der Koloss's reference configuration (about 68 authored lamps shown
|
|
27
|
+
* through a handful of real lights). Run `selfTest()` after editing; it plants a pool
|
|
28
|
+
* without each behaviour and fails unless the planted defect is measured.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export const POOL_DEFAULTS = Object.freeze({ size: 6, hysteresis: 1.7, fadeSeconds: 0.25 });
|
|
32
|
+
|
|
33
|
+
/** How much one source matters at the viewer: intensity over distance, windowed to its range. */
|
|
34
|
+
export function contribution(source, viewer) {
|
|
35
|
+
const dx = source.x - viewer.x, dy = source.y - viewer.y, dz = source.z - viewer.z;
|
|
36
|
+
const d2 = dx * dx + dy * dy + dz * dz;
|
|
37
|
+
const range = source.range > 0 ? source.range : Infinity;
|
|
38
|
+
const ratio = range === Infinity ? 0 : d2 / (range * range);
|
|
39
|
+
const window = Math.max(0, 1 - ratio * ratio) ** 2;
|
|
40
|
+
return (source.intensity * window) / Math.max(d2, 1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function createLightPool(options = {}) {
|
|
44
|
+
const { size, hysteresis, fadeSeconds } = { ...POOL_DEFAULTS, ...options };
|
|
45
|
+
if (!Number.isInteger(size) || size < 1) throw new Error("size must be a positive integer");
|
|
46
|
+
const slots = Array.from({ length: size }, () => ({ id: null, next: null, fade: 0, x: 0, y: 0, z: 0, range: 0, color: undefined, base: 0 }));
|
|
47
|
+
const out = Array.from({ length: size }, () => ({ sourceId: null, x: 0, y: 0, z: 0, intensity: 0, range: 0, color: undefined }));
|
|
48
|
+
const rate = fadeSeconds > 0 ? 1 / fadeSeconds : Infinity;
|
|
49
|
+
|
|
50
|
+
function place(slot, source) {
|
|
51
|
+
slot.x = source.x; slot.y = source.y; slot.z = source.z;
|
|
52
|
+
slot.range = source.range ?? 0; slot.color = source.color; slot.base = source.intensity;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
size,
|
|
57
|
+
/** Advances fades and assignments. Returns `size` slots every call, empty ones at intensity 0. */
|
|
58
|
+
update(dt, sources, viewer) {
|
|
59
|
+
const byId = new Map();
|
|
60
|
+
const scored = [];
|
|
61
|
+
for (const source of sources) {
|
|
62
|
+
if (source.enabled === false || !(source.intensity > 0)) continue;
|
|
63
|
+
byId.set(source.id, source);
|
|
64
|
+
scored.push({ source, score: contribution(source, viewer) });
|
|
65
|
+
}
|
|
66
|
+
scored.sort((a, b) => b.score - a.score);
|
|
67
|
+
const shown = new Set(slots.map((slot) => slot.next ?? slot.id).filter((id) => id !== null));
|
|
68
|
+
const scoreOf = new Map(scored.map((entry) => [entry.source.id, entry.score]));
|
|
69
|
+
|
|
70
|
+
// Fill empty slots, then let clearly stronger waiting sources displace the weakest.
|
|
71
|
+
for (const { source, score } of scored) {
|
|
72
|
+
if (shown.has(source.id) || score <= 0) continue;
|
|
73
|
+
const empty = slots.find((slot) => slot.id === null && slot.next === null);
|
|
74
|
+
if (empty) { empty.next = source.id; shown.add(source.id); continue; }
|
|
75
|
+
let weakest = null, weakestScore = Infinity;
|
|
76
|
+
for (const slot of slots) {
|
|
77
|
+
if (slot.next !== null) continue; // already handing over
|
|
78
|
+
const s = scoreOf.get(slot.id) ?? 0;
|
|
79
|
+
if (s < weakestScore) { weakest = slot; weakestScore = s; }
|
|
80
|
+
}
|
|
81
|
+
if (weakest && score > weakestScore * hysteresis) { weakest.next = source.id; shown.add(source.id); }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
slots.forEach((slot, i) => {
|
|
85
|
+
const current = slot.id !== null ? byId.get(slot.id) : undefined;
|
|
86
|
+
// A source that vanished or fell to nothing fades out where it stands.
|
|
87
|
+
const leaving = slot.next !== null || (slot.id !== null && !current);
|
|
88
|
+
if (leaving) {
|
|
89
|
+
slot.fade = Math.max(0, slot.fade - dt * rate);
|
|
90
|
+
if (slot.fade === 0) {
|
|
91
|
+
// The handover frame: intensity is exactly zero, so moving now cannot be seen.
|
|
92
|
+
const incoming = slot.next !== null ? byId.get(slot.next) : undefined;
|
|
93
|
+
slot.id = incoming ? incoming.id : null;
|
|
94
|
+
slot.next = null;
|
|
95
|
+
if (incoming) place(slot, incoming); else slot.base = 0;
|
|
96
|
+
}
|
|
97
|
+
} else if (current) {
|
|
98
|
+
place(slot, current); // a source that genuinely moves is followed
|
|
99
|
+
slot.fade = Math.min(1, slot.fade + dt * rate);
|
|
100
|
+
}
|
|
101
|
+
const o = out[i];
|
|
102
|
+
o.sourceId = slot.id; o.x = slot.x; o.y = slot.y; o.z = slot.z; o.range = slot.range; o.color = slot.color;
|
|
103
|
+
o.intensity = slot.id === null ? 0 : slot.base * slot.fade;
|
|
104
|
+
});
|
|
105
|
+
return out;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Drives `makePool` along a walk past a row of lamps, then parks the viewer inside a
|
|
112
|
+
* ring of near-equal lamps whose strengths wobble, and measures what a player would see:
|
|
113
|
+
* - countChanges: frames where the number of real lights changed (a shader recompile);
|
|
114
|
+
* - litTeleports: a lit real light jumping more than 0.25 m to a different source;
|
|
115
|
+
* - pops: a real light's intensity changing by more than half its source in one frame;
|
|
116
|
+
* - reassignments: how often a real light changed which source it shows.
|
|
117
|
+
*/
|
|
118
|
+
export function measurePool(makePool, { frames = 600, dt = 1 / 60 } = {}) {
|
|
119
|
+
const lamps = Array.from({ length: 24 }, (_, i) => ({ id: `lamp${i}`, x: i * 4, y: 3, z: (i % 2) * 6 - 3, intensity: 40, range: 12 }));
|
|
120
|
+
const ring = Array.from({ length: 8 }, (_, k) => ({ id: `ring${k}`, x: -30 + 5 * Math.cos(k * Math.PI / 4), y: 3, z: 5 * Math.sin(k * Math.PI / 4), intensity: 40, range: 30 }));
|
|
121
|
+
const pool = makePool();
|
|
122
|
+
let previous = null, countChanges = 0, litTeleports = 0, pops = 0, reassignments = 0;
|
|
123
|
+
for (let f = 0; f < frames; f++) {
|
|
124
|
+
const walking = f < frames / 2;
|
|
125
|
+
const viewer = walking ? { x: (f / (frames / 2)) * 92, y: 1.7, z: 0 } : { x: -30, y: 1.7, z: 0 };
|
|
126
|
+
ring.forEach((lamp, k) => { lamp.intensity = 40 * (1 + 0.1 * Math.sin(f * 0.9 + k * 1.7)); });
|
|
127
|
+
const slots = pool.update(dt, walking ? lamps : ring, viewer).map((slot) => ({ ...slot }));
|
|
128
|
+
if (previous) {
|
|
129
|
+
if (slots.length !== previous.length) countChanges++;
|
|
130
|
+
slots.forEach((slot, i) => {
|
|
131
|
+
const before = previous[i];
|
|
132
|
+
if (!before) return;
|
|
133
|
+
if (slot.sourceId !== before.sourceId && slot.sourceId !== null) reassignments++;
|
|
134
|
+
const moved = Math.hypot(slot.x - before.x, slot.y - before.y, slot.z - before.z);
|
|
135
|
+
if (moved > 0.25 && slot.intensity > 0 && slot.sourceId !== before.sourceId) litTeleports++;
|
|
136
|
+
if (Math.abs(slot.intensity - before.intensity) > 20) pops++;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
previous = slots;
|
|
140
|
+
}
|
|
141
|
+
return { countChanges, litTeleports, pops, reassignments };
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** A pool that returns only the lights it is using: the shader-recompile defect. */
|
|
145
|
+
function plantedShrinkingPool() {
|
|
146
|
+
const inner = createLightPool();
|
|
147
|
+
return { size: inner.size, update: (dt, sources, viewer) => inner.update(dt, sources, viewer).filter((slot) => slot.intensity > 0) };
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** The obvious pool: slot i shows the i-th strongest source, at full strength. */
|
|
151
|
+
function plantedRankedPool() {
|
|
152
|
+
const size = POOL_DEFAULTS.size;
|
|
153
|
+
return {
|
|
154
|
+
size,
|
|
155
|
+
update(dt, sources, viewer) {
|
|
156
|
+
const ranked = sources.map((source) => ({ source, score: contribution(source, viewer) })).sort((a, b) => b.score - a.score);
|
|
157
|
+
return Array.from({ length: size }, (_, i) => {
|
|
158
|
+
const s = ranked[i]?.source;
|
|
159
|
+
return s ? { sourceId: s.id, x: s.x, y: s.y, z: s.z, intensity: s.intensity, range: s.range, color: s.color } : { sourceId: null, x: 0, y: 0, z: 0, intensity: 0, range: 0 };
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Plants each defect and requires the measurement to catch it, then measures the real
|
|
167
|
+
* pool. Returns `{ ok, examined, failures }`.
|
|
168
|
+
*/
|
|
169
|
+
export function selfTest() {
|
|
170
|
+
const failures = [];
|
|
171
|
+
const real = measurePool(() => createLightPool());
|
|
172
|
+
const shrinking = measurePool(plantedShrinkingPool);
|
|
173
|
+
const ranked = measurePool(plantedRankedPool);
|
|
174
|
+
const instant = measurePool(() => createLightPool({ fadeSeconds: 0 }));
|
|
175
|
+
const twitchy = measurePool(() => createLightPool({ hysteresis: 1 }));
|
|
176
|
+
if (!(shrinking.countChanges > 0)) failures.push("planted shrinking pool was not caught by the count check");
|
|
177
|
+
if (!(ranked.litTeleports > 0)) failures.push("planted ranked pool was not caught by the teleport check");
|
|
178
|
+
if (!(instant.pops > 0)) failures.push("planted pool without fades was not caught by the pop check");
|
|
179
|
+
if (!(twitchy.reassignments > real.reassignments * 2)) failures.push(`planted pool without hysteresis reassigned ${twitchy.reassignments} times against ${real.reassignments}; the flicker check is not discriminating`);
|
|
180
|
+
if (real.countChanges) failures.push(`light count changed ${real.countChanges} times; shaders would recompile`);
|
|
181
|
+
if (real.litTeleports) failures.push(`${real.litTeleports} lit lights jumped to another source`);
|
|
182
|
+
if (real.pops) failures.push(`${real.pops} lights popped by more than half their strength in one frame`);
|
|
183
|
+
if (!(real.reassignments > 0)) failures.push("the walk never reassigned a light, so the handover was not exercised");
|
|
184
|
+
return { ok: failures.length === 0, examined: 5, failures, measured: { real, shrinking, ranked, instant, twitchy } };
|
|
185
|
+
}
|