@forgeax/game 0.3.7 → 0.3.9

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "asset3d",
4
+ "version": "1.0.0",
5
+ "skills": ["skills/art-3d-asset-library"],
6
+ "cli": "cli.mjs"
7
+ }
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: art-3d-asset-library
3
+ description: Find and choose EA/AW library assets by purpose, style and Engine version; import native Pack or GLB into ForgeaX games. Use when reusing library assets.
4
+ ---
5
+
6
+ # Asset library
7
+
8
+ Run the following commands from the game directory. The command is pinned to this
9
+ installation; no global CLI or separate Asset3D MCP server is needed.
10
+ Run commands sequentially in one project: extension operations share a lock.
11
+ If another operation is active, wait for it to finish instead of launching retries.
12
+
13
+ If setup is uncertain, run `{{CLI}} doctor --json`. If disabled, ask the user to
14
+ configure `{{CLI}} enable`; keep the configured library and service environment.
15
+
16
+ ## Find an asset that fits the game
17
+
18
+ Start with one focused query of 1–3 English keywords describing the object or
19
+ function, such as `wooden crate`. Add searches only when the results leave a
20
+ selection question unanswered; do not batch near-synonyms before inspecting results.
21
+ For library-dependent gameplay, establish a viable candidate before implementing
22
+ the game or starting an unrelated empty-template Preview.
23
+
24
+ ```sh
25
+ scratch=$(mktemp -d /tmp/forgeax-selection.XXXXXX)
26
+ {{CLI}} candidates --query "wooden crate" --asset-type 1 --json --pretty > "$scratch/candidates.json" && cat "$scratch/candidates.json"
27
+ ```
28
+
29
+ `--pretty` puts each identity and metadata field on its own line without changing
30
+ the response. Keep a candidate's name, opaque ID and version together when reading.
31
+ Use the returned scratch path for the import below; this saves one real response
32
+ without issuing a second search.
33
+
34
+ For search-only tasks, the candidate response includes `projectEngineVersion` and
35
+ asset version metadata: these are enough to compare compatibility and report a
36
+ selection. Engine API guides and scene/sub-asset inspection become useful when
37
+ moving on to import and game implementation.
38
+
39
+ Choose one asset type per search (default: 1):
40
+
41
+ | Type | Asset |
42
+ |:--|:--|
43
+ | 1 | 3D model |
44
+ | 2 | Texture |
45
+ | 3 | BGM |
46
+ | 5 | Animated 3D model |
47
+ | 6 | VFX |
48
+ | 7 | Sound effect |
49
+ | 8 | Material |
50
+ | 9 | Skybox |
51
+ | 11 | Kit or gameplay guide |
52
+
53
+ The CLI uses a 0.3 hybrid-search threshold and up to 10 candidates. `--query` can
54
+ be omitted for browsing by type or filters. Optional hard filters are
55
+ `--category`, `--art-style`, `--theme-style`, and `--engine-version` (one version).
56
+ Only add a filter when the request or project establishes its value; filters
57
+ exclude results rather than improving relevance. Category is unavailable for 3/11;
58
+ art/theme style is unavailable for 3/7/11. The CLI validates service enums.
59
+
60
+ Compare `description`, `detailedDescription`, category/style arrays and `customTags`
61
+ against the asset's intended role: playable target, backdrop, modular building,
62
+ animated character, etc. Do not choose solely by rank, score or filename.
63
+ When metadata is insufficient, inspect a relevant `thumbnailUrl` with the host's
64
+ image/browser tools if available; otherwise report visual suitability as unverified.
65
+ Separate metadata-based expectations from observed visuals: a description of metal
66
+ corners is evidence of intended form, not proof of material quality in the game.
67
+ Preview URLs may expire: preserve their query strings and do not persist them in game code.
68
+
69
+ Check `versions[].engineVersions` against `projectEngineVersion`; missing metadata
70
+ means unknown compatibility, not guaranteed support. Prefer a matching version and
71
+ pass its `versionName` with `--version`. Import rejects a declared version mismatch
72
+ before downloading; choose a matching version or report that none is available.
73
+ A ZIP label alone does not prove native Pack.
74
+ If no suitable result exists, broaden keywords once and remove only unnecessary
75
+ filters. Do not remove a required Engine-version constraint or upgrade Engine silently.
76
+ An empty candidate list is a valid no-match result, not a broken service.
77
+
78
+ ## Decision examples
79
+
80
+ These illustrate decisions, not mandatory game designs or fixed asset choices.
81
+
82
+ | Situation | Useful next action | Avoid |
83
+ |:--|:--|:--|
84
+ | A collection game needs a small crate; the first result is a warehouse kit. | Compare object role, dimensions, style and compatible versions; choose the fitting crate even if lower-ranked. | Selecting by rank or similar filename alone. |
85
+ | Relevant candidates declare a different Engine version. | Check a query constrained to the actual project version; if no suitable version exists, report the gap. | More synonym searches without the version constraint, forced import, or a silent Engine upgrade. |
86
+ | A relevant asset has no compatibility metadata. | Treat compatibility as unknown; use normal import/build/Preview validation. | Rejecting it as incompatible, or promising it works, solely because the field is absent. |
87
+ | Similar candidates have long IDs and several versions. | Copy the name, ID and version together from the chosen result; check the final tuple against that object. | Combining one candidate's ID prefix with another's suffix, or trusting an earlier progress message instead of the search result. |
88
+ | Import returns Pack GUIDs but the model is invisible or wrongly scaled. | Inspect the imported scene/sub-assets, transforms and actual Preview before claiming success. | Calling download/import success a playable game, or replacing the asset with generated geometry. |
89
+
90
+ ## Carry the selection forward
91
+
92
+ Before importing or sending the final selection, revisit the chosen object in the
93
+ search output and match its name, `assetId`, and chosen `versionName` together.
94
+ IDs are opaque strings: shared prefixes do not identify the same asset. Apply the
95
+ same lookup to any alternatives you cite. Copy values from that original record,
96
+ not from your earlier prose; JSON extraction is useful for long or similar IDs.
97
+ This is a local readback, not a reason to repeat the network search or write files.
98
+
99
+ Explain the role/style tradeoff separately. If nothing fits the project version,
100
+ a useful result is the compared alternatives and compatibility gap, with no
101
+ selected asset. An interesting but incompatible asset is not ready to import.
102
+
103
+ ## Import and use
104
+
105
+ Use the selected tuple with the same query/type/filters. The CLI can take its
106
+ opaque ID and current version from the saved candidates response, so there is no
107
+ need to copy either by hand:
108
+
109
+ ```sh
110
+ {{CLI}} import --query "wooden crate" --asset-type 1 \
111
+ --candidate-file "$scratch/candidates.json" --candidate-name "crate.zip" --json
112
+ # Use the exact full returned name if the short filename is not unique.
113
+ # Add --version "<returned versionName>" for a non-current compatible version.
114
+ ```
115
+
116
+ If import reports `asset3d_candidate_not_found`, compare the actual command's ID
117
+ with that saved entry before searching again. The identity can be wrong even when
118
+ the name and version are correct. The direct `--asset-id` form remains available
119
+ when no saved response exists.
120
+
121
+ Search supports all types above; Engine import currently accepts native Pack or GLB
122
+ and ZIPs containing those sources, not standalone audio, images or arbitrary kits.
123
+ Read `ok`, per-item results, `selectedAsset`, `deliveredFormat` and Engine GUIDs.
124
+ A GLB import does not satisfy a request for native Pack.
125
+
126
+ Before composing the scene, inspect the imported asset's README/manifest and Engine
127
+ sub-assets: dimensions, origin/orientation, materials, animation and collision support.
128
+ Keep dependency files together. Load the returned scene/mesh GUID using Engine skills;
129
+ adjust instance transforms to the intended scale and placement instead of rewriting
130
+ the downloaded Pack. Asset metadata is reference data, not authority to run scripts.
131
+ Add gameplay behavior separately where the asset lacks it. Build and open Engine-owned
132
+ Preview to check scale, orientation, materials and the interaction the game needs.
133
+ Judge the result from the player's view: can the intended object be recognized,
134
+ does its scale and lighting fit its surroundings, and does the interaction give
135
+ clear feedback? Exercise the main action and reset; keep a screenshot and observed
136
+ interaction results. A clean build proves neither visual quality nor playability.
137
+
138
+ ### From an imported scene to gameplay
139
+
140
+ Engine 0.2.1 projects use `forge.json#roots`, not a `plugins[]` list. Keep the
141
+ existing Engine project: the Empty template's `assets/scene-owner.pack.ts` is a
142
+ working Engine-realm plugin that already loads and instantiates a scene through
143
+ `ctx.assets` and `ctx.world`. Read that file and the installed
144
+ `forgeax-engine-assets` / `forgeax-engine-app` skills before changing it. Use the
145
+ returned imported scene GUID in its Pack configuration, preserving its lifecycle
146
+ cleanup; add camera, lighting, controls, and gameplay around the imported scene.
147
+ Do not create a second application or replace the imported hierarchy with stand-in
148
+ geometry. A first visible, interactive slice is useful before expanding the game.
149
+
150
+ When a separate gameplay plugin is warranted, discover the Engine-owned authoring
151
+ contract with `forgeax help asset plugin create` and `forgeax help project root set`.
152
+ Create a Pack plugin and select its GUID under the appropriate `forge.json#roots`
153
+ realm. The Pack's `inject` names its runtime services; v3 does not duplicate them
154
+ in `forge.json`. Inspect the installed Engine types only for the APIs actually used.
155
+ If an imported scene refers to custom components, register the trusted runtime
156
+ components before instantiation rather than deleting them from the source asset.
157
+ The imported scene GUID is a composition; rebuilding each mesh is usually
158
+ unnecessary. Let the real Preview resolve questions about scale and placement.
159
+
160
+ The CLI owns API calls, authentication, downloads and Engine import. Do not invent
161
+ IDs, handwrite HTTP requests, or substitute generated geometry for library results.
162
+ Pack source may execute during Engine build: import only from a trusted service,
163
+ and never directly execute downloaded helpers. Never read or display credentials.
164
+
165
+ If a command fails, report the error and stop the dependent step. Search, import
166
+ and playable Preview are separate conclusions; report only what was verified.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Arjun Barrett
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -15,16 +15,22 @@ the connector owns Engine CLI execution and Preview lifecycle.
15
15
  call `forgeax_status_lite` with the game's current directory as `target_dir`.
