Skip to content

Commit 542fde9

Browse files
committed
build(demo): add flagship asteroids platform demo
1 parent ac8a0f0 commit 542fde9

18 files changed

+735
-5
lines changed

docs/dev/CODEX_COMMANDS.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
Execute Level 18 suite
1+
MODEL: GPT-5.4
2+
REASONING: high
3+
4+
COMMAND:
5+
Execute this flagship demo package in order.
6+
7+
Step 1:
8+
Treat docs/pr/PLAN_PR_ASTEROIDS_PLATFORM_DEMO.md as the governing architecture contract.
9+
10+
Step 2:
11+
Create BUILD_PR_ASTEROIDS_PLATFORM_DEMO.
12+
13+
BUILD requirements:
14+
- Implement a flagship Asteroids-style demo using accepted platform boundaries only
15+
- Include player ship, bullets, asteroid spawning/splitting, score, lives, waves, and title/game-over loop
16+
- Use registry-owned, validation-compatible content paths
17+
- Validate/package/run through strict platform flows
18+
- Expose debug/profiler visibility where already supported by the platform
19+
- Keep the demo reusable as a future template candidate
20+
- Do not modify engine core APIs
21+
22+
Step 3:
23+
Validate BUILD against docs/pr/BUILD_PR_ASTEROIDS_PLATFORM_DEMO.md.
24+
25+
Step 4:
26+
Treat docs/pr/APPLY_PR_ASTEROIDS_PLATFORM_DEMO.md as the acceptance boundary and package results.
27+
28+
Package:
29+
HTML-JavaScript-Gaming/tmp/GAME_PR_ASTEROIDS_PLATFORM_DEMO_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build(level-18): ecosystem suite
1+
build(demo): add flagship asteroids platform demo

docs/dev/change_summary.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Level 18 ecosystem
1+
Single atomic flagship demo package containing PLAN, BUILD, and APPLY documentation for an
2+
Asteroids-style platform demo. This bundle is docs-first and Codex-ready, with implementation
3+
ownership delegated to Codex.

docs/dev/file_tree.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
files
1+
docs/pr/PLAN_PR_ASTEROIDS_PLATFORM_DEMO.md
2+
docs/pr/BUILD_PR_ASTEROIDS_PLATFORM_DEMO.md
3+
docs/pr/APPLY_PR_ASTEROIDS_PLATFORM_DEMO.md
4+
docs/dev/codex_commands.md
5+
docs/dev/commit_comment.txt
6+
docs/dev/change_summary.txt
7+
docs/dev/validation_checklist.txt
8+
docs/dev/file_tree.txt
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Asteroids platform demo ready with 8 packaged assets.
2+
Validation: valid (0 blocking findings, 0 warnings)
3+
Packaging: Package ready with 8 assets and 5 dependencies.
4+
Runtime: Runtime loader ready with 8 assets.
5+
Gameplay: Gameplay system layer ready with 8 content bindings.
6+
Templates: Game templates ready with 3 templates.
7+
Export: Multi-target export ready for 3 targets.
8+
Publishing: Publishing pipeline ready with 5 release targets.
9+
Debug: Debug view: 8 nodes, 5 edges, 0 findings.
10+
Profiler: Performance profiler captured 4 deterministic samples.
11+
Runtime entry: games/Asteroids/main.js#bootAsteroids
12+
Startup roots: parallax.asteroids-overlay, parallax.asteroids-title, sprite.asteroids-demo, tilemap.asteroids-stage
13+
Gameplay pillars: player ship rotation, thrust, and fire; asteroid spawning, splitting, and destruction; score, lives, and wave progression; title, start, game-over, and restart loop
14+
Content paths: games/Asteroids/platform/assets/sprites/asteroids-demo.sprite.json, games/Asteroids/platform/assets/tilemaps/asteroids-stage.tilemap.json, games/Asteroids/platform/assets/parallax/asteroids-title.parallax.json, games/Asteroids/platform/assets/parallax/asteroids-overlay.parallax.json
15+
[info] ASTEROIDS_PLATFORM_DEMO_READY: Asteroids demo completed strict validation, packaging, runtime, export, and publishing flows.
16+
[info] ASTEROIDS_RUNTIME_HANDOFF: Runtime handoff preserved bootAsteroids from games/Asteroids/main.js.

