@auraindustry/aurajs 0.0.7 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -2
- package/benchmarks/perf-thresholds.json +54 -0
- package/package.json +4 -7
- package/src/asset-pack.mjs +5 -1
- package/src/authored-project.mjs +1449 -0
- package/src/authored-runtime.mjs +2016 -0
- package/src/authoring/avatar-animation-graph.mjs +648 -0
- package/src/bin-integrity.mjs +272 -0
- package/src/build-contract/assets.mjs +130 -0
- package/src/build-contract/capabilities.mjs +116 -0
- package/src/build-contract/constants.mjs +6 -0
- package/src/build-contract/helpers.mjs +44 -0
- package/src/build-contract/web-templates.mjs +5993 -0
- package/src/build-contract.mjs +27 -2910
- package/src/bundler.mjs +188 -55
- package/src/cli.mjs +4825 -1512
- package/src/commands/project-authoring.mjs +434 -0
- package/src/config.mjs +27 -0
- package/src/conformance/cases/app-and-ui-runtime-cases.mjs +3309 -0
- package/src/conformance/cases/core-runtime-cases.mjs +1431 -0
- package/src/conformance/cases/index.mjs +11 -0
- package/src/conformance/cases/scene3d-and-media-cases.mjs +2094 -0
- package/src/conformance/cases/systems-and-gameplay-cases.mjs +1776 -0
- package/src/conformance/shared.mjs +27 -0
- package/src/conformance-runner.mjs +25 -13
- package/src/conformance.mjs +619 -4020
- package/src/cutscene.mjs +362 -5
- package/src/dev-cli-action.mjs +249 -0
- package/src/dev-cli-inspect.mjs +92 -0
- package/src/dev-cli-state.mjs +80 -0
- package/src/external-asset-cache.mjs +587 -0
- package/src/external-asset-policy.mjs +217 -0
- package/src/external-package-surface.mjs +206 -0
- package/src/game-action-runtime.mjs +869 -0
- package/src/game-state-runtime.mjs +206 -6
- package/src/headless-action.mjs +186 -0
- package/src/headless-test/runtime-animation.mjs +1173 -0
- package/src/headless-test/runtime-coordinator.mjs +1514 -0
- package/src/headless-test/runtime-primitives.mjs +320 -0
- package/src/headless-test/runtime-world.mjs +2253 -0
- package/src/headless-test.mjs +392 -4298
- package/src/host-binary.mjs +342 -14
- package/src/icon-discovery.mjs +64 -0
- package/src/make-catalog.mjs +109 -0
- package/src/make.mjs +197 -0
- package/src/package-integrity.mjs +586 -0
- package/src/perf-benchmark.mjs +353 -0
- package/src/postinstall.mjs +5 -5
- package/src/prefabs/index.mjs +34 -0
- package/src/prefabs/scene-serialization.mjs +184 -0
- package/src/project-importer.mjs +620 -0
- package/src/project-registry.mjs +24 -0
- package/src/publish-command.mjs +195 -0
- package/src/publish-env-example.mjs +83 -0
- package/src/publish-validation.mjs +708 -0
- package/src/retro/assets/compile.mjs +232 -0
- package/src/retro/backend-gba/authoring.mjs +1029 -0
- package/src/retro/backend-gba/rom.mjs +363 -0
- package/src/retro/backend-gbc/rom.mjs +85 -0
- package/src/retro/build.mjs +278 -0
- package/src/retro/cli/commands.mjs +292 -0
- package/src/retro/cli/templates.mjs +84 -0
- package/src/retro/diagnostics/catalog.mjs +110 -0
- package/src/retro/diagnostics/emit.mjs +72 -0
- package/src/retro/emulator/case-overlay.mjs +64 -0
- package/src/retro/emulator/discovery.mjs +158 -0
- package/src/retro/emulator/macos-case-overlay.swift +220 -0
- package/src/retro/emulator/profiles.mjs +146 -0
- package/src/retro/emulator/runner.mjs +289 -0
- package/src/retro/frontend/load-project.mjs +98 -0
- package/src/retro/index.mjs +30 -0
- package/src/retro/ir/build-ir.mjs +108 -0
- package/src/retro/runtime-gba/contract.mjs +151 -0
- package/src/retro/runtime-gbc/contract.mjs +117 -0
- package/src/retro/shared/span.mjs +26 -0
- package/src/retro/shared/targets.mjs +64 -0
- package/src/retro/validator/check-project.mjs +114 -0
- package/src/runtime-hotspot-audit.mjs +707 -0
- package/src/scaffold/config.mjs +1000 -0
- package/src/scaffold/fs.mjs +56 -0
- package/src/scaffold/layout.mjs +318 -0
- package/src/scaffold/project-docs.mjs +438 -0
- package/src/scaffold.mjs +93 -596
- package/src/scene-composition/index.mjs +326 -0
- package/src/scene-composition/runtime.mjs +751 -0
- package/src/self-hosted-assets.mjs +604 -0
- package/src/session-client.mjs +750 -0
- package/src/session-native-launcher.mjs +74 -0
- package/src/session-protocol.mjs +75 -0
- package/src/session-runtime.mjs +321 -0
- package/src/session-server.mjs +360 -0
- package/src/shader-kits/index.mjs +773 -0
- package/src/starter-content-registry.mjs +292 -0
- package/src/state-artifacts.mjs +662 -24
- package/src/state-dev-reload.mjs +99 -2
- package/src/terminal-ui.mjs +245 -0
- package/src/web-conformance.mjs +219 -0
- package/templates/create/2d/config/gameplay/shooter.config.js +26 -0
- package/templates/create/2d/content/gameplay/waves.json +26 -0
- package/templates/create/2d/content/registries/.gitkeep +1 -0
- package/templates/create/2d/docs/design/.gitkeep +1 -0
- package/templates/create/2d/docs/design/loop.md +5 -0
- package/templates/create/2d/prefabs/enemies.prefab.js +90 -0
- package/templates/create/2d/prefabs/enemy-basic.prefab.js +18 -0
- package/templates/create/2d/prefabs/player.prefab.js +36 -0
- package/templates/create/2d/prefabs/projectiles.prefab.js +35 -0
- package/templates/create/2d/scenes/boot.scene.js +12 -0
- package/templates/create/2d/scenes/gameplay.scene.js +230 -0
- package/templates/create/2d/scenes/menu.scene.js +9 -0
- package/templates/create/2d/src/main.js +6 -185
- package/templates/create/2d/src/runtime/app.js +49 -0
- package/templates/create/2d/src/runtime/capabilities.js +35 -0
- package/templates/create/2d/ui/hud.screen.js +40 -0
- package/templates/create/2d/ui/pause.screen.js +149 -0
- package/templates/create/2d/ui/settings.screen.js +347 -0
- package/templates/create/2d/ui/title.screen.js +13 -0
- package/templates/create/2d-adventure/aura.config.json +28 -0
- package/templates/create/2d-adventure/config/gameplay/adventure.config.js +14 -0
- package/templates/create/2d-adventure/content/gameplay/world.js +46 -0
- package/templates/create/2d-adventure/content/registries/.gitkeep +1 -0
- package/templates/create/2d-adventure/docs/design/loop.md +5 -0
- package/templates/create/2d-adventure/prefabs/player.prefab.js +54 -0
- package/templates/create/2d-adventure/prefabs/relic.prefab.js +38 -0
- package/templates/create/2d-adventure/prefabs/world.prefab.js +125 -0
- package/templates/create/2d-adventure/scenes/gameplay.scene.js +256 -0
- package/templates/create/2d-adventure/src/runtime/capabilities.js +34 -0
- package/templates/create/2d-adventure/ui/hud.screen.js +60 -0
- package/templates/create/2d-survivor/config/gameplay/survivor.config.js +33 -0
- package/templates/create/2d-survivor/content/gameplay/spawn-zones.json +29 -0
- package/templates/create/2d-survivor/content/registries/.gitkeep +1 -0
- package/templates/create/2d-survivor/docs/design/.gitkeep +1 -0
- package/templates/create/2d-survivor/docs/design/loop.md +5 -0
- package/templates/create/2d-survivor/prefabs/enemies.prefab.js +178 -0
- package/templates/create/2d-survivor/prefabs/enemy-swarm.prefab.js +18 -0
- package/templates/create/2d-survivor/prefabs/player.prefab.js +42 -0
- package/templates/create/2d-survivor/prefabs/projectiles.prefab.js +56 -0
- package/templates/create/2d-survivor/scenes/boot.scene.js +12 -0
- package/templates/create/2d-survivor/scenes/gameplay.scene.js +314 -0
- package/templates/create/2d-survivor/scenes/menu.scene.js +9 -0
- package/templates/create/2d-survivor/src/main.js +5 -332
- package/templates/create/2d-survivor/src/runtime/app.js +49 -0
- package/templates/create/2d-survivor/src/runtime/capabilities.js +35 -0
- package/templates/create/2d-survivor/ui/hud.screen.js +45 -0
- package/templates/create/2d-survivor/ui/title.screen.js +13 -0
- package/templates/create/3d/assets/models/starter-avatar.gltf +184 -0
- package/templates/create/3d/config/gameplay/.gitkeep +1 -0
- package/templates/create/3d/content/gameplay/checkpoints.json +33 -0
- package/templates/create/3d/content/gameplay/course.js +40 -0
- package/templates/create/3d/content/registries/.gitkeep +1 -0
- package/templates/create/3d/docs/design/.gitkeep +1 -0
- package/templates/create/3d/docs/design/loop.md +5 -0
- package/templates/create/3d/prefabs/checkpoint.prefab.js +15 -0
- package/templates/create/3d/prefabs/player.prefab.js +204 -0
- package/templates/create/3d/prefabs/world.prefab.js +112 -0
- package/templates/create/3d/scenes/boot.scene.js +12 -0
- package/templates/create/3d/scenes/checkpoint.scene.js +9 -0
- package/templates/create/3d/scenes/gameplay.scene.js +292 -0
- package/templates/create/3d/src/main.js +6 -295
- package/templates/create/3d/src/runtime/app.js +49 -0
- package/templates/create/3d/src/runtime/capabilities.js +53 -0
- package/templates/create/3d/src/runtime/materials.js +34 -0
- package/templates/create/3d/src/runtime/state.js +39 -0
- package/templates/create/3d/ui/hud.screen.js +75 -0
- package/templates/create/3d/ui/pause.screen.js +166 -0
- package/templates/create/3d/ui/settings.screen.js +387 -0
- package/templates/create/3d-adventure/assets/models/starter-avatar.gltf +184 -0
- package/templates/create/3d-adventure/aura.config.json +28 -0
- package/templates/create/3d-adventure/config/gameplay/adventure.config.js +9 -0
- package/templates/create/3d-adventure/content/gameplay/course.js +62 -0
- package/templates/create/3d-adventure/content/registries/.gitkeep +1 -0
- package/templates/create/3d-adventure/docs/design/loop.md +5 -0
- package/templates/create/3d-adventure/prefabs/player.prefab.js +168 -0
- package/templates/create/3d-adventure/prefabs/relic.prefab.js +35 -0
- package/templates/create/3d-adventure/prefabs/world.prefab.js +119 -0
- package/templates/create/3d-adventure/scenes/gameplay.scene.js +358 -0
- package/templates/create/3d-adventure/src/runtime/capabilities.js +56 -0
- package/templates/create/3d-adventure/src/runtime/materials.js +39 -0
- package/templates/create/3d-adventure/src/runtime/state.js +31 -0
- package/templates/create/3d-adventure/ui/hud.screen.js +70 -0
- package/templates/create/3d-adventure/ui/pause.screen.js +437 -0
- package/templates/create/3d-collectathon/assets/models/starter-avatar.gltf +184 -0
- package/templates/create/3d-collectathon/config/gameplay/.gitkeep +1 -0
- package/templates/create/3d-collectathon/content/gameplay/collectibles.json +26 -0
- package/templates/create/3d-collectathon/content/gameplay/course.js +46 -0
- package/templates/create/3d-collectathon/content/registries/.gitkeep +1 -0
- package/templates/create/3d-collectathon/docs/design/.gitkeep +1 -0
- package/templates/create/3d-collectathon/docs/design/loop.md +5 -0
- package/templates/create/3d-collectathon/prefabs/collectible.prefab.js +15 -0
- package/templates/create/3d-collectathon/prefabs/player.prefab.js +207 -0
- package/templates/create/3d-collectathon/prefabs/world.prefab.js +112 -0
- package/templates/create/3d-collectathon/scenes/boot.scene.js +12 -0
- package/templates/create/3d-collectathon/scenes/checkpoint.scene.js +9 -0
- package/templates/create/3d-collectathon/scenes/gameplay.scene.js +200 -0
- package/templates/create/3d-collectathon/src/main.js +5 -355
- package/templates/create/3d-collectathon/src/runtime/app.js +49 -0
- package/templates/create/3d-collectathon/src/runtime/capabilities.js +53 -0
- package/templates/create/3d-collectathon/src/runtime/materials.js +34 -0
- package/templates/create/3d-collectathon/src/runtime/state.js +27 -0
- package/templates/create/3d-collectathon/ui/hud.screen.js +66 -0
- package/templates/create/3d-collectathon/ui/pause.screen.js +13 -0
- package/templates/create/blank/config/gameplay/.gitkeep +1 -0
- package/templates/create/blank/content/gameplay/.gitkeep +1 -0
- package/templates/create/blank/content/registries/.gitkeep +1 -0
- package/templates/create/blank/docs/design/.gitkeep +1 -0
- package/templates/create/blank/docs/design/loop.md +5 -0
- package/templates/create/blank/prefabs/.gitkeep +1 -0
- package/templates/create/blank/scenes/.gitkeep +1 -0
- package/templates/create/blank/src/runtime/.gitkeep +1 -0
- package/templates/create/blank/ui/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/assets/audio/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/assets/fonts/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/assets/sprites/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/assets/starter/README.md +11 -0
- package/templates/create/deckbuilder-2d/assets/ui/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/aura.config.json +28 -0
- package/templates/create/deckbuilder-2d/config/gameplay/deckbuilder.config.js +26 -0
- package/templates/create/deckbuilder-2d/content/cards/guard.card.js +19 -0
- package/templates/create/deckbuilder-2d/content/cards/spark.card.js +20 -0
- package/templates/create/deckbuilder-2d/content/cards/starter.deck.js +69 -0
- package/templates/create/deckbuilder-2d/content/cards/strike.card.js +19 -0
- package/templates/create/deckbuilder-2d/content/cards/survey.card.js +20 -0
- package/templates/create/deckbuilder-2d/content/encounters/training-battle.encounter.js +14 -0
- package/templates/create/deckbuilder-2d/content/encounters/training-battle.js +65 -0
- package/templates/create/deckbuilder-2d/content/enemies/training-automaton.enemy.js +48 -0
- package/templates/create/deckbuilder-2d/content/gameplay/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/content/registries/cards.registry.js +26 -0
- package/templates/create/deckbuilder-2d/content/registries/encounters.registry.js +20 -0
- package/templates/create/deckbuilder-2d/content/registries/enemies.registry.js +20 -0
- package/templates/create/deckbuilder-2d/content/registries/relics.registry.js +20 -0
- package/templates/create/deckbuilder-2d/content/relics/ember-charm.relic.js +18 -0
- package/templates/create/deckbuilder-2d/docs/design/loop.md +12 -0
- package/templates/create/deckbuilder-2d/prefabs/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/scenes/boot.scene.js +84 -0
- package/templates/create/deckbuilder-2d/scenes/gameplay.scene.js +641 -0
- package/templates/create/deckbuilder-2d/src/components/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/src/main.js +17 -0
- package/templates/create/deckbuilder-2d/src/runtime/capabilities.js +22 -0
- package/templates/create/deckbuilder-2d/src/shared/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/src/systems/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/tests/smoke/.gitkeep +1 -0
- package/templates/create/deckbuilder-2d/ui/hud.screen.js +80 -0
- package/templates/create/deckbuilder-2d/ui/pause.screen.js +146 -0
- package/templates/create/deckbuilder-2d/ui/settings.screen.js +342 -0
- package/templates/create/local-multiplayer/aura.config.json +40 -0
- package/templates/create/local-multiplayer/config/gameplay/local-multiplayer.config.js +26 -0
- package/templates/create/local-multiplayer/content/gameplay/room-layout.js +13 -0
- package/templates/create/local-multiplayer/content/registries/.gitkeep +1 -0
- package/templates/create/local-multiplayer/docs/design/loop.md +14 -0
- package/templates/create/local-multiplayer/prefabs/player.prefab.js +99 -0
- package/templates/create/local-multiplayer/scenes/boot.scene.js +12 -0
- package/templates/create/local-multiplayer/scenes/gameplay.scene.js +443 -0
- package/templates/create/local-multiplayer/src/main.js +17 -0
- package/templates/create/local-multiplayer/src/runtime/capabilities.js +28 -0
- package/templates/create/local-multiplayer/ui/hud.screen.js +60 -0
- package/templates/create/shared/src/runtime/project-inspector.js +105 -0
- package/templates/create/shared/src/runtime/scene-flow.js +290 -0
- package/templates/create/shared/src/runtime/screen-shell.js +222 -0
- package/templates/create/shared/src/runtime/ui-forms.js +209 -0
- package/templates/create/shared/src/runtime/ui-settings.js +237 -0
- package/templates/create/shared/src/runtime/ui-theme.js +352 -0
- package/templates/create/shared/src/starter-utils/adventure-objectives.js +102 -0
- package/templates/create/shared/src/starter-utils/animation-2d.js +337 -0
- package/templates/create/shared/src/starter-utils/avatar-3d.js +404 -0
- package/templates/create/shared/src/starter-utils/combat-feedback-2d.js +320 -0
- package/templates/create/shared/src/starter-utils/core.js +39 -3
- package/templates/create/shared/src/starter-utils/index.js +8 -2
- package/templates/create/shared/src/starter-utils/platformer-3d.js +34 -3
- package/templates/create/shared/src/starter-utils/triggers.js +662 -0
- package/templates/create/shared/src/starter-utils/tween-2d.js +615 -0
- package/templates/create/video-cutscene/assets/video/.gitkeep +0 -0
- package/templates/create/video-cutscene/aura.config.json +28 -0
- package/templates/create/video-cutscene/config/gameplay/.gitkeep +0 -0
- package/templates/create/video-cutscene/content/gameplay/.gitkeep +0 -0
- package/templates/create/video-cutscene/content/registries/.gitkeep +0 -0
- package/templates/create/video-cutscene/docs/design/loop.md +22 -0
- package/templates/create/video-cutscene/prefabs/.gitkeep +0 -0
- package/templates/create/video-cutscene/scenes/boot.scene.js +11 -0
- package/templates/create/video-cutscene/scenes/cutscene.scene.js +113 -0
- package/templates/create/video-cutscene/scenes/gameplay.scene.js +50 -0
- package/templates/create/video-cutscene/src/main.js +17 -0
- package/templates/create/video-cutscene/src/runtime/app.js +52 -0
- package/templates/create/video-cutscene/src/runtime/capabilities.js +35 -0
- package/templates/create/video-cutscene/src/runtime/state.js +13 -0
- package/templates/create/video-cutscene/ui/.gitkeep +0 -0
- package/templates/create-bin/play.js +1187 -0
- package/templates/make/README.md +46 -0
- package/templates/make/catalog.json +51 -0
- package/templates/make/component/files/{{MAKE_NAME}}.component.js +20 -0
- package/templates/make/component/manifest.json +9 -0
- package/templates/make/data/files/{{MAKE_NAME}}.json +14 -0
- package/templates/make/data/manifest.json +9 -0
- package/templates/make/material/files/{{MAKE_NAME}}.material.json +17 -0
- package/templates/make/material/manifest.json +9 -0
- package/templates/make/prefab/files/{{MAKE_NAME}}.prefab.js +20 -0
- package/templates/make/prefab/manifest.json +9 -0
- package/templates/make/scene/files/{{MAKE_NAME}}.scene.js +31 -0
- package/templates/make/scene/manifest.json +9 -0
- package/templates/make/shader/files/{{MAKE_NAME}}.shader.js +23 -0
- package/templates/make/shader/manifest.json +9 -0
- package/templates/make/system/files/{{MAKE_NAME}}.system.js +15 -0
- package/templates/make/system/manifest.json +9 -0
- package/templates/make/ui-screen/files/{{MAKE_NAME}}.screen.js +16 -0
- package/templates/make/ui-screen/files/{{MAKE_NAME}}.screen.json +23 -0
- package/templates/make/ui-screen/manifest.json +10 -0
- package/templates/make-starters/deckbuilder-2d/card/files/{{MAKE_NAME}}.card.js +22 -0
- package/templates/make-starters/deckbuilder-2d/card/manifest.json +9 -0
- package/templates/make-starters/deckbuilder-2d/catalog.json +34 -0
- package/templates/make-starters/deckbuilder-2d/encounter/files/{{MAKE_NAME}}.encounter.js +18 -0
- package/templates/make-starters/deckbuilder-2d/encounter/manifest.json +9 -0
- package/templates/make-starters/deckbuilder-2d/enemy/files/{{MAKE_NAME}}.enemy.js +28 -0
- package/templates/make-starters/deckbuilder-2d/enemy/manifest.json +9 -0
- package/templates/make-starters/deckbuilder-2d/relic/files/{{MAKE_NAME}}.relic.js +23 -0
- package/templates/make-starters/deckbuilder-2d/relic/manifest.json +9 -0
- package/templates/retro/platformer/README.md +10 -0
- package/templates/retro/platformer/assets/retro/assets.json +91 -0
- package/templates/retro/platformer/aura.config.json +7 -0
- package/templates/retro/platformer/package.json +5 -0
- package/templates/retro/platformer/src/main.js +40 -0
- package/templates/retro/puzzle-grid/README.md +10 -0
- package/templates/retro/puzzle-grid/assets/retro/assets.json +90 -0
- package/templates/retro/puzzle-grid/aura.config.json +7 -0
- package/templates/retro/puzzle-grid/package.json +5 -0
- package/templates/retro/puzzle-grid/src/main.js +29 -0
- package/templates/retro/tactics-grid/README.md +10 -0
- package/templates/retro/tactics-grid/assets/retro/assets.json +90 -0
- package/templates/retro/tactics-grid/aura.config.json +7 -0
- package/templates/retro/tactics-grid/package.json +5 -0
- package/templates/retro/tactics-grid/src/main.js +35 -0
- package/templates/retro/topdown-adventure/README.md +10 -0
- package/templates/retro/topdown-adventure/assets/retro/assets.json +95 -0
- package/templates/retro/topdown-adventure/aura.config.json +7 -0
- package/templates/retro/topdown-adventure/package.json +5 -0
- package/templates/retro/topdown-adventure/src/main.js +29 -0
- package/templates/skills/aurajs/SKILL.md +61 -5
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
export function renderProjectReadme({ name, projectTitle, template, templateMetadata }) {
|
|
2
|
+
if (templateMetadata?.runtimeFamily === 'retro') {
|
|
3
|
+
return renderRetroProjectReadme({ name, projectTitle, template, templateMetadata });
|
|
4
|
+
}
|
|
5
|
+
const controls = templateMetadata.controls.map((line) => `- ${line}`).join('\n');
|
|
6
|
+
const firstEdits = templateMetadata.firstEdits.map((line) => `1. ${line}`).join('\n');
|
|
7
|
+
const workflowSection = renderTemplateWorkflowSection(templateMetadata);
|
|
8
|
+
const projectMap = renderProjectMapSection(template);
|
|
9
|
+
const generateFilesSection = renderGenerateFilesSection(template);
|
|
10
|
+
const stateOwnershipSection = renderStateOwnershipSection();
|
|
11
|
+
const continuityOwnershipSection = renderContinuityOwnershipSection();
|
|
12
|
+
const largeAssetSection = renderLargeAssetSection();
|
|
13
|
+
|
|
14
|
+
const optionalCommands = [
|
|
15
|
+
'npm run build',
|
|
16
|
+
'npm run play',
|
|
17
|
+
templateMetadata?.optionalModules?.multiplayer === true ? 'npm run join -- AURA2P' : null,
|
|
18
|
+
'npm run publish',
|
|
19
|
+
'npm run session -- start',
|
|
20
|
+
].filter(Boolean).join('\n');
|
|
21
|
+
|
|
22
|
+
return `# ${projectTitle}
|
|
23
|
+
|
|
24
|
+
Scaffolded with \`aura create ${name} --template ${template}\`.
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
\`\`\`bash
|
|
29
|
+
npm install
|
|
30
|
+
npm run dev
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
Optional commands:
|
|
34
|
+
|
|
35
|
+
\`\`\`bash
|
|
36
|
+
${optionalCommands}
|
|
37
|
+
npx aura explain
|
|
38
|
+
npx aura check
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
${template === 'blank' ? '' : 'Press `F1` while the starter is running to toggle the development-only playtest HUD. Use the top scene strip to jump between scenes and the toolbar to record, capture screenshots, restart, pause, or minimize the HUD.\n\n'}
|
|
42
|
+
|
|
43
|
+
If you are publishing outside the \`@aurajs\` scope, update \`package.json -> name\`
|
|
44
|
+
before the first \`npm run publish\`.
|
|
45
|
+
|
|
46
|
+
${largeAssetSection}
|
|
47
|
+
${workflowSection}
|
|
48
|
+
${generateFilesSection}
|
|
49
|
+
${stateOwnershipSection}
|
|
50
|
+
${continuityOwnershipSection}
|
|
51
|
+
|
|
52
|
+
## Template Summary
|
|
53
|
+
|
|
54
|
+
${templateMetadata.summary}
|
|
55
|
+
|
|
56
|
+
## Controls
|
|
57
|
+
|
|
58
|
+
${controls}
|
|
59
|
+
|
|
60
|
+
## Project Map
|
|
61
|
+
|
|
62
|
+
${projectMap}
|
|
63
|
+
|
|
64
|
+
## First Edits
|
|
65
|
+
|
|
66
|
+
${firstEdits}
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function renderProjectRunbook({ projectTitle, template, templateMetadata }) {
|
|
71
|
+
if (templateMetadata?.runtimeFamily === 'retro') {
|
|
72
|
+
return renderRetroProjectRunbook({ projectTitle, template, templateMetadata });
|
|
73
|
+
}
|
|
74
|
+
const firstEdits = templateMetadata.firstEdits.map((line) => `1. ${line}`).join('\n');
|
|
75
|
+
const requiredApis = templateMetadata.requiredApis.map((entry) => `- \`${entry}\``).join('\n');
|
|
76
|
+
const workflowSection = renderTemplateWorkflowSection(templateMetadata);
|
|
77
|
+
const firstThirtyMinutes = renderFirstThirtyMinutesSteps(template);
|
|
78
|
+
const generateFilesSection = renderGenerateFilesSection(template);
|
|
79
|
+
const stateOwnershipSection = renderStateOwnershipSection();
|
|
80
|
+
const continuityOwnershipSection = renderContinuityOwnershipSection();
|
|
81
|
+
const largeAssetSection = renderLargeAssetSection();
|
|
82
|
+
|
|
83
|
+
return `# ${projectTitle} Runbook
|
|
84
|
+
|
|
85
|
+
Template: \`${template}\`
|
|
86
|
+
|
|
87
|
+
## First 30 Minutes
|
|
88
|
+
|
|
89
|
+
${firstThirtyMinutes}
|
|
90
|
+
|
|
91
|
+
${stateOwnershipSection}
|
|
92
|
+
${continuityOwnershipSection}
|
|
93
|
+
|
|
94
|
+
${workflowSection}
|
|
95
|
+
${generateFilesSection}
|
|
96
|
+
|
|
97
|
+
## First-Hour Implementation Pass
|
|
98
|
+
|
|
99
|
+
${firstEdits}
|
|
100
|
+
|
|
101
|
+
## Capability Contract
|
|
102
|
+
|
|
103
|
+
The scaffold assumes the runtime APIs below:
|
|
104
|
+
|
|
105
|
+
${requiredApis}
|
|
106
|
+
|
|
107
|
+
If any are unavailable at runtime, fail fast and capture the reason code before adding fallback behavior.
|
|
108
|
+
|
|
109
|
+
## Build + Share
|
|
110
|
+
|
|
111
|
+
1. \`npm run build\` to emit native/web artifacts.
|
|
112
|
+
1. \`npm run play\` to launch through the generated game CLI wrapper.
|
|
113
|
+
${templateMetadata?.optionalModules?.multiplayer === true ? '1. `npm run join -- AURA2P` to join a room-code multiplayer session through the generated wrapper.\n' : ''}1. \`npm run session -- start\` to open a persistent local developer session.
|
|
114
|
+
1. \`npm run publish\` once metadata and binaries are ready.
|
|
115
|
+
1. If you are not publishing under \`@aurajs\`, update \`package.json -> name\` first.
|
|
116
|
+
|
|
117
|
+
${largeAssetSection}
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function renderTemplateWorkflowSection(templateMetadata) {
|
|
122
|
+
const title = String(templateMetadata?.workflowTitle || '').trim();
|
|
123
|
+
const steps = Array.isArray(templateMetadata?.workflowSteps)
|
|
124
|
+
? templateMetadata.workflowSteps.filter((entry) => typeof entry === 'string' && entry.trim().length > 0)
|
|
125
|
+
: [];
|
|
126
|
+
if (!title || steps.length === 0) return '';
|
|
127
|
+
return `## ${title}
|
|
128
|
+
|
|
129
|
+
${steps.map((line) => `1. ${line}`).join('\n')}
|
|
130
|
+
`;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function renderRetroProjectReadme({ name, projectTitle, template, templateMetadata }) {
|
|
134
|
+
const controls = templateMetadata.controls.map((line) => `- ${line}`).join('\n');
|
|
135
|
+
const firstEdits = templateMetadata.firstEdits.map((line) => `1. ${line}`).join('\n');
|
|
136
|
+
const workflowSection = renderTemplateWorkflowSection(templateMetadata);
|
|
137
|
+
return `# ${projectTitle}
|
|
138
|
+
|
|
139
|
+
Scaffolded with \`aura create ${name} --template ${template}\`.
|
|
140
|
+
|
|
141
|
+
## Quick Start
|
|
142
|
+
|
|
143
|
+
\`\`\`bash
|
|
144
|
+
npm install
|
|
145
|
+
npm run retro:check
|
|
146
|
+
npm run build:gbc
|
|
147
|
+
\`\`\`
|
|
148
|
+
|
|
149
|
+
Optional build targets:
|
|
150
|
+
|
|
151
|
+
\`\`\`bash
|
|
152
|
+
npm run build:gb
|
|
153
|
+
npm run build:gba
|
|
154
|
+
npm run retro:explain
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
Aura Retro projects build through the main AuraScript CLI, but they do not use
|
|
158
|
+
the default desktop play/dev wrapper flow. Treat \`aura retro check\` and
|
|
159
|
+
\`aura build --target <retro-target>\` as the primary development loop.
|
|
160
|
+
|
|
161
|
+
${workflowSection}
|
|
162
|
+
## Template Summary
|
|
163
|
+
|
|
164
|
+
${templateMetadata.summary}
|
|
165
|
+
|
|
166
|
+
## Controls
|
|
167
|
+
|
|
168
|
+
${controls}
|
|
169
|
+
|
|
170
|
+
## First Edits
|
|
171
|
+
|
|
172
|
+
${firstEdits}
|
|
173
|
+
`;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function renderRetroProjectRunbook({ projectTitle, template, templateMetadata }) {
|
|
177
|
+
const firstEdits = templateMetadata.firstEdits.map((line) => `1. ${line}`).join('\n');
|
|
178
|
+
const requiredApis = templateMetadata.requiredApis.map((entry) => `- \`${entry}\``).join('\n');
|
|
179
|
+
const workflowSection = renderTemplateWorkflowSection(templateMetadata);
|
|
180
|
+
return `# ${projectTitle} Runbook
|
|
181
|
+
|
|
182
|
+
Template: \`${template}\`
|
|
183
|
+
|
|
184
|
+
## First 30 Minutes
|
|
185
|
+
|
|
186
|
+
1. Run \`npm run retro:check\` from the project root and make sure the initial template is clean.
|
|
187
|
+
1. Build the default color target with \`npm run build:gbc\`.
|
|
188
|
+
1. If you want the stricter mono profile, rerun with \`npm run build:gb\`.
|
|
189
|
+
1. Keep edits inside \`src/main.js\` and \`assets/retro/assets.json\` until the core loop feels right.
|
|
190
|
+
|
|
191
|
+
${workflowSection}
|
|
192
|
+
## First-Hour Implementation Pass
|
|
193
|
+
|
|
194
|
+
${firstEdits}
|
|
195
|
+
|
|
196
|
+
## Capability Contract
|
|
197
|
+
|
|
198
|
+
The current template assumes the retro-safe API surface below:
|
|
199
|
+
|
|
200
|
+
${requiredApis}
|
|
201
|
+
|
|
202
|
+
## Build Targets
|
|
203
|
+
|
|
204
|
+
1. \`npm run retro:check\` validates the current project against the shipped retro checks.
|
|
205
|
+
1. \`npm run build:gbc\` emits the default Game Boy Color ROM artifact bundle.
|
|
206
|
+
1. \`npm run build:gb\` reruns the stricter original Game Boy profile.
|
|
207
|
+
1. \`npm run build:gba\` emits a \`.gba\` ROM plus the Retro IR, asset manifest, and generated preview source bundle.
|
|
208
|
+
`;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function renderStateOwnershipSection() {
|
|
212
|
+
return `## State Ownership TL;DR
|
|
213
|
+
|
|
214
|
+
- \`aura\` is the runtime API.
|
|
215
|
+
- \`src/runtime/app-state.js\` owns shared mutable \`appState\` and normalizes the \`session\`, \`ui\`, and \`runtime\` buckets.
|
|
216
|
+
- \`context.ensureSessionState(...)\` / \`context.getSessionState(...)\` own shared gameplay/session state in \`appState.session\`.
|
|
217
|
+
- \`context.ensureUiState(...)\` / \`context.getUiState(...)\` own shared UI/presentation state in \`appState.ui\`.
|
|
218
|
+
- \`src/runtime/ui-theme.js\` owns the canonical \`appState.ui.preferences\` seed plus theme apply/reset helpers.
|
|
219
|
+
- \`src/runtime/ui-settings.js\` packages the retained settings and action-strip helpers used by starter pause/options flows.
|
|
220
|
+
- \`src/runtime/ui-forms.js\` packages retained text-field and menu-list helpers used by starter profile, save-slot, and modal flows.
|
|
221
|
+
- \`appState.runtime\` is engine-owned scene/screen-shell metadata and should stay runtime-driven.
|
|
222
|
+
- \`sceneState\` is local mutable state owned by one scene while it is active.
|
|
223
|
+
- \`context.getCurrentScenePayload()\` reads the route-style payload used to enter the current scene.
|
|
224
|
+
- \`screenShell\` payloads are only the data passed into HUD, overlay, and modal screens.
|
|
225
|
+
- \`config/\` is for defaults and tuning.
|
|
226
|
+
- \`content/\` is for authored definitions and registries.
|
|
227
|
+
`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function renderContinuityOwnershipSection() {
|
|
231
|
+
return `## Continuity Ownership TL;DR
|
|
232
|
+
|
|
233
|
+
- \`src/runtime/app-state.js\` owns shared save/reload continuity for \`appState.session\`, \`appState.ui\`, and \`appState.runtime\`.
|
|
234
|
+
- \`src/runtime/scene-flow.js\` owns active-scene stack continuity and route payload restart handoff.
|
|
235
|
+
- \`src/runtime/screen-shell.js\` owns HUD, overlay, and modal payload continuity.
|
|
236
|
+
- \`src/runtime/ui-theme.js\` owns the scaffolded theme/preferences seam under \`appState.ui.preferences\`.
|
|
237
|
+
- \`src/runtime/ui-settings.js\` owns the shared retained settings helpers reused by starter pause/options flows.
|
|
238
|
+
- \`src/runtime/ui-forms.js\` owns the shared retained form and menu helpers reused by starter modal flows.
|
|
239
|
+
- \`scenes/*.scene.js\` should keep \`sceneState\` JSON-safe when it must survive restore.
|
|
240
|
+
- \`context.getCurrentScenePayload()\` is the read seam for payloads restored through \`sceneFlow\`.
|
|
241
|
+
- saved slots live under \`.aura/state/slots/\` and checkpoints live under \`.aura/state/checkpoints/\`.
|
|
242
|
+
- native dev restore hooks use \`aura dev --restore-slot <name>\` or \`aura dev --restore-checkpoint <name>\`.
|
|
243
|
+
`;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export function renderLargeAssetSection() {
|
|
247
|
+
return `## Publish and Large Assets
|
|
248
|
+
|
|
249
|
+
- \`npm run publish\` delegates to the engine-owned \`aura publish\` lane.
|
|
250
|
+
- AuraJS measures built asset payload size before publish. The default npm-first threshold is 50 MiB; operators can override it with \`AURA_PUBLISH_ASSET_THRESHOLD_BYTES\`.
|
|
251
|
+
- If the payload is too large, use your own HTTPS host for the heavy assets and run \`aura external-assets generate --public-base-url <url>\`.
|
|
252
|
+
- That command writes \`aura.external-assets.json\` in the project root and stages manifests plus upload records under \`.aura/external-assets/\`.
|
|
253
|
+
- Packaged \`npx <game> play\` and \`join\` hydrate self-hosted assets into a local cache before launch.
|
|
254
|
+
- Cloudflare R2 and S3 are examples only. AuraPM and \`publishv2\` remain preview-only.
|
|
255
|
+
`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function renderGenerateFilesSection(template) {
|
|
259
|
+
if (template === 'blank') {
|
|
260
|
+
return `## Generate Files
|
|
261
|
+
|
|
262
|
+
\`\`\`bash
|
|
263
|
+
npx aura make scene MainMenu
|
|
264
|
+
npx aura make ui-screen PauseMenu
|
|
265
|
+
npx aura make config EnemyTable
|
|
266
|
+
npx aura make content SpawnTable
|
|
267
|
+
npx aura explain
|
|
268
|
+
npx aura check
|
|
269
|
+
\`\`\`
|
|
270
|
+
|
|
271
|
+
Blank now ships the same authored roots as the other starters. Use the seeded
|
|
272
|
+
files as the reference structure, then grow the project with \`npx aura make\`.
|
|
273
|
+
`;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if (template === 'deckbuilder-2d') {
|
|
277
|
+
return `## Generate Files
|
|
278
|
+
|
|
279
|
+
\`\`\`bash
|
|
280
|
+
npx aura make card StrikePlus
|
|
281
|
+
npx aura make enemy JawWorm
|
|
282
|
+
npx aura make relic BurningBlood
|
|
283
|
+
npx aura make encounter Act1Hallway
|
|
284
|
+
npx aura explain
|
|
285
|
+
npx aura check
|
|
286
|
+
\`\`\`
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return `## Generate Files
|
|
291
|
+
|
|
292
|
+
\`\`\`bash
|
|
293
|
+
npx aura make scene MainMenu
|
|
294
|
+
npx aura make ui-screen PauseMenu
|
|
295
|
+
npx aura make config EnemyTable
|
|
296
|
+
npx aura make content SpawnTable
|
|
297
|
+
npx aura explain
|
|
298
|
+
npx aura check
|
|
299
|
+
\`\`\`
|
|
300
|
+
`;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function renderProjectMapSection(template) {
|
|
304
|
+
if (template === 'blank') {
|
|
305
|
+
return `- \`src/main.js\` - the authored-project bootstrap into the runtime app.
|
|
306
|
+
- \`assets/\` - imported art, audio, and starter notes.
|
|
307
|
+
- \`bin/\` - generated wrapper entrypoint.
|
|
308
|
+
- \`aura.config.json\` - identity/window/build/modules.
|
|
309
|
+
- \`aura.capabilities.json\` - canonical runtime API declaration for this scaffold.
|
|
310
|
+
- \`RUNBOOK.md\` - first-hour implementation and triage checklist.
|
|
311
|
+
- \`npx aura explain\` - inspect how the current project is wired.
|
|
312
|
+
- \`npx aura check\` - validate authored wiring before runtime.
|
|
313
|
+
- \`src/runtime/\` - runtime/bootstrap helpers plus the project and scene registries.
|
|
314
|
+
- \`src/runtime/project-registry.js\` - authored source of truth for scenes, screens, prefabs, \`configFiles\`, and \`contentFiles\`.
|
|
315
|
+
- \`src/runtime/scene-flow.js\` - active-scene continuity, stack state, and route payload handoff.
|
|
316
|
+
- \`src/runtime/screen-shell.js\` - HUD, overlay, and modal payload continuity.
|
|
317
|
+
- \`src/runtime/ui-theme.js\` - shared theme presets plus \`appState.ui.preferences\` apply/reset helpers.
|
|
318
|
+
- \`src/runtime/ui-settings.js\` - retained settings and action-strip helpers reused by starter pause/settings screens.
|
|
319
|
+
- \`src/runtime/ui-forms.js\` - retained text-field and menu-list helpers reused by starter form/menu screens.
|
|
320
|
+
- \`scenes/\` - top-level authored scenes.
|
|
321
|
+
- \`prefabs/\` - reusable gameplay blueprints and spawn descriptors.
|
|
322
|
+
- \`ui/\` - authored HUD and screen layout modules.
|
|
323
|
+
- \`config/\` - defaults and tunables.
|
|
324
|
+
- \`content/\` - authored game definitions, progression payloads, and starter-owned registries.
|
|
325
|
+
- \`content/registries/\` - starter-owned registries and future generator-owned indexes.
|
|
326
|
+
- \`src/runtime/app-state.js\` - shared mutable \`appState\` split into \`session\`, \`ui\`, and \`runtime\` buckets plus helper-backed access from scenes.`;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
return `- \`src/main.js\` - stable bootstrap seam into the authored project layout.
|
|
330
|
+
- \`src/runtime/\` - runtime/bootstrap helpers plus the project and scene registries.
|
|
331
|
+
- \`src/runtime/project-registry.js\` - authored source of truth for scenes, screens, prefabs, \`configFiles\`, and \`contentFiles\`.
|
|
332
|
+
- \`src/runtime/app-state.js\` - shared mutable \`appState\` split into \`session\`, \`ui\`, and \`runtime\` buckets plus helper-backed access from scenes.
|
|
333
|
+
- \`src/runtime/scene-flow.js\` - active-scene continuity, scene-stack restore ownership, and route payload handoff.
|
|
334
|
+
- \`src/runtime/screen-shell.js\` - HUD, overlay, and modal payload continuity ownership.
|
|
335
|
+
- \`src/runtime/ui-theme.js\` - shared theme presets plus \`appState.ui.preferences\` apply/reset helpers.
|
|
336
|
+
- \`src/runtime/ui-settings.js\` - retained settings and action-strip helpers for pause/options screens.
|
|
337
|
+
- \`src/runtime/ui-forms.js\` - retained text-field and menu-list helpers for profile, save-slot, and modal workflows.
|
|
338
|
+
- \`src/runtime/project-inspector.js\` - F1 playtest HUD for scene jumps, capture controls, and authored-runtime visibility.
|
|
339
|
+
- \`scenes/\` - top-level authored scenes.
|
|
340
|
+
- \`prefabs/\` - reusable gameplay blueprints and spawn descriptors.
|
|
341
|
+
- \`ui/\` - authored HUD and screen layout modules.
|
|
342
|
+
- \`config/\` - editable defaults and tuning payloads.
|
|
343
|
+
- \`content/\` - authored definitions, levels, registries, and progression content.
|
|
344
|
+
- \`content/registries/\` - starter-owned registry files for cards, enemies, relics, and encounters.
|
|
345
|
+
- \`src/starter-utils/\` - reusable helpers copied for non-blank templates.
|
|
346
|
+
- \`assets/starter/\` - starter asset pack and editable design payloads.
|
|
347
|
+
- \`aura.config.json\` - identity/window/build/modules.
|
|
348
|
+
- \`aura.capabilities.json\` - canonical runtime API declaration for this scaffold.
|
|
349
|
+
- \`RUNBOOK.md\` - first-hour implementation and triage checklist.`;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export function renderFirstThirtyMinutesSteps(template) {
|
|
353
|
+
if (template === 'blank') {
|
|
354
|
+
return `1. Run \`npm install\` then \`npm run dev\` and confirm the starter loop is playable.
|
|
355
|
+
1. Read \`src/main.js\`, \`src/runtime/app.js\`, \`src/runtime/app-state.js\`, \`scenes/\`, \`config/\`, \`content/\`, and \`docs/design/\` once before adding new structure.
|
|
356
|
+
1. Decide whether your next change belongs in \`appState.session\`, \`appState.ui\`, \`appState.runtime\`, \`sceneState\`, \`config/\`, or \`content/\`, and whether it must survive save or restart continuity.
|
|
357
|
+
1. Run \`npx aura explain\` once so the bootstrap stays obvious before the project grows.
|
|
358
|
+
1. Use \`npx aura make\` when you want more authored files without inventing paths.`;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (template === 'deckbuilder-2d') {
|
|
362
|
+
return `1. Run \`npm install\` then \`npm run dev\` and finish one starter battle end to end.
|
|
363
|
+
1. Read \`content/registries/\`, \`content/cards/\`, \`content/enemies/\`, and \`content/encounters/\` before changing scene flow.
|
|
364
|
+
1. Open \`src/runtime/ui-theme.js\`, \`src/runtime/ui-settings.js\`, and \`src/runtime/ui-forms.js\` before adding pause/settings or form glue of your own.
|
|
365
|
+
1. Generate one extra card or encounter with \`npx aura make\` instead of hand-creating files.
|
|
366
|
+
1. Run \`npx aura explain\` or \`npx aura check\` once so the starter-owned registries stay obvious as the project grows.
|
|
367
|
+
1. Only then move into battle polish, rewards, or meta-progression.`;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return `1. Run \`npm install\` then \`npm run dev\` and confirm the starter loop is playable.
|
|
371
|
+
1. Read \`src/main.js\`, \`src/runtime/\`, and \`scenes/\` once end-to-end before moving code around.
|
|
372
|
+
1. Open \`src/runtime/ui-theme.js\`, \`src/runtime/ui-settings.js\`, and \`src/runtime/ui-forms.js\` before inventing starter-local theme, settings, or form plumbing.
|
|
373
|
+
1. Review \`assets/starter/\`, \`config/gameplay/\`, \`content/gameplay/\`, and \`docs/design/\` and rewrite the seed content so it matches your game's nouns, tuning, and milestone goals.
|
|
374
|
+
1. Keep shared state in \`appState.session\` / \`appState.ui\`, keep route payloads in \`sceneFlow\`, and keep scene-only state inside \`sceneState\`.
|
|
375
|
+
1. Run \`npx aura explain\` or \`npx aura check\` when you want a fast map of the authored project wiring.
|
|
376
|
+
1. Press \`F1\` in the running starter to open the playtest HUD, jump between authored scenes, and use the compact capture/restart toolbar.
|
|
377
|
+
1. Use \`npx aura make scene MainMenu\` or \`npx aura make ui-screen PauseMenu\` instead of hand-making new authored file paths.`;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export function renderContentMapDoc({ template }) {
|
|
381
|
+
return `# Content Map
|
|
382
|
+
|
|
383
|
+
Template: \`${template}\`
|
|
384
|
+
|
|
385
|
+
## Authored Roots
|
|
386
|
+
|
|
387
|
+
- \`scenes/\` owns top-level app and gameplay flow.
|
|
388
|
+
- \`prefabs/\` owns reusable game object blueprints.
|
|
389
|
+
- \`ui/\` owns HUD and full-screen UI modules.
|
|
390
|
+
- \`config/gameplay/\` owns tunable gameplay payloads.
|
|
391
|
+
- \`content/gameplay/\` owns authored progression and encounter payloads.
|
|
392
|
+
- \`content/registries/\` owns starter and generator registries.
|
|
393
|
+
- \`src/runtime/\` owns bootstrap and registry adapter code.
|
|
394
|
+
- \`src/runtime/project-registry.js\` is the authored source of truth for scenes, screens, prefabs, \`configFiles\`, and \`contentFiles\`.
|
|
395
|
+
- \`src/runtime/app-state.js\` owns shared \`appState.session\`, \`appState.ui\`, and \`appState.runtime\`.
|
|
396
|
+
- \`src/runtime/scene-flow.js\` owns active-scene continuity and route payload handoff.
|
|
397
|
+
- \`src/runtime/screen-shell.js\` owns HUD, overlay, and modal payload continuity.
|
|
398
|
+
- \`src/runtime/ui-theme.js\` owns shared theme presets and \`appState.ui.preferences\`.
|
|
399
|
+
- \`src/runtime/ui-settings.js\` owns retained settings and action-strip helpers for pause/options flows.
|
|
400
|
+
- \`src/runtime/ui-forms.js\` owns retained text-field and menu-list helpers for starter form/menu flows.
|
|
401
|
+
- \`src/runtime/scene-registry.js\` adapts authored scene registration for runtime use.
|
|
402
|
+
- \`src/runtime/project-inspector.js\` exposes the live F1 playtest HUD.
|
|
403
|
+
- authored scenes read shared state with \`ensureSessionState\`, \`ensureUiState\`, and \`getCurrentScenePayload()\`.
|
|
404
|
+
|
|
405
|
+
## Current Starter Inventory
|
|
406
|
+
|
|
407
|
+
- \`scenes/boot.scene.js\`
|
|
408
|
+
- \`scenes/gameplay.scene.js\`
|
|
409
|
+
- \`prefabs/player.prefab.js\`
|
|
410
|
+
- \`ui/hud.screen.js\`
|
|
411
|
+
- \`ui/settings.screen.js\` when the starter ships retained settings flow
|
|
412
|
+
- \`config/gameplay/game.config.json\`
|
|
413
|
+
- \`src/runtime/project-registry.js\`
|
|
414
|
+
- \`src/runtime/project-inspector.js\`
|
|
415
|
+
`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export function renderGamePillarsDoc({ projectTitle, templateMetadata }) {
|
|
419
|
+
return `# Game Pillars
|
|
420
|
+
|
|
421
|
+
## Project
|
|
422
|
+
|
|
423
|
+
- Title: ${projectTitle}
|
|
424
|
+
- Starter summary: ${templateMetadata.summary}
|
|
425
|
+
|
|
426
|
+
## Pillars
|
|
427
|
+
|
|
428
|
+
1. Tight core loop with fast iteration on tuning values.
|
|
429
|
+
1. Clear ownership between \`appState.session/ui/runtime\`, \`sceneState\`, route/UI payloads, config, and content.
|
|
430
|
+
1. Plain-JS files that stay easy to edit with agents and code review.
|
|
431
|
+
|
|
432
|
+
## First Questions
|
|
433
|
+
|
|
434
|
+
- What should the player accomplish in the first 60 seconds?
|
|
435
|
+
- Which starter constant should become config first?
|
|
436
|
+
- Which authored file should become the team's daily home base?
|
|
437
|
+
`;
|
|
438
|
+
}
|