|
| 1 | +# PR 11.90 — Asteroids Engine Ownership and Font Manifest Repair |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Finish Asteroids alignment with the engine-owned render/chrome contract and add the Asteroids font to the asset-browser manifest assets. |
| 5 | + |
| 6 | +## Findings from uploaded Asteroids.zip |
| 7 | + |
| 8 | +The uploaded Asteroids game still contains game-level render/chrome overrides: |
| 9 | + |
| 10 | +1. `games/Asteroids/game/AsteroidsGameScene.js` still draws a full-screen rect at the start of `render()`. |
| 11 | + - This means Asteroids still controls the frame background/clear layer. |
| 12 | + - When a manifest background exists, the fill is translucent, but the game is still overriding engine-owned background layering. |
| 13 | + |
| 14 | +2. `games/Asteroids/game/AsteroidsAttractAdapter.js` still draws a full-screen attract overlay. |
| 15 | + - It is translucent when a manifest background exists, but it is still a full-frame game overlay that can visually suppress the engine background. |
| 16 | + - Keep only intentional text/sprite/menu visuals; do not use an opaque/near-opaque frame fill as a background substitute. |
| 17 | + |
| 18 | +3. `games/Asteroids/game/FullscreenBezelOverlay.js` still contains Asteroids-specific bezel resolution. |
| 19 | + - Bezel/background should be engine-owned and manifest-driven. |
| 20 | + - Remove/deprecate game-local fullscreen bezel loading/rendering when the engine chrome layer provides this behavior. |
| 21 | + |
| 22 | +4. `games/Asteroids/game.manifest.json` has the bezel path set to `/games/Asteroids/assets/images/bezel.png`. |
| 23 | + - The desired Asteroids bezel is `/games/Asteroids/assets/images/bezel1.png`. |
| 24 | + - Keep `stretchOverride.uniformEdgeStretchPx = 10` only on `image.asteroids.bezel`. |
| 25 | + |
| 26 | +5. `games/Asteroids/assets/fonts/vector_battle.ttf` exists, but no font asset entry is present in `asset-browser.assets`. |
| 27 | + |
| 28 | +## Required changes |
| 29 | + |
| 30 | +### Manifest assets |
| 31 | +Update `games/Asteroids/game.manifest.json`: |
| 32 | + |
| 33 | +- Ensure `asset-browser.assets.image.asteroids.bezel.path` is `/games/Asteroids/assets/images/bezel1.png`. |
| 34 | +- Ensure `asset-browser.assets.image.asteroids.background.path` is `/games/Asteroids/assets/images/deluxe.png`. |
| 35 | +- Ensure `asset-browser.assets.image.asteroids.bezel.stretchOverride.uniformEdgeStretchPx` is `10`. |
| 36 | +- Add a font asset entry: |
| 37 | + |
| 38 | +```json |
| 39 | +"font.asteroids.vector-battle": { |
| 40 | + "path": "/games/Asteroids/assets/fonts/vector_battle.ttf", |
| 41 | + "kind": "font", |
| 42 | + "source": "workspace-manager" |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +Do not place font data outside `asset-browser.assets`. |
| 47 | + |
| 48 | +### Engine ownership |
| 49 | +Asteroids must not own engine chrome/background/clear responsibilities. |
| 50 | + |
| 51 | +Codex must remove or neutralize these remaining overrides: |
| 52 | + |
| 53 | +- `AsteroidsGameScene.render()` full-screen background/clear fill. |
| 54 | +- `AsteroidsAttractAdapter.render()` full-screen dark frame fill when a manifest background exists. |
| 55 | +- Any Asteroids-local bezel/background loader/renderer that duplicates engine chrome responsibilities, especially `FullscreenBezelOverlay.js`, unless it is still directly required and only delegates to the engine manifest chrome layer. |
| 56 | + |
| 57 | +Gameplay rendering remains in Asteroids: |
| 58 | + |
| 59 | +- ships |
| 60 | +- asteroids |
| 61 | +- bullets |
| 62 | +- saucers |
| 63 | +- score/lives/menu/high-score text |
| 64 | +- intentional game-specific vector visuals |
| 65 | + |
| 66 | +### No fallback asset guessing |
| 67 | +Do not introduce fallback paths such as: |
| 68 | + |
| 69 | +- `/games/Asteroids/assets/images/bezel.png` |
| 70 | +- `/games/Asteroids/assets/images/background.png` |
| 71 | +- `/games/SolarSystem/assets/images/bezel.png` |
| 72 | +- `/games/SolarSystem/assets/images/background.png` |
| 73 | + |
| 74 | +Game chrome assets must resolve only through manifest asset ids. |
| 75 | + |
| 76 | +## Acceptance |
| 77 | + |
| 78 | +- `game.manifest.json` includes font, bezel, and background assets under `asset-browser.assets`. |
| 79 | +- `image.asteroids.bezel` uses `bezel1.png`. |
| 80 | +- `image.asteroids.background` uses `deluxe.png`. |
| 81 | +- `image.asteroids.bezel.stretchOverride.uniformEdgeStretchPx` is `10`. |
| 82 | +- There is no `asset-browser.assets.bezel` duplicate contract. |
| 83 | +- Asteroids no longer draws an engine-owned background/clear layer. |
| 84 | +- Asteroids no longer uses game-local bezel/background loading/rendering that bypasses the engine manifest layer. |
| 85 | +- No 404s for bezel/background/font assets. |
| 86 | +- Background is visible in menu, attract, pause, and gameplay. |
| 87 | +- Bezel is visible and stretched using the manifest SSoT value. |
| 88 | + |
| 89 | +## Testing |
| 90 | + |
| 91 | +Run targeted tests only. Do not run the full samples smoke test. |
| 92 | + |
| 93 | +1. Open `games/Asteroids/index.html`. |
| 94 | +2. Confirm menu/attract/gameplay/pause all keep the manifest background visible. |
| 95 | +3. Confirm the bezel renders from `image.asteroids.bezel`. |
| 96 | +4. Confirm no console 404s for chrome assets or font. |
| 97 | +5. Search repo for forbidden paths and stale references. |
0 commit comments