|
| 1 | +# BUILD_PR_VECTOR_TEMPLATE_SAMPLE_GAME |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Implement a clean sample game built from the accepted `templates/vector-native-arcade/` baseline, |
| 5 | +proving that the reusable vector-native template can produce a standalone playable project without |
| 6 | +sprite fallback and without engine core API changes. |
| 7 | + |
| 8 | +## Build Scope |
| 9 | +- create a standalone sample game from the vector-native template baseline |
| 10 | +- keep the sample game small, playable, and demo-ready |
| 11 | +- use first-class vector assets as the required visual contract |
| 12 | +- preserve strict validation, packaging, runtime, CI, export, and publishing compatibility |
| 13 | +- keep the sample reusable as proof that the template is not Asteroids-specific |
| 14 | +- avoid engine core API changes |
| 15 | + |
| 16 | +## Suggested Target |
| 17 | +```text |
| 18 | +games/vector-arcade-sample/ |
| 19 | +``` |
| 20 | + |
| 21 | +## Required Contracts |
| 22 | +- vector assets are the only active visual runtime dependency |
| 23 | +- no sprite fallback is packaged as active runtime dependency |
| 24 | +- registry, dependency graph, validation, packaging, and runtime all recognize the sample cleanly |
| 25 | +- debug/profiler/export/publishing remain compatible |
| 26 | +- deterministic behavior remains stable |
| 27 | +- no engine core APIs are changed |
| 28 | + |
| 29 | +## Likely Files |
| 30 | +- `games/vector-arcade-sample/*` |
| 31 | +- template-derived vector assets/config/runtime files |
| 32 | +- validation/packaging/runtime/debug/profiler reports |
| 33 | +- docs/dev reports |
| 34 | +- no engine core API files |
| 35 | + |
| 36 | +## Implemented Files |
| 37 | +- `games/vector-arcade-sample/index.html` |
| 38 | +- `games/vector-arcade-sample/main.js` |
| 39 | +- `games/vector-arcade-sample/README.md` |
| 40 | +- `games/vector-arcade-sample/assets/palettes/vector-native-primary.palette.json` |
| 41 | +- `games/vector-arcade-sample/assets/vectors/template-player.vector.json` |
| 42 | +- `games/vector-arcade-sample/assets/vectors/template-obstacle-large.vector.json` |
| 43 | +- `games/vector-arcade-sample/assets/vectors/template-obstacle-small.vector.json` |
| 44 | +- `games/vector-arcade-sample/assets/vectors/template-title.vector.json` |
| 45 | +- `games/vector-arcade-sample/assets/vectors/template-hud.vector.json` |
| 46 | +- `games/vector-arcade-sample/assets/tilemaps/template-ui.tileset.json` |
| 47 | +- `games/vector-arcade-sample/assets/tilemaps/template-arena.tilemap.json` |
| 48 | +- `games/vector-arcade-sample/assets/parallax/template-backdrop.parallax.json` |
| 49 | +- `games/vector-arcade-sample/assets/parallax/template-backdrop.svg` |
| 50 | +- `games/vector-arcade-sample/config/sample.project.json` |
| 51 | +- `games/vector-arcade-sample/runtime/bootstrap.runtime.json` |
| 52 | +- `games/vector-arcade-sample/docs/STARTER_GUIDE.md` |
| 53 | +- `games/vector-arcade-sample/docs/ROLLBACK_NOTES.md` |
| 54 | +- `tools/shared/vectorTemplateSampleGame.js` |
| 55 | +- `tests/tools/VectorTemplateSampleGame.test.mjs` |
| 56 | +- `tests/run-tests.mjs` |
| 57 | + |
| 58 | +## Build Notes |
| 59 | +- Built `games/vector-arcade-sample/` as a standalone sample derived from `templates/vector-native-arcade/`. |
| 60 | +- Kept vector assets as the only active visual runtime dependency. |
| 61 | +- Preserved strict validation, packaging, runtime, debug, profiler, export, and publishing compatibility through a shared sample-game verifier. |
| 62 | +- Added a sample-local runtime entry at `games/vector-arcade-sample/main.js#bootVectorArcadeSample` without changing engine core APIs. |
| 63 | + |
| 64 | +## Verification |
| 65 | +- `node --check tools/shared/vectorTemplateSampleGame.js` |
| 66 | +- `node --check games/vector-arcade-sample/main.js` |
| 67 | +- `node --check tests/tools/VectorTemplateSampleGame.test.mjs` |
| 68 | +- `node ./scripts/run-node-tests.mjs` |
| 69 | +- Result: `109/109` explicit `run()` tests passed. |
| 70 | + |
| 71 | +## Validation Summary |
| 72 | +- Sample status: ready |
| 73 | +- Validation: valid with `0` blocking findings |
| 74 | +- Packaging: ready with `10` assets and `8` dependencies |
| 75 | +- Runtime: ready with `10` loaded assets |
| 76 | +- Debug: `10` nodes and `8` edges |
| 77 | +- Publishing: ready with `5` release targets |
| 78 | + |
| 79 | +## Verification Expectations |
| 80 | +- sample validates successfully |
| 81 | +- sample packages successfully |
| 82 | +- runtime reaches ready state |
| 83 | +- debug graph shows vector-native sample assets |
| 84 | +- profiler captures deterministic sample data |
| 85 | +- export and publishing remain ready |
| 86 | + |
| 87 | +## Manual Validation Checklist |
| 88 | +1. Sample game is created from the vector-native template baseline. |
| 89 | +2. Validation passes with no blocking findings. |
| 90 | +3. Packaging succeeds without sprite fallback. |
| 91 | +4. Runtime reaches ready state. |
| 92 | +5. Gameplay/sample loop is demonstrable. |
| 93 | +6. Debug and profiler surfaces reflect sample participation. |
| 94 | +7. Export and publishing remain ready. |
| 95 | +8. No engine core APIs are changed. |
| 96 | + |
| 97 | +## Approved Commit Comment |
| 98 | +build(sample-game): add standalone game from vector-native template |
| 99 | + |
| 100 | +## Next Command |
| 101 | +APPLY_PR_VECTOR_TEMPLATE_SAMPLE_GAME |
0 commit comments