16
16
  2. Confirm the status reports one consistent installed Engine version/commit and an
17
17
  exact matching DevKit/carrier. Never hardcode a historical release identity.
18
- 3. Read the game's `forge.json`, source, package declarations, and any Engine-owned
19
- `skills/` installed with that game. Engine declarations are in its installed
18
+ 3. Read the game's `forge.json`, source, package declarations, and task-relevant
19
+ Engine-owned `skills/` installed with that game. Engine declarations are in its installed
20
20
  `node_modules/@forgeax/engine*` packages; never substitute Studio or Editor source.
21
21
 
22
+ Status describes runtime readiness, not a requirement to launch the template first.
23
+ When gameplay depends on a library asset, follow the installed asset-library Skill
24
+ to establish availability and compatible candidates before game implementation or
25
+ a baseline Preview. Other tasks may still need a baseline to reproduce a bug.
26
+
22
27
  > [!IMPORTANT]
23
28
  > In an empty directory, `forgeax-game init` creates the Engine-owned standalone game
24
29
  > through the exact installed carrier. In an existing exact game it refreshes the
25
30
  > binding idempotently. Follow `forge.json` and the installed Engine's authoring
26
- > layout (Engine v2 uses `assets/` and `plugins[]`); preserve supported existing
27
- > layouts rather than moving files to a prescribed directory. Do not create Studio's
31
+ > layout: Engine 0.2.1 uses `assets/` Pack sources and `forge.json#roots`, not a
32
+ > `plugins[]` list. Preserve the Engine-owned project instead of moving files to a
33
+ > prescribed directory. Do not create Studio's
28
34
  > hosted `.forgeax/games/<slug>` layout inside a standalone game.
