|
| 1 | +# BUILD_PR_11_87_MANIFEST_BACKGROUND_ALWAYS_VISIBLE |
| 2 | + |
| 3 | +## Codex Task |
| 4 | +Implement the smallest safe change so manifest-declared backgrounds are always drawn and are not hidden by clear/fill behavior. |
| 5 | + |
| 6 | +## Required Changes |
| 7 | + |
| 8 | +### 1. Background rendering gate |
| 9 | +Find the background rendering helper/module, likely near: |
| 10 | + |
| 11 | +```text |
| 12 | +src/**/backgroundImage.js |
| 13 | +``` |
| 14 | + |
| 15 | +Change the logic so a valid manifest-declared background is not restricted to gameplay-only modes. |
| 16 | + |
| 17 | +Required behavior: |
| 18 | + |
| 19 | +```text |
| 20 | +if manifest has image.*.background and image loaded: |
| 21 | + draw background for menu/title/attract/gameplay/pause/etc. |
| 22 | +else: |
| 23 | + keep existing safe empty/no-background behavior |
| 24 | +``` |
| 25 | + |
| 26 | +Do not add fallback paths. |
| 27 | + |
| 28 | +### 2. Clear/fill behavior |
| 29 | +Find scene code that clears or paints full-screen dark fills before/after background draw, especially: |
| 30 | + |
| 31 | +```text |
| 32 | +games/Asteroids/**/AsteroidsGameScene.js |
| 33 | +games/Asteroids/**/AsteroidsAttractAdapter.js |
| 34 | +``` |
| 35 | + |
| 36 | +When a manifest background is present: |
| 37 | +- do not paint an opaque clear/fill that hides it |
| 38 | +- keep overlays translucent if needed for readability |
| 39 | +- preserve foreground UI/text/asteroids/title drawing |
| 40 | + |
| 41 | +### 3. Manifest-only rule |
| 42 | +Confirm bezel/background loading only comes from `game.manifest.json` entries like: |
| 43 | + |
| 44 | +```json |
| 45 | +"image.asteroids.background": { |
| 46 | + "path": "/games/Asteroids/assets/images/deluxe.png", |
| 47 | + "kind": "image", |
| 48 | + "source": "workspace-manager" |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +Remove or reject any newly discovered guessed paths like: |
| 53 | + |
| 54 | +```text |
| 55 | +/games/<Game>/assets/images/background.png |
| 56 | +/games/<Game>/assets/images/bezel.png |
| 57 | +``` |
| 58 | + |
| 59 | +### 4. No duplicated SSoT |
| 60 | +Do not add background display options under `asset-browser.assets.background`. |
| 61 | +Background image behavior belongs to `image.*.background` manifest entries and renderer behavior only. |
| 62 | + |
| 63 | +## Validation |
| 64 | +Run targeted validation only: |
| 65 | + |
| 66 | +```text |
| 67 | +Asteroids menu state: deluxe.png visible |
| 68 | +Asteroids attract state: deluxe.png visible, not hidden by full-screen dark rect |
| 69 | +Asteroids gameplay state: deluxe.png visible |
| 70 | +Asteroids pause state: deluxe.png visible if pause is available |
| 71 | +Browser console: no missing bezel/background 404s |
| 72 | +Search: no guessed background/bezel path fallback added |
| 73 | +``` |
| 74 | + |
| 75 | +Write evidence to: |
| 76 | + |
| 77 | +```text |
| 78 | +docs/dev/reports/PR_11_87_validation.md |
| 79 | +``` |
| 80 | + |
| 81 | +## Constraints |
| 82 | +- No full sample suite. |
| 83 | +- No broad render architecture refactor. |
| 84 | +- No hardcoded default assets. |
| 85 | +- No alias/pass-through helpers. |
| 86 | +- No unrelated file changes. |
0 commit comments