Skip to content

Commit 60d8140

Browse files
author
DavidQ
committed
BUILD_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT
Aligned games/_template with the canonical engine/theme shell baseline. - updated template index shell - added only minimal shared bootstrap/theme dependencies as needed - kept template non-playable and game-neutral
1 parent a104b0b commit 60d8140

6 files changed

Lines changed: 135 additions & 56 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
MODEL: GPT-5.3-codex
1+
MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Execute BUILD_PR_GAMES_TEMPLATE_INDEX_CANVAS_FIX exactly.
5+
Execute BUILD_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT exactly as written.
66

7-
- Modify ONLY games/_template/index.html
8-
- Draw text on canvas
9-
- No DOM text
10-
- No other files
7+
Rules:
8+
- Source of truth is `games/Asteroids/index.html`
9+
- Modify `games/_template/index.html`
10+
- Add ONLY minimal direct shell/bootstrap/theme dependencies already proven by the canonical game shell
11+
- Keep `_template` non-playable and game-neutral
12+
- Do NOT copy Asteroids gameplay, assets, entities, levels, or flow
13+
- Do NOT modify `games/Asteroids`
14+
- Fail fast on ambiguity or gameplay dependency bleed
1115

12-
Package to:
13-
<project folder>/tmp/BUILD_PR_GAMES_TEMPLATE_INDEX_CANVAS_FIX_delta.zip
16+
Package output to:
17+
<project folder>/tmp/BUILD_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
BUILD_PR_GAMES_TEMPLATE_INDEX_CANVAS_FIX
1+
BUILD_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT
22

3-
Fixed template index to render message on canvas only.
3+
Aligned games/_template with the canonical engine/theme shell baseline.
4+
5+
- updated template index shell
6+
- added only minimal shared bootstrap/theme dependencies as needed
7+
- kept template non-playable and game-neutral

docs/dev/NEXT_COMMAND.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
Create APPLY_PR_GAMES_TEMPLATE_INDEX_CANVAS_FIX
1+
Create APPLY_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT
2+
3+
Scope:
4+
- accept template shell/theme alignment
5+
- confirm consistent view baseline
6+
- confirm no gameplay boot
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
[ ] Canvas renders
2-
[ ] Text drawn on canvas
3-
[ ] No DOM text
1+
Validation Checklist — Games Template Engine Theme Bootstrap Alignment
2+
3+
[ ] games/_template/index.html shows consistent shell/theme baseline
4+
[ ] Canvas is visible
5+
[ ] Template message visible
6+
[ ] No Asteroids gameplay boots
7+
[ ] No Asteroids-specific assets copied into _template
8+
[ ] Only minimal shell/bootstrap files added
49
[ ] No console errors
10+
511
Status: PENDING
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# BUILD PR — Games Template Engine Theme Bootstrap Alignment
2+
3+
## Purpose
4+
Add the minimum shared engine/theme bootstrap required so `games/_template` presents the same consistent shell/theme view standard as canonical games after copy.
5+
6+
## Problem Statement
7+
`games/_template` is structurally correct, but its current `index.html` is too isolated and does not establish the standard engine/theme view baseline.
8+
9+
This PR is ONLY to align the template shell with the existing canonical view/bootstrap pattern.
10+
11+
## Source Of Truth
12+
Use `games/Asteroids/index.html` as the visual/bootstrap reference.
13+
14+
Only copy/adapt the minimum non-game-specific bootstrap needed to reproduce the standard shell/theme setup.
15+
16+
## Scope (STRICT)
17+
- Update `games/_template/index.html`
18+
- Add ONLY the minimal non-game-specific files directly required by that shell/theme bootstrap
19+
- Reuse existing shared/engine/theme bootstrap already proven by canonical game wiring
20+
- Keep `_template` non-playable and game-neutral
21+
22+
## Target Files (EXACT)
23+
Primary edit:
24+
- `games/_template/index.html`
25+
26+
Secondary allowed additions:
27+
- only existing shared/bootstrap/theme files that are directly required by the new `_template/index.html`
28+
- only under paths already used by canonical game bootstrap
29+
- no new architecture files
30+
- no new engine subsystems
31+
32+
## Required Behavior
33+
`games/_template/index.html` MUST:
34+
- render a visible canvas
35+
- present the consistent engine/theme view baseline used by the canonical game shell
36+
- draw or display this required template message in the shell view:
37+
38+
Game Template
39+
Replace this entrypoint with your game-specific shell.
40+
41+
- remain non-playable
42+
- not auto-boot gameplay
43+
- not load Asteroids-specific entities, rules, levels, assets, or game flow
44+
45+
## Allowed Operations
46+
- inspect `games/Asteroids/index.html` and its direct non-game-specific shell/bootstrap dependencies
47+
- reuse/copy minimal shell/bootstrap/theme dependencies needed for consistent view
48+
- update `_template/index.html` to use those dependencies
49+
- keep placeholders and `.gitkeep` skeleton structure intact
50+
51+
## Explicit Non-Goals
52+
- DO NOT modify `games/Asteroids`
53+
- DO NOT copy Asteroids gameplay code
54+
- DO NOT copy Asteroids assets
55+
- DO NOT copy Asteroids flow/level/entity/rules implementation
56+
- DO NOT refactor engine/shared broadly
57+
- DO NOT introduce a new theming system
58+
- DO NOT make `_template` runnable as a game
59+
60+
## Fail-Fast Conditions
61+
STOP with no changes if any of the following are true:
62+
- the required consistent shell/theme view cannot be obtained without copying game-specific Asteroids code
63+
- the bootstrap dependency chain expands beyond direct shell/theme setup into gameplay/runtime systems
64+
- more than one ambiguous bootstrap path exists and no single canonical path is already proven by `games/Asteroids/index.html`
65+
- achieving the consistent shell requires repo-wide cleanup or restructuring
66+
67+
## Acceptance Criteria
68+
- `games/_template/index.html` shows the standard consistent shell/theme view baseline
69+
- template message is visible:
70+
- `Game Template`
71+
- `Replace this entrypoint with your game-specific shell.`
72+
- canvas is visible
73+
- no Asteroids gameplay boots
74+
- no Asteroids-specific assets or game logic are present in `_template`
75+
- changes remain minimal and limited to shell/bootstrap alignment
76+
77+
## Validation Steps
78+
1. Open `games/Asteroids/index.html` and note the canonical shell/theme baseline
79+
2. Open `games/_template/index.html`
80+
3. Confirm:
81+
- canvas visible
82+
- consistent shell/theme view is present
83+
- required template message is visible
84+
- no gameplay starts
85+
- no console errors
86+
4. Confirm only minimal bootstrap/theme files were added, if any
87+
88+
## Output Requirement
89+
Codex must package:
90+
`<project folder>/tmp/BUILD_PR_GAMES_TEMPLATE_ENGINE_THEME_BOOTSTRAP_ALIGNMENT_delta.zip`

