Skip to content

Commit 5c493c5

Browse files
author
DavidQ
committed
Verify centered canvas, fullscreen bezel, override creation, and gameplay background
BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND
1 parent 73f77e8 commit 5c493c5

6 files changed

Lines changed: 146 additions & 30 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,52 @@
1-
21
MODEL: GPT-5.4
32
REASONING: high
43

5-
UPDATE EXISTING PR:
4+
COMMAND:
5+
Create `BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND`.
6+
7+
Verify the completed Asteroids fullscreen bezel and gameplay-background implementation end to end.
8+
9+
Validation targets:
10+
11+
1. Centered canvas
12+
- internal resolution unchanged
13+
- canvas remains centered
14+
- no distortion in fullscreen
15+
- no viewport-stretch behavior
16+
17+
2. Bezel
18+
- no duplicated path resolution
19+
- HTML-layer rendering
20+
- visible only in fullscreen
21+
- visible on screen
22+
- transparency-window fit rule is active
23+
- shared stretch override is honored
24+
25+
3. Override file
26+
- if bezel exists and
27+
`games/<game>/assets/images/bezel.stretch.override.json`
28+
is missing,
29+
auto-create it during startup/init before gameplay
30+
- do not overwrite existing file
31+
32+
4. Background
33+
- separate from bezel
34+
- gameplay only
35+
- after clear
36+
- before starfield/world
37+
- visible during gameplay
38+
- absent during non-gameplay states
639

7-
Add startup behavior:
40+
5. If validation finds real defects
41+
- make only the smallest required surgical fixes
42+
- do not expand scope
843

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
44+
6. Final packaging step is REQUIRED
45+
- package ALL changed files into this exact repo-structured ZIP:
46+
`<project folder>/tmp/BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND.zip`
1347

14-
- Do NOT overwrite if it already exists
15-
- Ensure this runs once during init
48+
Hard rules:
49+
- verification-focused PR
50+
- keep fixes minimal
51+
- no unrelated repo changes
52+
- no missing ZIP

docs/dev/COMMIT_COMMENT.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Add pre-game bezel stretch override file auto-create
1+
Verify centered canvas, fullscreen bezel, override creation, and gameplay background
2+
BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND
1+
BUILD_PR_LEVEL_10_22_TEMPLATE_BEZEL_BACKGROUND_CONVENTION_FOUNDATION
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
- Reissued as strict docs-only BUILD_PR bundle
2-
- Canvas internal size remains unchanged and centered
3-
- backgroundImage remains gameplay-only and draws before starfield/world
4-
- Bezel fit still uses the exact four-direction first-transparent-pixel rule
5-
- Added one shared extra-stretch developer setting for all four sides
6-
- Added auto-create behavior for the bezel-fit override/config file when missing
1+
- Added verification PR for completed Asteroids bezel/background work
2+
- Focused on centered canvas, fullscreen bezel visibility, override-file creation, and gameplay-only background
3+
- Allows only minimal surgical fixes if validation finds real defects
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
- Bundle is docs-only
2-
- Codex command requires implementation by Codex, not ChatGPT
3-
- Bezel URL/path must resolve once
4-
- Canvas internal size must remain unchanged
5-
- Canvas must remain centered
6-
- Transparency window must use the exact four-direction first-transparent-pixel rule
7-
- Canvas display box must fill the transparency window as fully as possible while preserving aspect ratio
8-
- One shared extra-stretch variable must affect all four sides equally
9-
- Bezel-fit override/config file must be auto-created when missing and bezel is detected
10-
- Background must draw only during gameplay
11-
- Background must draw before starfield/world content
12-
- Codex output ZIP path must be:
13-
<project folder>/tmp/BUILD_PR_LEVEL_10_20_FIX_BEZEL_PATH_AND_BACKGROUND_DRAW_ORDER.zip
1+
- Canvas internal size unchanged
2+
- Canvas remains centered
3+
- Bezel path not duplicated
4+
- Bezel visible only in fullscreen
5+
- Bezel visible on screen
6+
- Stretch override honored
7+
- Missing override file auto-created before gameplay
8+
- Existing override file preserved
9+
- Background draws only during gameplay
10+
- Background draws after clear and before starfield/world
11+
- Output ZIP path:
12+
<project folder>/tmp/BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND.zip
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND
2+
3+
## Purpose
4+
Verify the completed Asteroids fullscreen bezel and gameplay-background work as an integrated runtime result.
5+
6+
## Verification scope
7+
8+
### A. Centered canvas behavior
9+
Verify:
10+
- canvas internal game resolution remains unchanged
11+
- canvas remains centered
12+
- no viewport-stretch behavior was introduced
13+
- fullscreen does not distort gameplay resolution
14+
15+
### B. Bezel behavior
16+
Verify:
17+
- bezel asset path resolves correctly with no duplicated game path
18+
- bezel renders at the HTML layer
19+
- bezel appears only in fullscreen
20+
- bezel is visibly on screen
21+
- bezel-fit logic uses the established transparency-window rule
22+
- shared stretch override is honored
23+
24+
### C. Bezel override file behavior
25+
Verify:
26+
- when bezel is present and
27+
`games/<game>/assets/images/bezel.stretch.override.json`
28+
is missing,
29+
it is auto-created during startup/init before gameplay
30+
- existing override file is not overwritten
31+
32+
### D. Background behavior
33+
Verify:
34+
- `backgroundImage` is separate from `fullscreenBezel`
35+
- background renders only during gameplay
36+
- background renders after clear and before starfield/world content
37+
- background is visible and not hidden by later scene layers
38+
- non-gameplay states do not render background
39+
40+
## Required validation evidence
41+
Codex should validate with focused checks and summarize exact results for:
42+
- startup/init
43+
- fullscreen entry
44+
- fullscreen exit
45+
- gameplay state
46+
- non-gameplay state
47+
- missing override file case
48+
- existing override file case
49+
50+
## Packaging requirement
51+
Codex must package all changed files and validation outputs into:
52+
`<project folder>/tmp/BUILD_PR_LEVEL_10_21_VERIFY_CENTERED_CANVAS_BEZEL_AND_GAMEPLAY_BACKGROUND.zip`
53+
54+
## Scope guard
55+
- Verification PR
56+
- small surgical fixes only if validation finds real defects
57+
- no unrelated repo changes
58+
59+
## Validation Evidence (2026-04-14)
60+
61+
### Files and checks
62+
- `node --check src/engine/runtime/fullscreenBezel.js` -> PASS
63+
- `node --check src/engine/runtime/backgroundImage.js` -> PASS
64+
- `node --check tests/core/BackgroundImageAndFullscreenBezel.test.mjs` -> PASS
65+
- `node --check games/Asteroids/game/AsteroidsGameScene.js` -> PASS
66+
67+
### Focused runtime tests
68+
- `BackgroundImageAndFullscreenBezel` -> PASS
69+
- covers no duplicated bezel path
70+
- covers HTML-layer bezel attach/visibility and fullscreen gating
71+
- covers transparency-window fit rule
72+
- covers shared stretch override behavior
73+
- covers override auto-create when missing
74+
- covers non-overwrite behavior for existing override file
75+
- covers gameplay-only background gating and render order
76+
- `EngineFullscreen` -> PASS
77+
- `AsteroidsPresentation` -> PASS (run with repo alias hook used by `scripts/run-node-tests.mjs`)
78+
- `FullscreenBezelOverlay` -> PASS (run with repo alias hook used by `scripts/run-node-tests.mjs`)
79+
80+
### Result
81+
- No real defects found in this verification slice.
82+
- No additional runtime code changes required for this PR.

0 commit comments

Comments
 (0)