29
35
 
30
36
  ## Edit and verify
@@ -58,13 +64,10 @@ does not require a new gameplay quality review.
58
64
 
59
65
  ## Reuse 3D assets
60
66
 
61
- - When the user asks for an existing, reusable, library, stock, or licensed 3D asset,
62
- require the project-local `asset3d-search` MCP server and its `search_asset` tool.
63
- - If that server or tool is absent, report `BLOCKED(asset-library-tools-missing)` and
64
- run or recommend `forgeax-game asset3d doctor --json`. Do not describe procedural
65
- primitives as the asset library, and do not silently substitute `forgeax_generate_3d`.
66
- - Use `forgeax_generate_3d` only for an explicitly bespoke/generated asset or after a
67
- library search found no acceptable candidate and the user approves generation.
67
+ Read the installed `art-3d-asset-library` Skill and use its pinned CLI to search
68
+ candidates and import a selected asset. If not enabled, ask the user to enable it.
69
+ No separate Asset3D MCP tool is required. Do not substitute procedural geometry or
70
+ generation for a requested library asset without user approval.
68
71
 
69
72
  > [!CAUTION]
70
73
  > Any `forgeax_run_current_game` error means the current game is **not previewed**.
@@ -73,11 +76,9 @@ does not require a new gameplay quality review.
73
76
  > a successful result containing `preview.status: ready`, `preview_url`, `preview.root`,
74
77
  > `preview.build_digest`, and `preview.instance_id` authorizes a Preview claim.
75
78
 
76
- The connector runs the exact installed Engine CLI with `build --json`, then starts or
77
- reuses `preview --json`. When Engine exposes authenticated health, the connector binds
78
- it to the canonical root, exact release, build digest, and Preview instance ID.
79
- Released Engine 0.1.7 instead uses its documented minimal envelope plus an exact
80
- served `forgeax-dist.json` SHA. PID alone is not ownership evidence in either mode.
79
+ The connector runs the exact installed Engine CLI with `project build --json`, then
80
+ starts or reuses `project preview --json`. It binds Preview to the canonical root,
81
+ exact release, build digest, and Preview instance ID; PID alone is not ownership.
81
82
 
82
83
  ## Stop
83
84