games/_template/index.html

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,20 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8" />
4+
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<title>Game Template</title>
7-
<style>
8-
:root { color-scheme: light; }
9-
body {
10-
margin: 0;
11-
min-height: 100vh;
12-
display: grid;
13-
place-items: center;
14-
background: #f5f5f5;
15-
}
16-
canvas {
17-
width: min(92vw, 800px);
18-
height: auto;
19-
aspect-ratio: 4 / 3;
20-
border: 2px solid #111;
21-
background: #fff;
22-
display: block;
23-
}
24-
</style>
7+
<link rel="stylesheet" href="/src/engine/ui/baseLayout.css" />
258
</head>
269
<body>
27-
<canvas id="game-canvas" width="800" height="600" aria-label="Template Game Canvas"></canvas>
28-
<script>
29-
const canvas = document.getElementById("game-canvas");
30-
const ctx = canvas.getContext("2d");
31-
32-
if (ctx) {
33-
ctx.clearRect(0, 0, canvas.width, canvas.height);
34-
ctx.fillStyle = "#111";
35-
ctx.textAlign = "center";
36-
ctx.textBaseline = "middle";
37-
38-
ctx.font = "bold 52px sans-serif";
39-
ctx.fillText("Game Template", canvas.width / 2, canvas.height / 2 - 36);
40-
41-
ctx.font = "24px sans-serif";
42-
ctx.fillText(
43-
"Replace this entrypoint with your game-specific shell.",
44-
canvas.width / 2,
45-
canvas.height / 2 + 28
46-
);
47-
}
48-
</script>
10+
<main>
11+
<h1>Game Template</h1>
12+
<p>Replace this entrypoint with your game-specific shell.</p>
13+
<canvas id="game" width="960" height="720" aria-label="Template game canvas"></canvas>
14+
<section>
15+
<h3>Template Status</h3>
16+
<p>This template intentionally does not boot gameplay.</p>
17+
</section>
18+
</main>
4919
</body>
5020
</html>

0 commit comments

Comments
 (0)