@auraindustry/aurajs 0.0.6 → 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 +103 -7
- 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,1000 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const SCAFFOLD_DIR = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const CLI_SRC_DIR = resolve(SCAFFOLD_DIR, '..');
|
|
6
|
+
const CLI_PACKAGE = JSON.parse(readFileSync(resolve(CLI_SRC_DIR, '../package.json'), 'utf8'));
|
|
7
|
+
const CLI_PACKAGE_VERSION = CLI_PACKAGE.version;
|
|
8
|
+
|
|
9
|
+
export const LEGACY_STARTER_TEMPLATE_DIR = resolve(CLI_SRC_DIR, '../templates/starter');
|
|
10
|
+
|
|
11
|
+
export const CREATE_TEMPLATE_DIRS = {
|
|
12
|
+
'2d-adventure': resolve(CLI_SRC_DIR, '../templates/create/2d-adventure'),
|
|
13
|
+
'2d-shooter': resolve(CLI_SRC_DIR, '../templates/create/2d'),
|
|
14
|
+
'2d-survivor': resolve(CLI_SRC_DIR, '../templates/create/2d-survivor'),
|
|
15
|
+
'deckbuilder-2d': resolve(CLI_SRC_DIR, '../templates/create/deckbuilder-2d'),
|
|
16
|
+
'3d-adventure': resolve(CLI_SRC_DIR, '../templates/create/3d-adventure'),
|
|
17
|
+
'3d-platformer': resolve(CLI_SRC_DIR, '../templates/create/3d'),
|
|
18
|
+
'3d-collectathon': resolve(CLI_SRC_DIR, '../templates/create/3d-collectathon'),
|
|
19
|
+
'video-cutscene': resolve(CLI_SRC_DIR, '../templates/create/video-cutscene'),
|
|
20
|
+
blank: resolve(CLI_SRC_DIR, '../templates/create/blank'),
|
|
21
|
+
'local-multiplayer': resolve(CLI_SRC_DIR, '../templates/create/local-multiplayer'),
|
|
22
|
+
'retro-topdown-adventure': resolve(CLI_SRC_DIR, '../templates/retro/topdown-adventure'),
|
|
23
|
+
'retro-puzzle-grid': resolve(CLI_SRC_DIR, '../templates/retro/puzzle-grid'),
|
|
24
|
+
'retro-tactics-grid': resolve(CLI_SRC_DIR, '../templates/retro/tactics-grid'),
|
|
25
|
+
'retro-platformer': resolve(CLI_SRC_DIR, '../templates/retro/platformer'),
|
|
26
|
+
};
|
|
27
|
+
export const CREATE_SHARED_TEMPLATE_DIR = resolve(CLI_SRC_DIR, '../templates/create/shared');
|
|
28
|
+
|
|
29
|
+
const CREATE_TEMPLATE_ALIASES = {
|
|
30
|
+
'2d': '2d-adventure',
|
|
31
|
+
'2d-adventure': '2d-adventure',
|
|
32
|
+
'2d adventure': '2d-adventure',
|
|
33
|
+
'adventure-2d': '2d-adventure',
|
|
34
|
+
adventure2d: '2d-adventure',
|
|
35
|
+
shooter: '2d-shooter',
|
|
36
|
+
'2d shooter': '2d-shooter',
|
|
37
|
+
'2d-shooter': '2d-shooter',
|
|
38
|
+
'2d-survivor': '2d-survivor',
|
|
39
|
+
survivor: '2d-survivor',
|
|
40
|
+
'2d survival': '2d-survivor',
|
|
41
|
+
'2d-survival': '2d-survivor',
|
|
42
|
+
topdown: '2d-survivor',
|
|
43
|
+
'top-down': '2d-survivor',
|
|
44
|
+
'deckbuilder': 'deckbuilder-2d',
|
|
45
|
+
deckbuilder: 'deckbuilder-2d',
|
|
46
|
+
'deckbuilder-2d': 'deckbuilder-2d',
|
|
47
|
+
'card battler': 'deckbuilder-2d',
|
|
48
|
+
slaylike: 'deckbuilder-2d',
|
|
49
|
+
'3d': '3d-adventure',
|
|
50
|
+
'3d-adventure': '3d-adventure',
|
|
51
|
+
'3d adventure': '3d-adventure',
|
|
52
|
+
'adventure-3d': '3d-adventure',
|
|
53
|
+
adventure3d: '3d-adventure',
|
|
54
|
+
platformer: '3d-platformer',
|
|
55
|
+
platformers: '3d-platformer',
|
|
56
|
+
'3d platformer': '3d-platformer',
|
|
57
|
+
'3d platformers': '3d-platformer',
|
|
58
|
+
'3d-platformer': '3d-platformer',
|
|
59
|
+
'3d-collectathon': '3d-collectathon',
|
|
60
|
+
collectathon: '3d-collectathon',
|
|
61
|
+
explorer: '3d-collectathon',
|
|
62
|
+
exploration: '3d-collectathon',
|
|
63
|
+
'3d collectathon': '3d-collectathon',
|
|
64
|
+
'3d explorer': '3d-collectathon',
|
|
65
|
+
video: 'video-cutscene',
|
|
66
|
+
'video-cutscene': 'video-cutscene',
|
|
67
|
+
cutscene: 'video-cutscene',
|
|
68
|
+
cinematic: 'video-cutscene',
|
|
69
|
+
'video cutscene': 'video-cutscene',
|
|
70
|
+
mp4: 'video-cutscene',
|
|
71
|
+
blank: 'blank',
|
|
72
|
+
empty: 'blank',
|
|
73
|
+
'local-multiplayer': 'local-multiplayer',
|
|
74
|
+
multiplayer: 'local-multiplayer',
|
|
75
|
+
'room-code': 'local-multiplayer',
|
|
76
|
+
room: 'local-multiplayer',
|
|
77
|
+
retro: 'retro-topdown-adventure',
|
|
78
|
+
gb: 'retro-topdown-adventure',
|
|
79
|
+
gbc: 'retro-topdown-adventure',
|
|
80
|
+
gba: 'retro-topdown-adventure',
|
|
81
|
+
'retro-topdown': 'retro-topdown-adventure',
|
|
82
|
+
'retro-topdown-adventure': 'retro-topdown-adventure',
|
|
83
|
+
'gb-topdown': 'retro-topdown-adventure',
|
|
84
|
+
'gbc-topdown': 'retro-topdown-adventure',
|
|
85
|
+
'gba-topdown': 'retro-topdown-adventure',
|
|
86
|
+
'retro-puzzle': 'retro-puzzle-grid',
|
|
87
|
+
'retro-puzzle-grid': 'retro-puzzle-grid',
|
|
88
|
+
'gb-puzzle': 'retro-puzzle-grid',
|
|
89
|
+
'gbc-puzzle': 'retro-puzzle-grid',
|
|
90
|
+
'gba-puzzle': 'retro-puzzle-grid',
|
|
91
|
+
'retro-tactics': 'retro-tactics-grid',
|
|
92
|
+
'retro-tactics-grid': 'retro-tactics-grid',
|
|
93
|
+
'gb-tactics': 'retro-tactics-grid',
|
|
94
|
+
'gbc-tactics': 'retro-tactics-grid',
|
|
95
|
+
'gba-tactics': 'retro-tactics-grid',
|
|
96
|
+
'retro-platformer': 'retro-platformer',
|
|
97
|
+
'gb-platformer': 'retro-platformer',
|
|
98
|
+
'gbc-platformer': 'retro-platformer',
|
|
99
|
+
'gba-platformer': 'retro-platformer',
|
|
100
|
+
};
|
|
101
|
+
const CREATE_TEMPLATE_ALIAS_HINTS = ['2d', '3d', 'shooter', 'survivor', 'deckbuilder', 'platformer', 'collectathon', 'video', 'cutscene', 'blank', 'empty', 'multiplayer', 'room-code', 'retro', 'gba', 'retro-platformer'];
|
|
102
|
+
|
|
103
|
+
const ROOT_SKILLS_DIR = resolve(CLI_SRC_DIR, '../../../skills');
|
|
104
|
+
const PACKAGED_SKILLS_DIR = resolve(CLI_SRC_DIR, '../templates/skills');
|
|
105
|
+
const PLAY_BIN_TEMPLATE_PATH = resolve(CLI_SRC_DIR, '../templates/create-bin/play.js');
|
|
106
|
+
|
|
107
|
+
export const GITIGNORE_TEMPLATE = `# Dependencies\nnode_modules/\n\n# Build output\nbuild/\n.aura/\n\n# Runtime logs\n.logs/\n*.log\nnpm-debug.log*\n\n# Local env\n.env\n.env.*\n`;
|
|
108
|
+
export const PLAY_BIN_TEMPLATE = readFileSync(PLAY_BIN_TEMPLATE_PATH, 'utf8');
|
|
109
|
+
const CREATE_TEMPLATE_METADATA = {
|
|
110
|
+
'2d-adventure': {
|
|
111
|
+
summary: 'Top-down exploration starter with relic collection, beacon activation, and authored room layout.',
|
|
112
|
+
controls: [
|
|
113
|
+
'Move: Arrow keys or WASD',
|
|
114
|
+
'Interact: E or Enter',
|
|
115
|
+
'Toggle controls hint: H',
|
|
116
|
+
'Restart: Enter (after route clear)',
|
|
117
|
+
],
|
|
118
|
+
firstEdits: [
|
|
119
|
+
'Rewrite the room nouns in content/gameplay/world.js before adding more mechanics.',
|
|
120
|
+
'Tune movement feel and prompt reach in config/gameplay/adventure.config.js.',
|
|
121
|
+
'Replace beacon, relic, and gate presentation in prefabs/world.prefab.js and prefabs/relic.prefab.js.',
|
|
122
|
+
],
|
|
123
|
+
keywords: ['2d', 'adventure', 'exploration'],
|
|
124
|
+
requiredApis: [
|
|
125
|
+
'aura.window.getFPS',
|
|
126
|
+
'aura.input.isKeyDown',
|
|
127
|
+
'aura.input.isKeyPressed',
|
|
128
|
+
'aura.draw2d.clear',
|
|
129
|
+
'aura.draw2d.rect',
|
|
130
|
+
'aura.draw2d.text',
|
|
131
|
+
'aura.draw2d.measureText',
|
|
132
|
+
'aura.rgb',
|
|
133
|
+
'aura.rgba',
|
|
134
|
+
'aura.Color.WHITE',
|
|
135
|
+
],
|
|
136
|
+
starterAssetPlan: {
|
|
137
|
+
file: 'ruins-route.json',
|
|
138
|
+
title: '2D Adventure Route Notes',
|
|
139
|
+
steps: [
|
|
140
|
+
'Keep your first relic and beacon route readable here before you spread rules across more files.',
|
|
141
|
+
'Mirror any stable ids in content/gameplay/world.js once the route stops changing every day.',
|
|
142
|
+
],
|
|
143
|
+
payload: {
|
|
144
|
+
relicRoute: [
|
|
145
|
+
{ id: 'survey-lens', beat: 'north-room', x: 214, y: 190 },
|
|
146
|
+
{ id: 'signal-reel', beat: 'water-crossing', x: 546, y: 152 },
|
|
147
|
+
{ id: 'chorus-map', beat: 'east-court', x: 930, y: 352 },
|
|
148
|
+
{ id: 'dawn-key', beat: 'south-exit', x: 792, y: 548 },
|
|
149
|
+
],
|
|
150
|
+
beacons: [
|
|
151
|
+
{ id: 'north-brazier', unlockRelics: 1 },
|
|
152
|
+
{ id: 'east-brazier', unlockRelics: 3 },
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
optionalModules: {
|
|
157
|
+
network: false,
|
|
158
|
+
},
|
|
159
|
+
configModules: {
|
|
160
|
+
network: false,
|
|
161
|
+
},
|
|
162
|
+
workflowTitle: '2D Adventure Authoring Loop',
|
|
163
|
+
workflowSteps: [
|
|
164
|
+
'Run `npm run dev` and finish one full route clear before editing structure.',
|
|
165
|
+
'Rename the room, relic, beacon, and gate nouns in content/gameplay/world.js to match your own game.',
|
|
166
|
+
'Only after the route reads well should you add more encounters, UI layers, or save rules.',
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
'2d-shooter': {
|
|
170
|
+
summary: 'Arcade shooter baseline with waves, score, and lives loop.',
|
|
171
|
+
controls: [
|
|
172
|
+
'Move: Arrow keys or WASD',
|
|
173
|
+
'Fire: Space or Z',
|
|
174
|
+
'Restart: Enter (after game over)',
|
|
175
|
+
],
|
|
176
|
+
firstEdits: [
|
|
177
|
+
'Tune encounter pacing in config/gameplay/shooter.config.js.',
|
|
178
|
+
'Adjust player and enemy behavior in prefabs/player.prefab.js and prefabs/enemies.prefab.js.',
|
|
179
|
+
'Swap starter palette and HUD text in ui/hud.screen.js.',
|
|
180
|
+
],
|
|
181
|
+
keywords: ['2d', 'shooter', 'arcade'],
|
|
182
|
+
requiredApis: [
|
|
183
|
+
'aura.window.getSize',
|
|
184
|
+
'aura.window.getFPS',
|
|
185
|
+
'aura.input.isKeyDown',
|
|
186
|
+
'aura.input.isKeyPressed',
|
|
187
|
+
'aura.draw2d.clear',
|
|
188
|
+
'aura.draw2d.rect',
|
|
189
|
+
'aura.draw2d.text',
|
|
190
|
+
'aura.draw2d.measureText',
|
|
191
|
+
'aura.rgb',
|
|
192
|
+
'aura.rgba',
|
|
193
|
+
'aura.Color.WHITE',
|
|
194
|
+
],
|
|
195
|
+
starterAssetPlan: {
|
|
196
|
+
file: 'wave-plan.json',
|
|
197
|
+
title: '2D Shooter Wave Plan',
|
|
198
|
+
steps: [
|
|
199
|
+
'Replace this JSON with your own wave progression and enemy mix.',
|
|
200
|
+
'Load this file in game logic after adding your preferred file-loading flow.',
|
|
201
|
+
],
|
|
202
|
+
payload: {
|
|
203
|
+
waves: [
|
|
204
|
+
{ id: 'intro', maxSpawns: 9, spawnEvery: 0.62, archetype: 'scout' },
|
|
205
|
+
{ id: 'pressure', maxSpawns: 10, spawnEvery: 0.56, archetype: 'striker' },
|
|
206
|
+
{ id: 'anchor', maxSpawns: 8, spawnEvery: 0.74, archetype: 'tank' },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
'2d-survivor': {
|
|
212
|
+
summary: 'Top-down auto-fire survival loop tuned for quick iteration.',
|
|
213
|
+
controls: [
|
|
214
|
+
'Move: Arrow keys or WASD',
|
|
215
|
+
'Dash: Shift',
|
|
216
|
+
'Restart: Enter (after game over)',
|
|
217
|
+
],
|
|
218
|
+
firstEdits: [
|
|
219
|
+
'Adjust spawn pressure in config/gameplay/survivor.config.js.',
|
|
220
|
+
'Tune dash timings and player feel in prefabs/player.prefab.js.',
|
|
221
|
+
'Extend enemy archetypes in prefabs/enemies.prefab.js.',
|
|
222
|
+
],
|
|
223
|
+
keywords: ['2d', 'survivor', 'topdown'],
|
|
224
|
+
requiredApis: [
|
|
225
|
+
'aura.window.getSize',
|
|
226
|
+
'aura.window.getFPS',
|
|
227
|
+
'aura.input.isKeyDown',
|
|
228
|
+
'aura.input.isKeyPressed',
|
|
229
|
+
'aura.draw2d.clear',
|
|
230
|
+
'aura.draw2d.rect',
|
|
231
|
+
'aura.draw2d.text',
|
|
232
|
+
'aura.draw2d.measureText',
|
|
233
|
+
'aura.rgb',
|
|
234
|
+
'aura.rgba',
|
|
235
|
+
'aura.Color.WHITE',
|
|
236
|
+
],
|
|
237
|
+
starterAssetPlan: {
|
|
238
|
+
file: 'survivor-zones.json',
|
|
239
|
+
title: '2D Survivor Spawn Zones',
|
|
240
|
+
steps: [
|
|
241
|
+
'Use these zones to bias enemy spawns by map phase.',
|
|
242
|
+
'Add your own tags (boss, swarm, elite) and branch in update().',
|
|
243
|
+
],
|
|
244
|
+
payload: {
|
|
245
|
+
zones: [
|
|
246
|
+
{ id: 'north-lane', x: 0.5, y: 0.08, weight: 1.0 },
|
|
247
|
+
{ id: 'east-lane', x: 0.92, y: 0.52, weight: 1.2 },
|
|
248
|
+
{ id: 'south-lane', x: 0.5, y: 0.94, weight: 1.0 },
|
|
249
|
+
{ id: 'west-lane', x: 0.08, y: 0.52, weight: 1.1 },
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
'deckbuilder-2d': {
|
|
255
|
+
summary: 'Combat-first card battler starter with authored cards, enemy intents, relic seed data, and starter-owned content registries.',
|
|
256
|
+
controls: [
|
|
257
|
+
'Start battle: Space or Enter from boot scene',
|
|
258
|
+
'Play cards: 1-5',
|
|
259
|
+
'End turn: Enter or Space during combat',
|
|
260
|
+
'Restart battle: R',
|
|
261
|
+
'Return to boot: Esc',
|
|
262
|
+
],
|
|
263
|
+
firstEdits: [
|
|
264
|
+
'Tune shared knobs in config/gameplay/deckbuilder.config.js and content nouns in content/cards/, content/enemies/, content/relics/, and content/encounters/.',
|
|
265
|
+
'Use `npx aura make card`, `enemy`, `relic`, and `encounter` to grow content families without hand-editing registry files.',
|
|
266
|
+
'Extend the combat presentation in scenes/gameplay.scene.js and ui/hud.screen.js only after the content nouns feel right.',
|
|
267
|
+
],
|
|
268
|
+
keywords: ['deckbuilder', 'cards', 'combat', '2d'],
|
|
269
|
+
requiredApis: [
|
|
270
|
+
'aura.window.getSize',
|
|
271
|
+
'aura.input.isKeyPressed',
|
|
272
|
+
'aura.draw2d.rectFill',
|
|
273
|
+
'aura.draw2d.text',
|
|
274
|
+
'aura.rgb',
|
|
275
|
+
'aura.rgba',
|
|
276
|
+
'aura.Color.WHITE',
|
|
277
|
+
],
|
|
278
|
+
starterAssetPlan: {
|
|
279
|
+
file: 'deckbuilder-art-pack.json',
|
|
280
|
+
title: 'Deckbuilder Starter Art Pack',
|
|
281
|
+
steps: [
|
|
282
|
+
'Replace placeholder cards and enemy panels only after the content nouns in content/ feel stable.',
|
|
283
|
+
'Keep one card frame, one arena backdrop, and one intent icon set as the first art milestone.',
|
|
284
|
+
],
|
|
285
|
+
payload: {
|
|
286
|
+
cardFrames: ['starter-common', 'starter-skill'],
|
|
287
|
+
enemyPanels: ['training-automaton'],
|
|
288
|
+
iconSet: ['energy', 'block', 'draw', 'intent-attack', 'intent-block'],
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
optionalModules: {
|
|
292
|
+
network: false,
|
|
293
|
+
multiplayer: false,
|
|
294
|
+
},
|
|
295
|
+
configModules: {
|
|
296
|
+
network: false,
|
|
297
|
+
},
|
|
298
|
+
workflowTitle: 'Deckbuilder Authoring Loop',
|
|
299
|
+
workflowSteps: [
|
|
300
|
+
'Run `npm run dev` and play the starter battle before adding new systems.',
|
|
301
|
+
'Inspect the seeded content in `content/registries/` and `content/cards/`, then grow it with `npx aura make card|enemy|relic|encounter`.',
|
|
302
|
+
'Use `npx aura explain` or `npx aura check` when you want a truthful map of starter-owned registries and generated content.',
|
|
303
|
+
],
|
|
304
|
+
},
|
|
305
|
+
'3d-adventure': {
|
|
306
|
+
summary: 'Third-person route starter with relic collection, beacon activation, pause flow, and authored checkpoint recovery.',
|
|
307
|
+
controls: [
|
|
308
|
+
'Move: Arrow keys or WASD',
|
|
309
|
+
'Run: Shift',
|
|
310
|
+
'Jump: Space',
|
|
311
|
+
'Interact: E or Enter',
|
|
312
|
+
'Pause: Esc',
|
|
313
|
+
'Restart: Enter (after route clear)',
|
|
314
|
+
],
|
|
315
|
+
firstEdits: [
|
|
316
|
+
'Rewrite the route, relic, beacon, and arch nouns in content/gameplay/course.js before chasing polish.',
|
|
317
|
+
'Tune prompt radii and route pacing in config/gameplay/adventure.config.js.',
|
|
318
|
+
'Swap or retarget assets/models/starter-avatar.gltf and update the visual binding in prefabs/player.prefab.js.',
|
|
319
|
+
],
|
|
320
|
+
keywords: ['3d', 'adventure', 'exploration'],
|
|
321
|
+
requiredApis: [
|
|
322
|
+
'aura.window.getSize',
|
|
323
|
+
'aura.mesh.createBox',
|
|
324
|
+
'aura.material.create',
|
|
325
|
+
'aura.light.ambient',
|
|
326
|
+
'aura.light.directional',
|
|
327
|
+
'aura.camera3d.perspective',
|
|
328
|
+
'aura.camera3d.setPosition',
|
|
329
|
+
'aura.camera3d.lookAt',
|
|
330
|
+
'aura.character3d.create',
|
|
331
|
+
'aura.character3d.move',
|
|
332
|
+
'aura.character3d.jump',
|
|
333
|
+
'aura.character3d.update',
|
|
334
|
+
'aura.character3d.getState',
|
|
335
|
+
'aura.character3d.setPosition',
|
|
336
|
+
'aura.character3d.addObstacle',
|
|
337
|
+
'aura.character3d.clearObstacles',
|
|
338
|
+
'aura.input.isKeyDown',
|
|
339
|
+
'aura.input.isKeyPressed',
|
|
340
|
+
'aura.scene3d.loadGltfScene',
|
|
341
|
+
'aura.scene3d.getImportedScene',
|
|
342
|
+
'aura.scene3d.playImportedAnimation',
|
|
343
|
+
'aura.scene3d.setLocalTransform',
|
|
344
|
+
'aura.scene3d.updateClips',
|
|
345
|
+
'aura.scene3d.submitRenderBindings',
|
|
346
|
+
'aura.draw3d.clear3d',
|
|
347
|
+
'aura.draw3d.drawMesh',
|
|
348
|
+
'aura.draw2d.rect',
|
|
349
|
+
'aura.draw2d.text',
|
|
350
|
+
'aura.draw2d.measureText',
|
|
351
|
+
'aura.rgb',
|
|
352
|
+
'aura.rgba',
|
|
353
|
+
'aura.Color.WHITE',
|
|
354
|
+
],
|
|
355
|
+
starterAssetPlan: {
|
|
356
|
+
file: 'signal-route.json',
|
|
357
|
+
title: '3D Adventure Route Notes',
|
|
358
|
+
steps: [
|
|
359
|
+
'Plan the first checkpoint-to-arch route here before you spread it into more runtime files.',
|
|
360
|
+
'Track which relic or beacon beats are mandatory so restart and save work stays honest later.',
|
|
361
|
+
],
|
|
362
|
+
payload: {
|
|
363
|
+
relicRoute: [
|
|
364
|
+
{ id: 'anchor-relay', beat: 'lower-cliff', x: -3.8, y: 2.5, z: 3.0 },
|
|
365
|
+
{ id: 'glass-map', beat: 'mid-span', x: 1.1, y: 3.4, z: 1.0 },
|
|
366
|
+
{ id: 'pulse-key', beat: 'east-rise', x: 4.8, y: 4.3, z: -1.8 },
|
|
367
|
+
{ id: 'sky-spindle', beat: 'summit', x: -1.2, y: 5.3, z: -3.6 },
|
|
368
|
+
],
|
|
369
|
+
beacons: [
|
|
370
|
+
{ id: 'cliff-beacon', unlockRelics: 2 },
|
|
371
|
+
{ id: 'summit-beacon', unlockRelics: 4 },
|
|
372
|
+
],
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
optionalModules: {
|
|
376
|
+
network: false,
|
|
377
|
+
},
|
|
378
|
+
configModules: {
|
|
379
|
+
network: false,
|
|
380
|
+
},
|
|
381
|
+
workflowTitle: '3D Adventure Authoring Loop',
|
|
382
|
+
workflowSteps: [
|
|
383
|
+
'Run `npm run dev` and clear the full relic-beacon-arch route before editing structure.',
|
|
384
|
+
'Rename the route nouns in content/gameplay/course.js and keep any new tuning in config/gameplay/adventure.config.js.',
|
|
385
|
+
'Only after the authored route feels right should you move into richer imported scenes, VFX, or cinematic beats.',
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
'3d-platformer': {
|
|
389
|
+
summary: '3D checkpoint platformer loop with an imported animated starter avatar and moving platform primitives.',
|
|
390
|
+
controls: [
|
|
391
|
+
'Move: Arrow keys or WASD',
|
|
392
|
+
'Run: Shift',
|
|
393
|
+
'Jump: Space',
|
|
394
|
+
'Restart: Enter (after goal)',
|
|
395
|
+
],
|
|
396
|
+
firstEdits: [
|
|
397
|
+
'Adjust traversal beats in content/gameplay/course.js.',
|
|
398
|
+
'Tune camera offsets, clip flow, and avatar input in prefabs/player.prefab.js and scenes/gameplay.scene.js.',
|
|
399
|
+
'Swap world materials or replace assets/models/starter-avatar.gltf with your own imported character.',
|
|
400
|
+
],
|
|
401
|
+
keywords: ['3d', 'platformer', 'checkpoint'],
|
|
402
|
+
requiredApis: [
|
|
403
|
+
'aura.mesh.createBox',
|
|
404
|
+
'aura.material.create',
|
|
405
|
+
'aura.light.ambient',
|
|
406
|
+
'aura.light.directional',
|
|
407
|
+
'aura.camera3d.perspective',
|
|
408
|
+
'aura.camera3d.setPosition',
|
|
409
|
+
'aura.camera3d.lookAt',
|
|
410
|
+
'aura.character3d.create',
|
|
411
|
+
'aura.character3d.move',
|
|
412
|
+
'aura.character3d.jump',
|
|
413
|
+
'aura.character3d.update',
|
|
414
|
+
'aura.character3d.getState',
|
|
415
|
+
'aura.character3d.setPosition',
|
|
416
|
+
'aura.character3d.addObstacle',
|
|
417
|
+
'aura.character3d.clearObstacles',
|
|
418
|
+
'aura.input.isKeyDown',
|
|
419
|
+
'aura.input.isKeyPressed',
|
|
420
|
+
'aura.scene3d.loadGltfScene',
|
|
421
|
+
'aura.scene3d.getImportedScene',
|
|
422
|
+
'aura.scene3d.playImportedAnimation',
|
|
423
|
+
'aura.scene3d.setLocalTransform',
|
|
424
|
+
'aura.scene3d.updateClips',
|
|
425
|
+
'aura.scene3d.submitRenderBindings',
|
|
426
|
+
'aura.draw3d.clear3d',
|
|
427
|
+
'aura.draw3d.drawMesh',
|
|
428
|
+
'aura.draw2d.text',
|
|
429
|
+
'aura.draw2d.measureText',
|
|
430
|
+
'aura.rgb',
|
|
431
|
+
'aura.Color.WHITE',
|
|
432
|
+
],
|
|
433
|
+
starterAssetPlan: {
|
|
434
|
+
file: 'checkpoint-route.json',
|
|
435
|
+
title: '3D Platformer Route Notes',
|
|
436
|
+
steps: [
|
|
437
|
+
'Use this path list to plan encounter/collectible placement between checkpoints.',
|
|
438
|
+
'Attach analytics ids if you track failed jump segments.',
|
|
439
|
+
],
|
|
440
|
+
payload: {
|
|
441
|
+
path: [
|
|
442
|
+
{ id: 'spawn', x: 0.0, y: 1.1, z: 5.5 },
|
|
443
|
+
{ id: 'ridge-a', x: -3.2, y: 2.0, z: -2.4 },
|
|
444
|
+
{ id: 'ridge-b', x: 1.4, y: 3.2, z: -0.8 },
|
|
445
|
+
{ id: 'goal', x: 4.4, y: 4.8, z: -3.0 },
|
|
446
|
+
],
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
'3d-collectathon': {
|
|
451
|
+
summary: '3D collection race starter with an imported animated avatar, timer pressure, and checkpoint fallback.',
|
|
452
|
+
controls: [
|
|
453
|
+
'Move: Arrow keys or WASD',
|
|
454
|
+
'Run: Shift',
|
|
455
|
+
'Jump: Space',
|
|
456
|
+
'Restart: Enter (after clear/failure)',
|
|
457
|
+
],
|
|
458
|
+
firstEdits: [
|
|
459
|
+
'Add world pieces and route tuning in content/gameplay/course.js.',
|
|
460
|
+
'Balance collectible cadence, avatar pacing, and timer rules in scenes/gameplay.scene.js.',
|
|
461
|
+
'Replace assets/models/starter-avatar.gltf or retarget the clip map in prefabs/player.prefab.js.',
|
|
462
|
+
],
|
|
463
|
+
keywords: ['3d', 'collectathon', 'exploration'],
|
|
464
|
+
requiredApis: [
|
|
465
|
+
'aura.mesh.createBox',
|
|
466
|
+
'aura.material.create',
|
|
467
|
+
'aura.light.ambient',
|
|
468
|
+
'aura.light.directional',
|
|
469
|
+
'aura.camera3d.perspective',
|
|
470
|
+
'aura.camera3d.setPosition',
|
|
471
|
+
'aura.camera3d.lookAt',
|
|
472
|
+
'aura.character3d.create',
|
|
473
|
+
'aura.character3d.move',
|
|
474
|
+
'aura.character3d.jump',
|
|
475
|
+
'aura.character3d.update',
|
|
476
|
+
'aura.character3d.getState',
|
|
477
|
+
'aura.character3d.setPosition',
|
|
478
|
+
'aura.character3d.addObstacle',
|
|
479
|
+
'aura.character3d.clearObstacles',
|
|
480
|
+
'aura.input.isKeyDown',
|
|
481
|
+
'aura.input.isKeyPressed',
|
|
482
|
+
'aura.scene3d.loadGltfScene',
|
|
483
|
+
'aura.scene3d.getImportedScene',
|
|
484
|
+
'aura.scene3d.playImportedAnimation',
|
|
485
|
+
'aura.scene3d.setLocalTransform',
|
|
486
|
+
'aura.scene3d.updateClips',
|
|
487
|
+
'aura.scene3d.submitRenderBindings',
|
|
488
|
+
'aura.draw3d.clear3d',
|
|
489
|
+
'aura.draw3d.drawMesh',
|
|
490
|
+
'aura.draw2d.text',
|
|
491
|
+
'aura.draw2d.measureText',
|
|
492
|
+
'aura.rgb',
|
|
493
|
+
'aura.Color.WHITE',
|
|
494
|
+
],
|
|
495
|
+
starterAssetPlan: {
|
|
496
|
+
file: 'collectible-layout.json',
|
|
497
|
+
title: '3D Collectathon Layout Plan',
|
|
498
|
+
steps: [
|
|
499
|
+
'Extend this list with your final collectible and checkpoint route.',
|
|
500
|
+
'Optionally mirror ids in your quest/state system for save/load.',
|
|
501
|
+
],
|
|
502
|
+
payload: {
|
|
503
|
+
collectibles: [
|
|
504
|
+
{ id: 'orb-a', x: -2.8, y: 1.8, z: 2.2, value: 1 },
|
|
505
|
+
{ id: 'orb-b', x: 2.4, y: 2.4, z: 0.4, value: 1 },
|
|
506
|
+
{ id: 'orb-c', x: 4.6, y: 3.8, z: -2.8, value: 1 },
|
|
507
|
+
],
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
'video-cutscene': {
|
|
512
|
+
summary: 'Cinematic cutscene starter with MP4 video playback, fade transitions, skip support, and scene flow between video and gameplay.',
|
|
513
|
+
controls: [
|
|
514
|
+
'Skip cutscene: Space or Enter',
|
|
515
|
+
],
|
|
516
|
+
firstEdits: [
|
|
517
|
+
'Drop your .mp4 files in assets/video/ and update the path in scenes/cutscene.scene.js.',
|
|
518
|
+
'Replace the gameplay scene placeholder with your actual game loop.',
|
|
519
|
+
'Add more cutscene scenes for different story beats by duplicating cutscene.scene.js.',
|
|
520
|
+
],
|
|
521
|
+
keywords: ['video', 'cutscene', 'cinematic', 'mp4'],
|
|
522
|
+
requiredApis: [
|
|
523
|
+
'aura.video.load',
|
|
524
|
+
'aura.video.play',
|
|
525
|
+
'aura.video.pause',
|
|
526
|
+
'aura.video.stop',
|
|
527
|
+
'aura.video.seek',
|
|
528
|
+
'aura.video.getTexture',
|
|
529
|
+
'aura.video.getInfo',
|
|
530
|
+
'aura.draw3d.billboard',
|
|
531
|
+
'aura.draw3d.clear3d',
|
|
532
|
+
'aura.draw3d.drawMesh',
|
|
533
|
+
'aura.mesh.createBox',
|
|
534
|
+
'aura.material.create',
|
|
535
|
+
'aura.camera3d.perspective',
|
|
536
|
+
'aura.camera3d.setPosition',
|
|
537
|
+
'aura.camera3d.lookAt',
|
|
538
|
+
'aura.light.ambient',
|
|
539
|
+
'aura.light.directional',
|
|
540
|
+
'aura.input.isKeyPressed',
|
|
541
|
+
'aura.window.getSize',
|
|
542
|
+
'aura.window.getFPS',
|
|
543
|
+
'aura.draw2d.clear',
|
|
544
|
+
'aura.draw2d.rect',
|
|
545
|
+
'aura.draw2d.text',
|
|
546
|
+
'aura.draw2d.measureText',
|
|
547
|
+
'aura.rgb',
|
|
548
|
+
'aura.rgba',
|
|
549
|
+
'aura.Color.WHITE',
|
|
550
|
+
],
|
|
551
|
+
starterAssetPlan: {
|
|
552
|
+
file: 'cutscene-sequence.json',
|
|
553
|
+
title: 'Video Cutscene Sequence',
|
|
554
|
+
steps: [
|
|
555
|
+
'Plan your cutscene sequence here before spreading video paths across scene files.',
|
|
556
|
+
'Keep video files small (H.264 1080p recommended) for fast load times.',
|
|
557
|
+
],
|
|
558
|
+
payload: {
|
|
559
|
+
sequence: [
|
|
560
|
+
{ id: 'intro', videoPath: 'assets/video/intro.mp4', chapter: 0 },
|
|
561
|
+
{ id: 'midpoint', videoPath: 'assets/video/midpoint.mp4', chapter: 1 },
|
|
562
|
+
{ id: 'finale', videoPath: 'assets/video/finale.mp4', chapter: 2 },
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
},
|
|
566
|
+
optionalModules: {
|
|
567
|
+
network: false,
|
|
568
|
+
},
|
|
569
|
+
configModules: {
|
|
570
|
+
network: false,
|
|
571
|
+
},
|
|
572
|
+
workflowTitle: 'Video Cutscene Authoring Loop',
|
|
573
|
+
workflowSteps: [
|
|
574
|
+
'Drop a test .mp4 in assets/video/ and run `npm run dev` to verify playback.',
|
|
575
|
+
'Tune fade speed and skip behavior in scenes/cutscene.scene.js.',
|
|
576
|
+
'Build your gameplay scene before adding more cutscene chapters.',
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
blank: {
|
|
580
|
+
summary: 'Minimal blank loop with runtime API checks for quick custom starts.',
|
|
581
|
+
controls: [
|
|
582
|
+
'No controls wired yet.',
|
|
583
|
+
'Use scenes/ plus appState as your first structure instead of growing one big main.js file.',
|
|
584
|
+
],
|
|
585
|
+
firstEdits: [
|
|
586
|
+
'Define cross-scene session state in src/runtime/app-state.js.',
|
|
587
|
+
'Keep live gameplay state inside scenes/ instead of global top-level variables.',
|
|
588
|
+
'Move defaults into config/ and authored nouns into content/ before systems grow.',
|
|
589
|
+
'Set modules and identity in aura.config.json.',
|
|
590
|
+
'Replace starter asset notes under assets/starter/.',
|
|
591
|
+
],
|
|
592
|
+
keywords: ['blank', 'starter'],
|
|
593
|
+
requiredApis: [
|
|
594
|
+
'aura.draw2d.clear',
|
|
595
|
+
'aura.rgba',
|
|
596
|
+
],
|
|
597
|
+
starterAssetPlan: {
|
|
598
|
+
file: 'starter-notes.json',
|
|
599
|
+
title: 'Blank Starter Notes',
|
|
600
|
+
steps: [
|
|
601
|
+
'Write your core loop goals before coding to keep agent prompts precise.',
|
|
602
|
+
'Track capability assumptions here as you expand runtime usage.',
|
|
603
|
+
],
|
|
604
|
+
payload: {
|
|
605
|
+
goals: [
|
|
606
|
+
'Define camera and movement model.',
|
|
607
|
+
'Pick combat/progression loop.',
|
|
608
|
+
'Specify first milestone acceptance criteria.',
|
|
609
|
+
],
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
'local-multiplayer': {
|
|
614
|
+
summary: 'Room-code multiplayer starter. `npm run dev` hosts, `npm run join -- CODE` joins, and `aura.config.json -> multiplayer` plus one relay host promotes the same flow to internet-backed hosting.',
|
|
615
|
+
controls: [
|
|
616
|
+
'Host movement: Arrow keys or WASD',
|
|
617
|
+
'Join movement: Arrow keys or WASD from a second terminal',
|
|
618
|
+
'Room-code flow: `npm run dev` hosts and `npm run join -- AURA2P` joins from a second terminal.',
|
|
619
|
+
],
|
|
620
|
+
firstEdits: [
|
|
621
|
+
'Set room code, room name, relay defaults, and diagnostics in aura.config.json -> multiplayer.',
|
|
622
|
+
'Tune room timing, player bounds, and host fallback in config/gameplay/local-multiplayer.config.js.',
|
|
623
|
+
'Replace the spawn slots in content/gameplay/room-layout.js.',
|
|
624
|
+
'Extend the gameplay loop in scenes/gameplay.scene.js and ui/hud.screen.js before widening multiplayer scope.',
|
|
625
|
+
],
|
|
626
|
+
keywords: ['multiplayer', 'local', 'native', 'room-code'],
|
|
627
|
+
requiredApis: [
|
|
628
|
+
'aura.input.isKeyDown',
|
|
629
|
+
'aura.draw2d.clear',
|
|
630
|
+
'aura.draw2d.rectFill',
|
|
631
|
+
'aura.draw2d.text',
|
|
632
|
+
'aura.rgb',
|
|
633
|
+
'aura.multiplayer.configure',
|
|
634
|
+
'aura.multiplayer.getAllPlayerInputs',
|
|
635
|
+
'aura.multiplayer.getAllState',
|
|
636
|
+
'aura.multiplayer.getPlayerCount',
|
|
637
|
+
'aura.multiplayer.getRoomInfo',
|
|
638
|
+
'aura.multiplayer.getState',
|
|
639
|
+
'aura.multiplayer.host',
|
|
640
|
+
'aura.multiplayer.isConnected',
|
|
641
|
+
'aura.multiplayer.onPlayerJoin',
|
|
642
|
+
'aura.multiplayer.onPlayerLeave',
|
|
643
|
+
'aura.multiplayer.sendInput',
|
|
644
|
+
'aura.multiplayer.setState',
|
|
645
|
+
],
|
|
646
|
+
starterAssetPlan: {
|
|
647
|
+
file: 'room-layout.json',
|
|
648
|
+
title: 'Room-Code Multiplayer Room Layout',
|
|
649
|
+
steps: [
|
|
650
|
+
'Keep the default starter local-first: one room code and one authoritative host in the native dev loop.',
|
|
651
|
+
'For the fastest internet-backed upgrade, set aura.config.json -> multiplayer.relay to your relay host and keep the same room-code commands.',
|
|
652
|
+
'Use these spawn slots to rebalance the first room-code playtest before adding more systems.',
|
|
653
|
+
],
|
|
654
|
+
payload: {
|
|
655
|
+
roomCode: 'AURA2P',
|
|
656
|
+
maxPlayers: 2,
|
|
657
|
+
spawnSlots: [
|
|
658
|
+
{ id: 'host', x: 160, y: 240, label: 'host' },
|
|
659
|
+
{ id: 'guest', x: 760, y: 240, label: 'guest' },
|
|
660
|
+
],
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
includeSharedStarterUtils: true,
|
|
664
|
+
optionalModules: {
|
|
665
|
+
network: false,
|
|
666
|
+
multiplayer: true,
|
|
667
|
+
},
|
|
668
|
+
configModules: {
|
|
669
|
+
network: false,
|
|
670
|
+
multiplayer: true,
|
|
671
|
+
},
|
|
672
|
+
workflowTitle: 'Room-Code Multiplayer Loop',
|
|
673
|
+
workflowSteps: [
|
|
674
|
+
'Host the room in one terminal with `npm run dev`.',
|
|
675
|
+
'Join the room by code from a second terminal with `npm run join -- AURA2P`.',
|
|
676
|
+
'Keep the default loop local-first, or set aura.config.json -> multiplayer.relay for the fastest internet-backed room-code upgrade.',
|
|
677
|
+
],
|
|
678
|
+
},
|
|
679
|
+
'retro-topdown-adventure': {
|
|
680
|
+
runtimeFamily: 'retro',
|
|
681
|
+
retroTemplateId: 'topdown-adventure',
|
|
682
|
+
summary: 'Retro-safe top-down exploration starter for the GB/GBC/GBA preview lane.',
|
|
683
|
+
controls: [
|
|
684
|
+
'Move: D-pad or arrow-style directional input',
|
|
685
|
+
'Build targets: `npm run build:gb`, `npm run build:gbc`, or `npm run build:gba`',
|
|
686
|
+
],
|
|
687
|
+
firstEdits: [
|
|
688
|
+
'Replace the one-room route and hero nouns in src/main.js before widening scope.',
|
|
689
|
+
'Keep assets under assets/retro/assets.json inside the enforced target budgets.',
|
|
690
|
+
'Use `npm run retro:check` after each change so the validator stays your first feedback loop.',
|
|
691
|
+
],
|
|
692
|
+
keywords: ['retro', 'gb', 'gbc', 'gba', 'topdown'],
|
|
693
|
+
requiredApis: [
|
|
694
|
+
'aura.input.pressed',
|
|
695
|
+
'aura.tilemap.setTile',
|
|
696
|
+
'aura.sprite.draw',
|
|
697
|
+
'aura.text.write',
|
|
698
|
+
'aura.save.write',
|
|
699
|
+
],
|
|
700
|
+
optionalModules: {
|
|
701
|
+
network: false,
|
|
702
|
+
multiplayer: false,
|
|
703
|
+
},
|
|
704
|
+
configModules: {
|
|
705
|
+
network: false,
|
|
706
|
+
multiplayer: false,
|
|
707
|
+
},
|
|
708
|
+
workflowTitle: 'Retro Top-Down Loop',
|
|
709
|
+
workflowSteps: [
|
|
710
|
+
'Run `npm run retro:check` from the project root after each code or asset change.',
|
|
711
|
+
'Build the target you care about with `npm run build:gbc` or the stricter `npm run build:gb`.',
|
|
712
|
+
'Treat the generated ROM and preview artifacts as the ground truth, not desktop dev-session behavior.',
|
|
713
|
+
],
|
|
714
|
+
},
|
|
715
|
+
'retro-puzzle-grid': {
|
|
716
|
+
runtimeFamily: 'retro',
|
|
717
|
+
retroTemplateId: 'puzzle-grid',
|
|
718
|
+
summary: 'Retro-safe one-screen puzzle starter for cartridge-style grid logic.',
|
|
719
|
+
controls: [
|
|
720
|
+
'Move cursor: D-pad or arrow-style directional input',
|
|
721
|
+
'Confirm/toggle: A button input',
|
|
722
|
+
],
|
|
723
|
+
firstEdits: [
|
|
724
|
+
'Rewrite the board rule in src/main.js before adding extra verbs.',
|
|
725
|
+
'Keep tiles, sprites, and fonts small enough to pass the selected target profile.',
|
|
726
|
+
'Use `npm run retro:check` before every preview build.',
|
|
727
|
+
],
|
|
728
|
+
keywords: ['retro', 'gb', 'gbc', 'gba', 'puzzle'],
|
|
729
|
+
requiredApis: [
|
|
730
|
+
'aura.input.pressed',
|
|
731
|
+
'aura.input.justPressed',
|
|
732
|
+
'aura.tilemap.setTile',
|
|
733
|
+
'aura.sprite.draw',
|
|
734
|
+
'aura.text.write',
|
|
735
|
+
],
|
|
736
|
+
optionalModules: {
|
|
737
|
+
network: false,
|
|
738
|
+
multiplayer: false,
|
|
739
|
+
},
|
|
740
|
+
configModules: {
|
|
741
|
+
network: false,
|
|
742
|
+
multiplayer: false,
|
|
743
|
+
},
|
|
744
|
+
workflowTitle: 'Retro Puzzle Loop',
|
|
745
|
+
workflowSteps: [
|
|
746
|
+
'Validate with `npm run retro:check` before chasing polish.',
|
|
747
|
+
'Keep the board deterministic and one-screen until the target budgets feel obvious.',
|
|
748
|
+
'Use `npm run build:gbc` first, then rerun with `npm run build:gb` when you want the stricter profile.',
|
|
749
|
+
],
|
|
750
|
+
},
|
|
751
|
+
'retro-tactics-grid': {
|
|
752
|
+
runtimeFamily: 'retro',
|
|
753
|
+
retroTemplateId: 'tactics-grid',
|
|
754
|
+
summary: 'Retro-safe turn-based tactics starter with tiny authored state and HUD output.',
|
|
755
|
+
controls: [
|
|
756
|
+
'Move selector: D-pad or arrow-style directional input',
|
|
757
|
+
'Act: A button input',
|
|
758
|
+
'End turn: B button input',
|
|
759
|
+
],
|
|
760
|
+
firstEdits: [
|
|
761
|
+
'Replace the sample turn and AP rules in src/main.js with your own combat loop.',
|
|
762
|
+
'Keep unit presentation inside the retro sprite and tile budget instead of adding desktop systems.',
|
|
763
|
+
'Run `npm run retro:check` after each authored rules change.',
|
|
764
|
+
],
|
|
765
|
+
keywords: ['retro', 'gb', 'gbc', 'gba', 'tactics'],
|
|
766
|
+
requiredApis: [
|
|
767
|
+
'aura.input.pressed',
|
|
768
|
+
'aura.input.justPressed',
|
|
769
|
+
'aura.tilemap.setTile',
|
|
770
|
+
'aura.sprite.draw',
|
|
771
|
+
'aura.text.write',
|
|
772
|
+
'aura.audio.playMusic',
|
|
773
|
+
],
|
|
774
|
+
optionalModules: {
|
|
775
|
+
network: false,
|
|
776
|
+
multiplayer: false,
|
|
777
|
+
},
|
|
778
|
+
configModules: {
|
|
779
|
+
network: false,
|
|
780
|
+
multiplayer: false,
|
|
781
|
+
},
|
|
782
|
+
workflowTitle: 'Retro Tactics Loop',
|
|
783
|
+
workflowSteps: [
|
|
784
|
+
'Use `npm run retro:check` as the first pass for every authored rules edit.',
|
|
785
|
+
'Build `gbc` first, then rerun against `gb` to see which color-oriented assumptions fail.',
|
|
786
|
+
'Keep the template as a grid-and-sprite tactics shell, not a desktop simulation sandbox.',
|
|
787
|
+
],
|
|
788
|
+
},
|
|
789
|
+
'retro-platformer': {
|
|
790
|
+
runtimeFamily: 'retro',
|
|
791
|
+
retroTemplateId: 'platformer',
|
|
792
|
+
summary: 'Retro-safe side-view platformer starter for GB/GBC/GBA preview builds.',
|
|
793
|
+
controls: [
|
|
794
|
+
'Move: D-pad or arrow-style directional input',
|
|
795
|
+
'Jump: A button input',
|
|
796
|
+
],
|
|
797
|
+
firstEdits: [
|
|
798
|
+
'Tune jump feel and floor rules in src/main.js before expanding the level.',
|
|
799
|
+
'Stay inside retro-safe sprite, tile, and font counts while you iterate.',
|
|
800
|
+
'Use `npm run build:gbc` for the common path and `npm run build:gb` for the stricter mono profile.',
|
|
801
|
+
],
|
|
802
|
+
keywords: ['retro', 'gb', 'gbc', 'gba', 'platformer'],
|
|
803
|
+
requiredApis: [
|
|
804
|
+
'aura.input.pressed',
|
|
805
|
+
'aura.input.justPressed',
|
|
806
|
+
'aura.tilemap.setTile',
|
|
807
|
+
'aura.sprite.draw',
|
|
808
|
+
'aura.text.write',
|
|
809
|
+
],
|
|
810
|
+
optionalModules: {
|
|
811
|
+
network: false,
|
|
812
|
+
multiplayer: false,
|
|
813
|
+
},
|
|
814
|
+
configModules: {
|
|
815
|
+
network: false,
|
|
816
|
+
multiplayer: false,
|
|
817
|
+
},
|
|
818
|
+
workflowTitle: 'Retro Platformer Loop',
|
|
819
|
+
workflowSteps: [
|
|
820
|
+
'Run `npm run retro:check` first so the subset stays visible while you tune motion.',
|
|
821
|
+
'Build to `gbc` for the default ROM path, then compare with `gb` when you want the tighter profile.',
|
|
822
|
+
'Keep the starter as a simple movement-and-grounding loop instead of mixing in desktop runtime assumptions.',
|
|
823
|
+
],
|
|
824
|
+
},
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
export function listCreateTemplates() {
|
|
828
|
+
return Object.keys(CREATE_TEMPLATE_DIRS);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export function listCreateTemplateAliasHints() {
|
|
832
|
+
return [...CREATE_TEMPLATE_ALIAS_HINTS];
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export function normalizeCreateTemplate(template) {
|
|
836
|
+
const normalized = String(template || '').trim().toLowerCase();
|
|
837
|
+
return CREATE_TEMPLATE_ALIASES[normalized] || null;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
export function sanitizeBinName(name) {
|
|
842
|
+
const normalized = String(name || '').trim();
|
|
843
|
+
const compact = normalized
|
|
844
|
+
.replace(/^@[^/]+\//, '')
|
|
845
|
+
.replace(/\s+/g, '-')
|
|
846
|
+
.replace(/[^a-zA-Z0-9._-]/g, '-')
|
|
847
|
+
.replace(/-+/g, '-')
|
|
848
|
+
.replace(/^[-._]+|[-._]+$/g, '')
|
|
849
|
+
.toLowerCase();
|
|
850
|
+
|
|
851
|
+
if (!compact) {
|
|
852
|
+
throw new Error(`Unable to derive executable name from project name "${name}".`);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
return compact;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
function sanitizePackageSlug(name) {
|
|
859
|
+
const normalized = String(name || '').trim();
|
|
860
|
+
const compact = normalized
|
|
861
|
+
.replace(/^@[^/]+\//, '')
|
|
862
|
+
.replace(/\s+/g, '-')
|
|
863
|
+
.replace(/[^a-zA-Z0-9._-]/g, '-')
|
|
864
|
+
.replace(/-+/g, '-')
|
|
865
|
+
.replace(/^[-._]+|[-._]+$/g, '')
|
|
866
|
+
.toLowerCase();
|
|
867
|
+
|
|
868
|
+
if (!compact) {
|
|
869
|
+
throw new Error(`Unable to derive package slug from project name "${name}".`);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
return compact;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
export function toDisplayTitle(name) {
|
|
876
|
+
const cleaned = String(name || '').replace(/^@[^/]+\//, '');
|
|
877
|
+
const words = cleaned.split(/[-_\s]+/).filter(Boolean);
|
|
878
|
+
if (words.length === 0) return String(name || '').trim() || 'AuraJS Game';
|
|
879
|
+
return words.map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export function resolveSkillsSourceDir() {
|
|
883
|
+
if (existsSync(ROOT_SKILLS_DIR)) return ROOT_SKILLS_DIR;
|
|
884
|
+
if (existsSync(PACKAGED_SKILLS_DIR)) return PACKAGED_SKILLS_DIR;
|
|
885
|
+
return null;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export function resolveTemplateMetadata(template) {
|
|
889
|
+
return CREATE_TEMPLATE_METADATA[template] || CREATE_TEMPLATE_METADATA.blank;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export function shouldCopyCreateSharedTemplate(template, templateMetadata) {
|
|
893
|
+
if (templateMetadata?.runtimeFamily === 'retro') return false;
|
|
894
|
+
if (templateMetadata?.includeSharedStarterUtils === true) return true;
|
|
895
|
+
if (templateMetadata?.includeSharedStarterUtils === false) return false;
|
|
896
|
+
return template !== 'blank';
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export function applyTemplateConfigOverrides({ dest, templateMetadata }) {
|
|
900
|
+
if (!templateMetadata?.configModules) return;
|
|
901
|
+
const configPath = join(dest, 'aura.config.json');
|
|
902
|
+
if (!existsSync(configPath)) return;
|
|
903
|
+
|
|
904
|
+
const config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
905
|
+
config.modules = {
|
|
906
|
+
...(config.modules || {}),
|
|
907
|
+
...templateMetadata.configModules,
|
|
908
|
+
};
|
|
909
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export function buildPackageJson({ name, version, license, binName, template, templateMetadata }) {
|
|
913
|
+
const packageSlug = sanitizePackageSlug(name);
|
|
914
|
+
const packageName = `@aurajs/${packageSlug}`;
|
|
915
|
+
const keywords = ['aurajs', 'game', ...(templateMetadata?.keywords || [])];
|
|
916
|
+
if (templateMetadata?.runtimeFamily === 'retro') {
|
|
917
|
+
return {
|
|
918
|
+
name: packageName,
|
|
919
|
+
version,
|
|
920
|
+
description: `${toDisplayTitle(name)} — Aura Retro starter`,
|
|
921
|
+
type: 'module',
|
|
922
|
+
files: ['src/', 'assets/', 'aura.config.json', 'aura.capabilities.json', 'README.md', 'RUNBOOK.md'],
|
|
923
|
+
scripts: {
|
|
924
|
+
'retro:check': 'aura retro check --target gbc',
|
|
925
|
+
'retro:explain': 'aura retro explain --target gbc',
|
|
926
|
+
build: 'aura build --target gbc',
|
|
927
|
+
'build:gb': 'aura build --target gb',
|
|
928
|
+
'build:gbc': 'aura build --target gbc',
|
|
929
|
+
'build:gba': 'aura build --target gba',
|
|
930
|
+
},
|
|
931
|
+
dependencies: {
|
|
932
|
+
'@auraindustry/aurajs': CLI_PACKAGE_VERSION,
|
|
933
|
+
},
|
|
934
|
+
publishConfig: {
|
|
935
|
+
access: 'public',
|
|
936
|
+
},
|
|
937
|
+
keywords,
|
|
938
|
+
license,
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
const files = ['bin/', 'src/', 'assets/', 'skills/', 'aura.config.json', 'aura.capabilities.json', 'README.md', 'RUNBOOK.md'];
|
|
942
|
+
files.splice(3, 0, 'config/', 'content/', 'docs/', 'prefabs/', 'scenes/', 'ui/');
|
|
943
|
+
|
|
944
|
+
const scripts = {
|
|
945
|
+
dev: 'node ./bin/play.js dev',
|
|
946
|
+
build: 'aura build',
|
|
947
|
+
play: 'node ./bin/play.js play',
|
|
948
|
+
publish: 'node ./bin/play.js publish',
|
|
949
|
+
session: 'node ./bin/play.js session',
|
|
950
|
+
state: 'node ./bin/play.js state',
|
|
951
|
+
inspect: 'node ./bin/play.js inspect',
|
|
952
|
+
action: 'node ./bin/play.js action',
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
if (templateMetadata?.optionalModules?.multiplayer === true) {
|
|
956
|
+
scripts.join = 'node ./bin/play.js join --launch-mode dev';
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
return {
|
|
960
|
+
name: packageName,
|
|
961
|
+
version,
|
|
962
|
+
description: `${toDisplayTitle(name)} — built with AuraJS`,
|
|
963
|
+
type: 'module',
|
|
964
|
+
bin: {
|
|
965
|
+
[binName]: './bin/play.js',
|
|
966
|
+
},
|
|
967
|
+
files,
|
|
968
|
+
scripts,
|
|
969
|
+
dependencies: {
|
|
970
|
+
'@auraindustry/aurajs': CLI_PACKAGE_VERSION,
|
|
971
|
+
},
|
|
972
|
+
publishConfig: {
|
|
973
|
+
access: 'public',
|
|
974
|
+
},
|
|
975
|
+
keywords,
|
|
976
|
+
license,
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export function buildCapabilitiesDeclaration({ template, templateMetadata }) {
|
|
981
|
+
const optionalModules = {
|
|
982
|
+
physics: false,
|
|
983
|
+
network: true,
|
|
984
|
+
multiplayer: false,
|
|
985
|
+
steam: false,
|
|
986
|
+
...(templateMetadata?.optionalModules || {}),
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
return {
|
|
990
|
+
schema: 'aurajs.create-capabilities.v1',
|
|
991
|
+
template,
|
|
992
|
+
summary: templateMetadata.summary,
|
|
993
|
+
requiredApis: [...templateMetadata.requiredApis],
|
|
994
|
+
optionalModules,
|
|
995
|
+
notes: [
|
|
996
|
+
'Keep this file in sync with runtime API usage added in src/main.js, src/runtime/, and authored scene files.',
|
|
997
|
+
'Treat missing APIs as scaffold contract mismatches, not silent fallbacks.',
|
|
998
|
+
],
|
|
999
|
+
};
|
|
1000
|
+
}
|