|
| 1 | + |
1 | 2 | MODEL: GPT-5.4 |
2 | 3 | REASONING: high |
3 | 4 |
|
4 | | -COMMAND: |
5 | | -Create `BUILD_PR_LEVEL_10_20_FIX_BEZEL_PATH_AND_BACKGROUND_DRAW_ORDER`. |
6 | | - |
7 | | -Implement the confirmed Asteroids runtime fixes: |
8 | | - |
9 | | -1. Fix fullscreen bezel path duplication |
10 | | - - current bad URL example: |
11 | | - `http://127.0.0.1:5500/games/Asteroids/games/Asteroids/assets/images/bezel.png` |
12 | | - - normalize asset path resolution so bezel resolves once to: |
13 | | - `games/Asteroids/assets/images/bezel.png` |
14 | | - |
15 | | -2. Preserve canvas layout |
16 | | - - do NOT resize the canvas internal game dimensions |
17 | | - - do NOT stretch the game resolution |
18 | | - - keep canvas centered |
19 | | - - preserve intended game width and height |
20 | | - |
21 | | -3. Fix background rendering |
22 | | - - keep `backgroundImage` as a separate class/module from `fullscreenBezel` |
23 | | - - draw `backgroundImage` only during gameplay states |
24 | | - - draw it immediately after clear |
25 | | - - draw it before starfield and before all other world/gameplay content |
26 | | - - inspect Asteroids render order and fix any layer that currently hides the background |
27 | | - |
28 | | -4. Keep bezel as HTML overlay |
29 | | - - keep `fullscreenBezel` as a separate HTML/container-level overlay |
30 | | - - only show it in fullscreen |
31 | | - - ensure it is visibly on screen, not just present in the DOM |
32 | | - |
33 | | -5. Use this exact bezel transparency fit rule |
34 | | - - from left to right, find first transparent pixel |
35 | | - - from right to left, find first transparent pixel |
36 | | - - from top to bottom, find first transparent pixel |
37 | | - - from bottom to top, find first transparent pixel |
38 | | - - use those four values as the transparency window |
39 | | - - maintain canvas aspect ratio |
40 | | - - stretch the displayed canvas to fill the transparency window as much as possible |
41 | | - - keep the displayed canvas centered in that window |
42 | | - - do NOT change internal game resolution |
43 | | - - if top/bottom does not fill, use that result for resize |
44 | | - - if left/right does not fill, use that result for resize |
45 | | - - if no valid transparency window is found, fall back to existing centered-canvas behavior |
46 | | - |
47 | | -6. Add one shared extra-stretch setting |
48 | | - - create one single developer-facing variable that applies equally to all four sides |
49 | | - - use it to push the displayed canvas slightly farther toward the bezel opening edges when the default fit is just short |
50 | | - - place this in a small easy-to-find config/override file, not hidden in code constants |
51 | | - - when bezel is detected, check whether that file exists |
52 | | - - if it does not exist, create it automatically for the developer with a safe default value |
53 | | - - keep filename/location obvious near the relevant game asset/config area |
| 5 | +UPDATE EXISTING PR: |
54 | 6 |
|
55 | | -7. Validate |
56 | | - - bezel URL/path not duplicated |
57 | | - - bezel visible in fullscreen |
58 | | - - canvas internal size unchanged |
59 | | - - canvas centered |
60 | | - - exact four-direction transparency rule used |
61 | | - - displayed canvas fills transparency window as fully as possible while preserving aspect ratio |
62 | | - - shared extra-stretch variable affects all four sides equally |
63 | | - - override/config file is auto-created when missing and bezel is detected |
64 | | - - background visible during gameplay |
65 | | - - background absent in non-gameplay states |
66 | | - - starfield no longer hides background incorrectly |
| 7 | +Add startup behavior: |
67 | 8 |
|
68 | | -8. Final packaging step is REQUIRED |
69 | | - - package ALL changed files into this exact repo-structured ZIP: |
70 | | - `<project folder>/tmp/BUILD_PR_LEVEL_10_20_FIX_BEZEL_PATH_AND_BACKGROUND_DRAW_ORDER.zip` |
| 9 | +- On game load (before gameplay) |
| 10 | +- If bezel detected AND override file missing: |
| 11 | + create: |
| 12 | + games/<game>/assets/images/bezel.stretch.override.json |
71 | 13 |
|
72 | | -Hard rules: |
73 | | -- write implementation code only through Codex |
74 | | -- include changed implementation files in Codex ZIP |
75 | | -- no docs-only completion by Codex |
76 | | -- no missing ZIP |
77 | | -- no unrelated repo changes |
| 14 | +- Do NOT overwrite if it already exists |
| 15 | +- Ensure this runs once during init |
0 commit comments