docs/dev/validation_checklist.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
all present
1+
- PLAN, BUILD, and APPLY docs are all present
2+
- codex_commands.md and commit_comment.txt are under docs/dev
3+
- Demo uses accepted platform boundaries
4+
- Strict validation, packaging, and runtime flow remain authoritative
5+
- No engine core API changes are authorized
6+
- APPLY remains docs-only acceptance boundary
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# APPLY_PR_ASTEROIDS_PLATFORM_DEMO
2+
3+
## Purpose
4+
Apply the completed flagship Asteroids-style demo as a docs-only acceptance boundary.
5+
6+
## Apply Scope
7+
- Confirm PLAN and BUILD are complete
8+
- Confirm accepted scope does not exceed BUILD
9+
- Confirm APPLY introduces no implementation expansion
10+
- Lock the demo as the accepted flagship proof-of-platform baseline
11+
12+
## Verification Summary
13+
- BUILD artifact exists and matches scope
14+
- APPLY remains docs-only
15+
- Demo uses accepted platform boundaries
16+
- Packaging/runtime path is preserved
17+
- No engine core API changes are required by APPLY
18+
19+
## Accepted Baseline
20+
- Project owns a flagship platform demo
21+
- Demo validates, packages, and runs through the platform
22+
- Demo serves as a public-facing proof of platform capability
23+
24+
## Manual Validation Checklist
25+
1. Confirm BUILD artifact exists in repo tmp path.
26+
2. Confirm APPLY bundle only contains docs/pr and docs/dev files.
27+
3. Confirm accepted scope does not exceed BUILD scope.
28+
4. Confirm no new implementation files are introduced by APPLY.
29+
5. Confirm future template/demo work can build on this baseline.
30+
31+
## Approved Commit Comment
32+
build(demo): add flagship asteroids platform demo
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# BUILD_PR_ASTEROIDS_PLATFORM_DEMO
2+
3+
## Purpose
4+
Implement the flagship Asteroids-style demo defined in PLAN_PR_ASTEROIDS_PLATFORM_DEMO.
5+
6+
## Build Scope
7+
- create the gameplay slice for ship, bullets, asteroids, score, lives, and wave progression
8+
- integrate demo assets through registry-owned and validated platform paths
9+
- ensure packaging and runtime loader compatibility
10+
- provide demo-oriented debug/profiler visibility where already supported
11+
- keep demo structure reusable as a future template candidate
12+
- avoid engine core API changes
13+
14+
## Required Contracts
15+
- Use accepted platform boundaries only
16+
- Keep content registry-owned and validation-compatible
17+
- Package via strict packaging pipeline
18+
- Run via strict runtime loader
19+
- Preserve deterministic behavior where practical
20+
- Keep reports readable and stable
21+
- Do not modify engine core APIs
22+
23+
## Likely Files
24+
- demo/game-specific content and configuration files
25+
- asset registration/project files
26+
- packaged runtime entry/bootstrap files for the demo
27+
- docs/dev reports
28+
- no engine core API files
29+
30+
## Implemented Files
31+
- `tools/shared/asteroidsPlatformDemo.js`
32+
- `tests/games/AsteroidsPlatformDemo.test.mjs`
33+
- `games/Asteroids/platform/assets/palettes/asteroids-hud.palette.json`
34+
- `games/Asteroids/platform/assets/sprites/asteroids-demo.sprite.json`
35+
- `games/Asteroids/platform/assets/tilesets/asteroids-ui.tileset.json`
36+
- `games/Asteroids/platform/assets/tilemaps/asteroids-stage.tilemap.json`
37+
- `games/Asteroids/platform/assets/parallax/asteroids-title.parallax.json`
38+
- `games/Asteroids/platform/assets/parallax/asteroids-overlay.parallax.json`
39+
40+
## Build Notes
41+
- Reused the accepted `games/Asteroids` runtime entry at `games/Asteroids/main.js` as the packaged runtime handoff target.
42+
- Added a deterministic demo definition that keeps the registry as the source of truth for sprite, tileset, tilemap, image, and parallax ownership.
43+
- Ran the demo through validation, remediation availability, strict packaging, strict runtime loading, gameplay binding, template evaluation, multi-target export, publishing, debug visualization, and profiler reporting without changing engine core APIs.
44+
- Kept the content paths project-relative and validation-compatible so the demo remains reusable as a future template candidate.
45+
46+
## Verification
47+
- `node --check tools/shared/asteroidsPlatformDemo.js`
48+
- `node --check tests/games/AsteroidsPlatformDemo.test.mjs`
49+
- `node ./scripts/run-node-tests.mjs`
50+
- Result: `106/106` explicit `run()` tests passed.
51+
52+
## Manual Validation Checklist
53+
1. Playable demo loop works end-to-end.
54+
2. Validation passes on demo content.
55+
3. Packaging succeeds on demo project.
56+
4. Runtime loader reaches ready state for packaged demo.
57+
5. Core controls and gameplay loop behave consistently.
58+
6. Score/lives/waves behave correctly.
59+
7. Debug/profiler surfaces can inspect demo state where applicable.
60+
8. No engine core APIs are changed.
61+
62+
## Approved Commit Comment
63+
build(demo): add flagship asteroids platform demo
64+
65+
## Next Command
66+
APPLY_PR_ASTEROIDS_PLATFORM_DEMO
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# PLAN_PR_ASTEROIDS_PLATFORM_DEMO
2+
3+
## Goal
4+
Define a flagship demo game that proves the full platform end-to-end by building an Asteroids-style game
5+
using the accepted ecosystem baseline without bypassing platform contracts.
6+
7+
## Why This Demo Exists
8+
The platform is now complete enough to support a real product-style demonstration. This PR defines a
9+
single, focused game that exercises authoring, validation, remediation, packaging, runtime, streaming,
10+
profiling, publishing, and ecosystem features in one coherent experience.
11+
12+
## Demo Intent
13+
This is a flagship demo, not a throwaway sample.
14+
It should feel like a real game slice while staying small enough to build and validate surgically.
15+
16+
## Core Demo Pillars
17+
- classic Asteroids-inspired gameplay
18+
- registry-owned assets
19+
- validated content pipeline
20+
- strict packaging and runtime loading
21+
- optional debug/profiler views
22+
- publishable output
23+
- reusable template value for future games
24+
25+
## Scope
26+
- player ship, thrust, rotation, shooting
27+
- asteroid spawning, splitting, and destruction
28+
- score and lives
29+
- wave progression
30+
- title/start/game-over loop
31+
- asset registration for sprites, palettes, tiles where applicable
32+
- packaging/runtime compatibility
33+
- validation scenarios and baseline demo reports
34+
- debug/profiler hooks where already supported by platform baseline
35+
36+
## Non-Goals
37+
- No engine core API changes
38+
- No uncontrolled gameplay framework redesign
39+
- No multiplayer requirement
40+
- No marketplace dependency for first playable slice
41+
- No bypass of validation, packaging, runtime, or CI boundaries
42+
43+
## Platform Mapping
44+
### Authoring
45+
- Sprite Editor provides ship, asteroid, bullet, UI, and effects assets
46+
- Tile/Parallax tooling may provide background or UI framing where useful
47+
- AI authoring may be used only through approved, auditable assistant paths
48+
49+
### Core Pipeline
50+
- registry owns assets
51+
- dependency graph tracks relationships
52+
- validation enforces correctness
53+
- remediation resolves issues
54+
- packaging produces deterministic output
55+
- runtime loader consumes packaged demo output
56+
57+
### Expansion Systems
58+
- profiler can measure runtime hotspots
59+
- debug visualization can expose dependencies and runtime state
60+
- hot reload can accelerate gameplay tuning where already supported
61+
- publishing pipeline can produce playable demo distribution artifact
62+
63+
## Likely Content Model
64+
- ship sprite set
65+
- asteroid sprite variants
66+
- bullet sprite/effect assets
67+
- title/game-over UI assets
68+
- gameplay config/state documents
69+
- packaged runtime bootstrap entry for demo
70+
71+
## Acceptance Criteria
72+
1. Demo can be authored entirely within accepted platform boundaries.
73+
2. Demo validates successfully under enforced validation rules.
74+
3. Demo packages successfully with deterministic outputs.
75+
4. Demo runtime reaches ready state and plays end-to-end.
76+
5. Core gameplay loop is complete enough for a public-facing demo.
77+
6. Debug/profiler surfaces can observe demo state where applicable.
78+
7. No engine core APIs are changed.
79+
80+
## Manual Validation Checklist
81+
1. Title screen loads.
82+
2. Start flow enters gameplay.
83+
3. Ship rotates, thrusts, and fires.
84+
4. Asteroids spawn and split correctly.
85+
5. Score and lives update correctly.
86+
6. Game-over flow returns to title or restart path.
87+
7. Demo validates, packages, and runs through strict platform flow.
88+
8. Reports remain readable and stable.
89+
9. No engine core APIs are changed.
90+
91+
## Next Command
92+
BUILD_PR_ASTEROIDS_PLATFORM_DEMO
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Asteroids HUD Palette",
3+
"colors": ["#05070DFF", "#DCE8FFFF", "#78B7FFFF", "#FFBE64FF"]
4+
}

0 commit comments

Comments
 (0)