@bitmagic/cli 0.1.64-dev.4 → 0.1.64-dev.5
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 +30 -3
- package/dist/assets/keep-glb.d.ts +20 -0
- package/dist/assets/keep-glb.js +45 -0
- package/dist/assets/keep-glb.js.map +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/commands/assets.d.ts +3 -0
- package/dist/commands/assets.js +33 -3
- package/dist/commands/assets.js.map +1 -1
- package/dist/commands/cover.js +7 -1
- package/dist/commands/cover.js.map +1 -1
- package/dist/commands/generate.d.ts +11 -0
- package/dist/commands/generate.js +84 -8
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.js +33 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/judge.d.ts +0 -11
- package/dist/commands/judge.js +15 -2
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/reference.js +5 -1
- package/dist/commands/reference.js.map +1 -1
- package/dist/generate/model.d.ts +11 -0
- package/dist/generate/model.js +41 -1
- package/dist/generate/model.js.map +1 -1
- package/dist/generate/prop.d.ts +9 -0
- package/dist/generate/prop.js +59 -9
- package/dist/generate/prop.js.map +1 -1
- package/dist/project/art-style.d.ts +34 -0
- package/dist/project/art-style.js +63 -0
- package/dist/project/art-style.js.map +1 -0
- package/dist/scaffold/blender-level-skill-files.js +22 -0
- package/dist/scaffold/blender-level-skill-files.js.map +1 -1
- package/dist/scaffold/project-files.d.ts +2 -1
- package/dist/scaffold/project-files.js +41 -34
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/project.d.ts +9 -0
- package/dist/scaffold/project.js +23 -3
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/reference-guidance.d.ts +1 -1
- package/dist/scaffold/reference-guidance.js +2 -1
- package/dist/scaffold/reference-guidance.js.map +1 -1
- package/dist/scaffold/skill-files.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a project DECLARES about its art style: `artStyle` at the top level of `src/work/game.json`,
|
|
3
|
+
* `voxel` or `low-poly`, absent meaning `voxel` — every game made before the field existed.
|
|
4
|
+
*
|
|
5
|
+
* One reader, the `platform-declaration.ts` shape, because six commands act on the same field
|
|
6
|
+
* and must never disagree about it: `cover` and `reference make` choose their prompt lead by it,
|
|
7
|
+
* `assets add` and `generate model|prop|character` choose whether a mesh is kept or voxelized,
|
|
8
|
+
* and `judge` uses it as the art direction when GAME-DESIGN.md has no heading for one.
|
|
9
|
+
*
|
|
10
|
+
* Best effort throughout: a missing or unreadable file means "declares nothing" (voxel), never
|
|
11
|
+
* an error. A value that is present but not one of the two lands in `rejected` so the caller can
|
|
12
|
+
* say so once — a typo'd `"lowpoly"` silently voxelizing a Blender level is the failure this
|
|
13
|
+
* exists to make visible.
|
|
14
|
+
*/
|
|
15
|
+
import * as fs from 'node:fs';
|
|
16
|
+
import * as path from 'node:path';
|
|
17
|
+
import { DEFAULT_ART_STYLE, parseArtStyle } from '@bitmagic/asset-core/art-style';
|
|
18
|
+
import { aliasSourceDir } from '../scaffold/aliases.js';
|
|
19
|
+
/** The exact declaration, for callers that must tell "says nothing" from "says voxel". */
|
|
20
|
+
export function readArtStyleDeclaration(root) {
|
|
21
|
+
const gamePath = path.join(root, aliasSourceDir('work'), 'game.json');
|
|
22
|
+
let game = null;
|
|
23
|
+
try {
|
|
24
|
+
if (fs.existsSync(gamePath)) {
|
|
25
|
+
const parsed = JSON.parse(fs.readFileSync(gamePath, 'utf-8'));
|
|
26
|
+
if (typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)) {
|
|
27
|
+
game = parsed;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
game = null;
|
|
33
|
+
}
|
|
34
|
+
const declaration = { workCopyReadable: game !== null };
|
|
35
|
+
const declared = game?.artStyle;
|
|
36
|
+
const parsed = parseArtStyle(declared);
|
|
37
|
+
if (parsed !== undefined)
|
|
38
|
+
declaration.artStyle = parsed;
|
|
39
|
+
else if (declared !== undefined)
|
|
40
|
+
declaration.rejected = declared;
|
|
41
|
+
return declaration;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The style every command acts on. A rejected value is reported through `log` (once per call —
|
|
45
|
+
* commands call this once) and treated as voxel, the same as absent: refusing the command would
|
|
46
|
+
* turn a typo in a field most creators never touch into a blocked cover.
|
|
47
|
+
*/
|
|
48
|
+
export function resolveArtStyle(root, log) {
|
|
49
|
+
const declaration = readArtStyleDeclaration(root);
|
|
50
|
+
if (declaration.rejected !== undefined && log) {
|
|
51
|
+
log(`note: game.json says artStyle ${JSON.stringify(declaration.rejected)}, which is not "voxel" or `
|
|
52
|
+
+ `"low-poly" — treating it as voxel.`);
|
|
53
|
+
}
|
|
54
|
+
return declaration.artStyle ?? DEFAULT_ART_STYLE;
|
|
55
|
+
}
|
|
56
|
+
/** One line for a command's output, so a transcript shows which style drove it. */
|
|
57
|
+
export function describeArtStyleSource(root) {
|
|
58
|
+
const declaration = readArtStyleDeclaration(root);
|
|
59
|
+
return declaration.artStyle !== undefined
|
|
60
|
+
? `Art style: ${declaration.artStyle} (game.json)`
|
|
61
|
+
: 'Art style: voxel (game.json declares none)';
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=art-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"art-style.js","sourceRoot":"","sources":["../../src/project/art-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAiB,MAAM,gCAAgC,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAaxD,0FAA0F;AAC1F,MA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AQ,CAAC,4BAA4B;cAC/F,oCAAoC,CACvC,CAAC;IACJ,CAAC;IACD,OAAO,WAAW,CAAC,QAAQ,IAAI,iBAAiB,CAAC;AACnD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,MAAM,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,WAAW,CAAC,QAAQ,KAAK,SAAS;QACvC,CAAC,CAAC,cAAc,WAAW,CAAC,QAAQ,cAAc;QAClD,CAAC,CAAC,4CAA4C,CAAC;AACnD,CAAC"}
|
|
@@ -49,6 +49,14 @@ Otherwise use \`bitmagic forge\` (AGENTS.md, "Forging a whole level") — it bui
|
|
|
49
49
|
prompt with no tooling beyond Chrome. The forge is also the right answer for natural terrain of
|
|
50
50
|
any kind; this path is for places that are designed, not grown.
|
|
51
51
|
|
|
52
|
+
**Declare the medium first.** A Blender level is a low-poly game, and the rest of the toolchain
|
|
53
|
+
assumes voxels until told otherwise: put \`"artStyle": "low-poly"\` at the top level of
|
|
54
|
+
\`src/work/game.json\` (or scaffold with \`bitmagic init --art-style low-poly\`). That one field
|
|
55
|
+
switches the cover and reference prompts to low-poly, makes \`assets add\` and \`generate model|prop\`
|
|
56
|
+
keep meshes instead of voxelizing, makes \`generate character\` keep the textured rig, drops the
|
|
57
|
+
engine's voxel lighting/bloom presets, and gives \`bitmagic judge\` the medium when
|
|
58
|
+
\`## Art direction\` is missing. Set it before the first cover, or the cover is a picture of cubes.
|
|
59
|
+
|
|
52
60
|
\`\`\`
|
|
53
61
|
python3 tools/blender-level/find_blender.py --check # prints "Blender 4.x at <path>", or how to install it
|
|
54
62
|
export BLENDER="$(python3 tools/blender-level/find_blender.py)"
|
|
@@ -474,6 +482,20 @@ bitmagic assets add build/level/<name>.glb --name <name> --keep-glb --asset-id l
|
|
|
474
482
|
\`\`\`
|
|
475
483
|
|
|
476
484
|
- Without \`--keep-glb\` the file is voxelized into a \`.vxl\` and the level becomes a blocky prop.
|
|
485
|
+
In a project whose game.json says \`artStyle: "low-poly"\` keeping is already the default and the
|
|
486
|
+
flag is harmless; keep passing it so the line works in a project that forgot to declare.
|
|
487
|
+
|
|
488
|
+
## What \`artStyle: "low-poly"\` flips
|
|
489
|
+
|
|
490
|
+
| Where | voxel (absent) | low-poly |
|
|
491
|
+
|---|---|---|
|
|
492
|
+
| \`bitmagic cover\`, \`bitmagic reference make\` | MagicaVoxel-style prompt lead and tail | flat-shaded low-poly lead and tail; same image model |
|
|
493
|
+
| \`bitmagic assets add x.glb\` | voxelized in a headless browser | kept as a \`glb\` asset (\`--voxelize\` to bake) |
|
|
494
|
+
| \`bitmagic generate model\` / \`prop\` | voxel master baked in the browser | mesh generated, re-uploaded, registered as \`glb\` (\`--voxelize\` to bake) |
|
|
495
|
+
| \`bitmagic generate character\` | voxelized rig, library search | textured low-poly rig, no library (\`--voxelize\` to override) |
|
|
496
|
+
| \`bitmagic generate vehicle\` | voxel car | voxel car anyway — the builder is voxel-native; it says so |
|
|
497
|
+
| engine on load | sunset hemisphere light + faint bloom | neither; \`MeshLevel\`'s own lighting stands |
|
|
498
|
+
| \`bitmagic judge\` with no \`## Art direction\` | grades style as it finds it | judges within low-poly |
|
|
477
499
|
- The entry's \`targetHeight\` defaults to 2 m. \`MeshLevel\` does not scale by it, but anything else
|
|
478
500
|
that reads the asset (the Creator's asset panel, a placement) would squash a 40 m station into a
|
|
479
501
|
2 m box. The build's \`REGISTER\` line has the real number.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blender-level-skill-files.js","sourceRoot":"","sources":["../../src/scaffold/blender-level-skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO
|
|
1
|
+
{"version":3,"file":"blender-level-skill-files.js","sourceRoot":"","sources":["../../src/scaffold/blender-level-skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8MR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmER,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mCAAmC;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGR,CAAC;AACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ArtStyle } from '@bitmagic/asset-core/art-style';
|
|
1
2
|
import { type AgentId } from './agent-targets.js';
|
|
2
3
|
import type { EnvironmentName } from '../config/environments.js';
|
|
3
4
|
/**
|
|
@@ -215,6 +216,6 @@ export declare function renderJudgeSkill(): string;
|
|
|
215
216
|
* more to an image model than how the input mapping works — but nothing enforces them: the whole
|
|
216
217
|
* file is read as prose.
|
|
217
218
|
*/
|
|
218
|
-
export declare function renderGameDesignMd(idea?: string): string;
|
|
219
|
+
export declare function renderGameDesignMd(idea?: string, artStyle?: ArtStyle): string;
|
|
219
220
|
export declare function renderClaudeMd(): string;
|
|
220
221
|
export declare function renderThemingSkill(): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FAVICON_LINK_ID } from '@bitmagic/asset-core/favicon';
|
|
2
|
+
import { describeArtStyle } from '@bitmagic/asset-core/art-style';
|
|
2
3
|
import { tsconfigPaths, importMapEntries, viteAliasEntries } from './aliases.js';
|
|
3
4
|
import { currentPortLane } from '../port-lane.js';
|
|
4
5
|
import { AGENTS_MD_REFERENCE_SECTION, GAME_DESIGN_REFERENCE_HINT, GENERATE_SKILL_REFERENCE_SECTION, PLANNING_SKILL_REFERENCE_STEP1, PLANNING_SKILL_REFERENCE_STEP4, } from './reference-guidance.js';
|
|
@@ -1048,30 +1049,29 @@ bitmagic forge --prompt "a ruined desert temple with a central courtyard"
|
|
|
1048
1049
|
|
|
1049
1050
|
This designs a scene, builds its geometry, bakes it to voxels and writes the finished level —
|
|
1050
1051
|
terrain, props, spawn points — into \`src/work/world.json\`. \`bitmagic levels list | add | rename
|
|
1051
|
-
| set-start | remove\` manages them afterwards (free, local
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
natural terrain. A place designed part by part — an interior, a station, a stylised set — can
|
|
1052
|
+
| set-start | remove\` manages them afterwards (free, local; \`set-start\` picks the boot level). Add
|
|
1053
|
+
\`--city\`, \`--dungeon\`, \`--platformer\` or \`--freeform\` (at most one) for a different kind of
|
|
1054
|
+
place; omit them all for natural terrain. A place designed part by part — an interior, a station, a stylised set — can
|
|
1055
1055
|
instead be built in Blender from a script: \`${PRIMARY_SKILLS_DIR}/building-levels-in-blender/SKILL.md\`,
|
|
1056
1056
|
whose first section says when that path is yours (a frontier model, Blender installable).
|
|
1057
1057
|
|
|
1058
|
+
**Art style is a declared switch.** \`"artStyle": "low-poly"\` in \`src/work/game.json\` (or
|
|
1059
|
+
\`bitmagic init --art-style low-poly\`) makes a Blender level a low-poly GAME: \`cover\`/\`reference\`
|
|
1060
|
+
prompt for low-poly, \`assets add\` and \`generate model|prop|character\` keep meshes instead of
|
|
1061
|
+
voxelizing, the engine drops its voxel lighting/bloom, \`judge\` knows the medium. Set it before the first cover.
|
|
1062
|
+
|
|
1058
1063
|
Four things worth knowing:
|
|
1059
1064
|
|
|
1060
|
-
1. **It is slow.** A forge runs for many minutes — the level bake alone can take twenty.
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
\`bitmagic forge --resume <jobId>\` is worth it — which is twenty minutes you do not spend again.
|
|
1071
|
-
|
|
1072
|
-
Afterwards actually walk the level in the dev view — one that loads is not necessarily one you can
|
|
1073
|
-
move through. (You should already have \`bitmagic dev\` running; a forge takes twenty minutes, and
|
|
1074
|
-
its progress shows there.)
|
|
1065
|
+
1. **It is slow.** A forge runs for many minutes — the level bake alone can take twenty. Plan the
|
|
1066
|
+
run, start it, and do something else while it works; progress is printed throughout.
|
|
1067
|
+
2. **It needs Google Chrome installed.** The bake runs in a real headless browser (voxelizing is
|
|
1068
|
+
engine code). It serves the project itself — no \`bitmagic dev\` needed, no collision with one.
|
|
1069
|
+
3. **It rewrites large parts of \`world.json\`** (assets, objects, levels, spawns) — re-read it after.
|
|
1070
|
+
4. **Resume rather than re-run.** It prints a job id, \`world.json\` only changes on the final step,
|
|
1071
|
+
and every failure says whether \`bitmagic forge --resume <jobId>\` is worth it — twenty minutes saved.
|
|
1072
|
+
|
|
1073
|
+
Afterwards actually walk the level in the dev view (already running, with the forge's progress in
|
|
1074
|
+
it) — one that loads is not necessarily one you can move through.
|
|
1075
1075
|
|
|
1076
1076
|
${renderCliUpdateSection(environment)}
|
|
1077
1077
|
`;
|
|
@@ -1209,6 +1209,7 @@ player to move) either builds no player controller (the \`no-character\` templat
|
|
|
1209
1209
|
- Controls: every action as desktop key + phone button, bound in one call
|
|
1210
1210
|
- Engine systems: one line each, naming the doc — \`engine/agent-docs/…\`
|
|
1211
1211
|
- Assets to generate: name them. A skybox and the cover usually earn their place in slice 1.
|
|
1212
|
+
- Art style: voxel (the default) or low-poly — \`artStyle\` in \`src/work/game.json\`; decided before the first cover
|
|
1212
1213
|
- Level: procedural baseline terrain, unless the terrain IS the mechanic (forge — or Blender, if that skill's gate passes)
|
|
1213
1214
|
|
|
1214
1215
|
## Deferred — the backlog
|
|
@@ -1248,9 +1249,8 @@ played without its shape — skiing, racing on a real circuit, open-world drivin
|
|
|
1248
1249
|
interior. For everything else the baseline's procedural voxel terrain is a fine slice-1 world and the
|
|
1249
1250
|
forge is backlog item 1, run once the loop is proven. A designed place — an interior, a station, a
|
|
1250
1251
|
stylised set the creator has a picture of — has a second route, building it in Blender from a
|
|
1251
|
-
script (\`${PRIMARY_SKILLS_DIR}/building-levels-in-blender/SKILL.md
|
|
1252
|
-
|
|
1253
|
-
the forge.
|
|
1252
|
+
script (\`${PRIMARY_SKILLS_DIR}/building-levels-in-blender/SKILL.md\`, gated on the model and on
|
|
1253
|
+
Blender being available). That route is a low-poly game: set \`artStyle: "low-poly"\` in game.json first.
|
|
1254
1254
|
|
|
1255
1255
|
## Step 5 — hand it back
|
|
1256
1256
|
|
|
@@ -1491,10 +1491,10 @@ clip, because it is solved locally rather than generated by a model.
|
|
|
1491
1491
|
|
|
1492
1492
|
\`model\` is the one to reach for when the game needs an object that does not exist yet — a new
|
|
1493
1493
|
asset from a sentence. It needs Chrome and a free port between 3000 and 3199, because only the
|
|
1494
|
-
engine can voxelize
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
placed.
|
|
1494
|
+
engine can voxelize (a low-poly project keeps the mesh instead — no browser). \`--height\` scales
|
|
1495
|
+
it (interiors fill solid below 6 m and stay hollow above, so a building is not baked as a solid
|
|
1496
|
+
block), and \`--name\` sets what game code places by. Do not confuse it with \`prop\`, which
|
|
1497
|
+
REPLACES an existing placeholder and changes every instance already placed.
|
|
1498
1498
|
|
|
1499
1499
|
\`video\` makes a short clip for a cutscene. It is the one asset the game does not draw: the row it
|
|
1500
1500
|
writes is played as a fullscreen overlay by \`engine.playVideo("<asset id>")\`, which resolves when
|
|
@@ -1586,8 +1586,8 @@ explicitly. You never need to guess whether a failed generation half-applied.
|
|
|
1586
1586
|
Not a generation, but the same registry: \`bitmagic assets add <file>\` uploads a \`.glb\`
|
|
1587
1587
|
(voxelized in a headless browser — Chrome and a free port in 3000–3199, like \`vehicle\`), a
|
|
1588
1588
|
\`.vxl\`, an image (\`.png/.jpg/.webp\`), audio (\`.opus/.ogg/.m4a/.mp3\`) or a config \`.json\`
|
|
1589
|
-
into \`assets[]\` and prints the id. \`--keep-glb\` registers a \`.glb\` as a polygon mesh instead
|
|
1590
|
-
\`--voxel-size\`, \`--height
|
|
1589
|
+
into \`assets[]\` and prints the id. \`--keep-glb\` registers a \`.glb\` as a polygon mesh instead (a
|
|
1590
|
+
low-poly project's default); \`--voxel-size\`, \`--height\`, \`--hollow\` tune the bake. No sparks. \`bitmagic
|
|
1591
1591
|
assets list\` shows what is there; \`bitmagic assets remove <id>\` takes one out of \`world.json\`
|
|
1592
1592
|
(the file stays in storage) and refuses while something in \`world.json\` still references it.
|
|
1593
1593
|
|
|
@@ -1731,7 +1731,8 @@ dimension gaining a point is worth 0.25 overall, and you are entitled to see it.
|
|
|
1731
1731
|
What it is **not** is a target. There is no score at which a game is done, and two things will not
|
|
1732
1732
|
move it however many rounds you spend:
|
|
1733
1733
|
|
|
1734
|
-
- **Your art style.** Declare it under \`## Art direction\` in \`GAME-DESIGN.md\`
|
|
1734
|
+
- **Your art style.** Declare it under \`## Art direction\` in \`GAME-DESIGN.md\` (with \`artStyle\`
|
|
1735
|
+
in game.json as the fallback the judge reads when the heading is missing) and the judge
|
|
1735
1736
|
grades craft within that medium. If it is still calling your voxel characters blocky, that
|
|
1736
1737
|
heading is missing or empty — fix the document, not the game.
|
|
1737
1738
|
- **Matters of taste.** When the remaining findings are things a reasonable person could disagree
|
|
@@ -1762,8 +1763,17 @@ style or taste, say so to the creator and move on. That is a finished frame, not
|
|
|
1762
1763
|
* more to an image model than how the input mapping works — but nothing enforces them: the whole
|
|
1763
1764
|
* file is read as prose.
|
|
1764
1765
|
*/
|
|
1765
|
-
export function renderGameDesignMd(idea) {
|
|
1766
|
+
export function renderGameDesignMd(idea, artStyle) {
|
|
1766
1767
|
const pitch = idea?.trim();
|
|
1768
|
+
// Declared at init: the medium is known, so the heading the judge reads is written from the
|
|
1769
|
+
// start — the creator adds the palette and mood. Undeclared: the prompt text, exactly as before.
|
|
1770
|
+
const artDirection = artStyle === undefined
|
|
1771
|
+
? `The medium and style you chose, in a sentence or two — voxel, low-poly, flat colour, pixel art.
|
|
1772
|
+
\`bitmagic judge\` reads THIS heading to know what is intentional: state it here and the judge
|
|
1773
|
+
grades craft within your style instead of reporting the style itself as a defect. Without it, a
|
|
1774
|
+
voxel game gets told its characters are blocky.`
|
|
1775
|
+
: `${describeArtStyle(artStyle)} (declared as \`artStyle\` in \`src/work/game.json\`.) Add the
|
|
1776
|
+
palette, mood and the references you are drawing from; \`bitmagic judge\` reads this heading.`;
|
|
1767
1777
|
return `# Game design
|
|
1768
1778
|
|
|
1769
1779
|
${pitch
|
|
@@ -1786,10 +1796,7 @@ ${GAME_DESIGN_REFERENCE_HINT}
|
|
|
1786
1796
|
|
|
1787
1797
|
## Art direction
|
|
1788
1798
|
|
|
1789
|
-
|
|
1790
|
-
\`bitmagic judge\` reads THIS heading to know what is intentional: state it here and the judge
|
|
1791
|
-
grades craft within your style instead of reporting the style itself as a defect. Without it, a
|
|
1792
|
-
voxel game gets told its characters are blocky.
|
|
1799
|
+
${artDirection}
|
|
1793
1800
|
|
|
1794
1801
|
## Win / lose
|
|
1795
1802
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,YAAY,GAEb,MAAM,oBAAoB,CAAC;AAK5B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;IAkBnC,CAAC;AAEL;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,2BAA2B,EAAE,SAAS;IACtC,2BAA2B,EAAE,SAAS;IACtC,kBAAkB,EAAE,QAAQ;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,kCAAkC,EAAE,QAAQ;IAC5C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;IACjB,4FAA4F;IAC5F,6FAA6F;IAC7F,4CAA4C;CACZ,CAAC;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,UAAU;IACzB,cAAc,EAAE,UAAU;IAC1B,8FAA8F;IAC9F,cAAc,EAAE,QAAQ;IACxB,4FAA4F;IAC5F,mFAAmF;IACnF,eAAe,EAAE,S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AAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAC;AACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ArtStyle } from '@bitmagic/asset-core/art-style';
|
|
1
2
|
import { type ProjectMetadata, type SkillRenderer } from './project-files.js';
|
|
2
3
|
import { type AgentId } from './agent-targets.js';
|
|
3
4
|
export interface TemplateEntry {
|
|
@@ -172,6 +173,12 @@ export interface ScaffoldOptions {
|
|
|
172
173
|
projectName: string;
|
|
173
174
|
/** `bitmagic init --idea`, seeding GAME-DESIGN.md's Pitch. Absent leaves the skeleton empty. */
|
|
174
175
|
idea?: string;
|
|
176
|
+
/**
|
|
177
|
+
* `bitmagic init --art-style`: stamped into `src/work/game.json` and pre-filled under
|
|
178
|
+
* GAME-DESIGN.md's Art direction. Absent writes nothing, so a voxel project's game.json is the
|
|
179
|
+
* template's own — the field's absence means voxel everywhere it is read.
|
|
180
|
+
*/
|
|
181
|
+
artStyle?: ArtStyle;
|
|
175
182
|
}
|
|
176
183
|
/**
|
|
177
184
|
* Puts the platform's own code into the project: the vendored `engine/` tree and the service
|
|
@@ -189,6 +196,8 @@ export interface ProjectFileOptions {
|
|
|
189
196
|
projectName: string;
|
|
190
197
|
/** `bitmagic init --idea`, seeding GAME-DESIGN.md's Pitch. Ignored when `gameDesign` is 'keep'. */
|
|
191
198
|
idea?: string;
|
|
199
|
+
/** Pre-fills GAME-DESIGN.md's Art direction. Ignored when `gameDesign` is 'keep'. */
|
|
200
|
+
artStyle?: ArtStyle;
|
|
192
201
|
/**
|
|
193
202
|
* Whether to write GAME-DESIGN.md at all.
|
|
194
203
|
*
|
package/dist/scaffold/project.js
CHANGED
|
@@ -309,7 +309,7 @@ export function vendorEngine(extractedEngineDir, targetDir) {
|
|
|
309
309
|
* argued on that constant.
|
|
310
310
|
*/
|
|
311
311
|
export function writeProjectFiles(options) {
|
|
312
|
-
const { targetDir, metadata, projectName, idea, gameDesign = 'render' } = options;
|
|
312
|
+
const { targetDir, metadata, projectName, idea, artStyle, gameDesign = 'render' } = options;
|
|
313
313
|
// The project's own declaration, so `bitmagic.json` and the file set on disk cannot disagree.
|
|
314
314
|
const agents = metadata.agents ?? ALWAYS_AGENTS;
|
|
315
315
|
// Stamped as it is written, so a later `bitmagic upgrade` can tell whether the creator has
|
|
@@ -326,7 +326,7 @@ export function writeProjectFiles(options) {
|
|
|
326
326
|
// Creator-owned from here on (see PLATFORM_GENERATED_FILES): the agent rewrites it as the
|
|
327
327
|
// game takes shape, and `bitmagic cover` reads whatever it says at the time.
|
|
328
328
|
...(gameDesign === 'render'
|
|
329
|
-
? [['GAME-DESIGN.md', renderGameDesignMd(idea)]]
|
|
329
|
+
? [['GAME-DESIGN.md', renderGameDesignMd(idea, artStyle)]]
|
|
330
330
|
: []),
|
|
331
331
|
['CLAUDE.md', renderClaudeMd()],
|
|
332
332
|
['.gitignore', renderGitignore()],
|
|
@@ -340,7 +340,7 @@ export function writeProjectFiles(options) {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
export function scaffoldProject(options) {
|
|
343
|
-
const { targetDir, extractedEngineDir, templatesDir, template, metadata, projectName, idea } = options;
|
|
343
|
+
const { targetDir, extractedEngineDir, templatesDir, template, metadata, projectName, idea, artStyle } = options;
|
|
344
344
|
vendorEngine(extractedEngineDir, targetDir);
|
|
345
345
|
// The game: the genre baseline, then the template overlaid on top. Contents are copied, not
|
|
346
346
|
// the directory itself — a nested src/work/<genre>/ would break every relative import in
|
|
@@ -361,11 +361,31 @@ export function scaffoldProject(options) {
|
|
|
361
361
|
if (fs.existsSync(overlayDir)) {
|
|
362
362
|
copyContents(overlayDir, srcDir);
|
|
363
363
|
}
|
|
364
|
+
if (artStyle !== undefined)
|
|
365
|
+
stampArtStyle(srcDir, artStyle);
|
|
364
366
|
writeProjectFiles({
|
|
365
367
|
targetDir,
|
|
366
368
|
metadata,
|
|
367
369
|
projectName,
|
|
368
370
|
...(idea !== undefined ? { idea } : {}),
|
|
371
|
+
...(artStyle !== undefined ? { artStyle } : {}),
|
|
369
372
|
});
|
|
370
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Write `artStyle` into the copied template's game.json, beside the metadata the template
|
|
376
|
+
* carries. A re-serialize of the whole document rather than a text patch: the template's own
|
|
377
|
+
* formatting is two-space JSON already, so the file the creator sees is unchanged apart from the
|
|
378
|
+
* one added line.
|
|
379
|
+
*/
|
|
380
|
+
function stampArtStyle(srcDir, artStyle) {
|
|
381
|
+
const gamePath = path.join(srcDir, 'game.json');
|
|
382
|
+
if (!fs.existsSync(gamePath)) {
|
|
383
|
+
throw new CliError(`The template has no ${gamePath}, so --art-style has nowhere to be written.`);
|
|
384
|
+
}
|
|
385
|
+
const parsed = JSON.parse(fs.readFileSync(gamePath, 'utf-8'));
|
|
386
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
387
|
+
throw new CliError(`${gamePath} is not a JSON object, so --art-style cannot be written into it.`);
|
|
388
|
+
}
|
|
389
|
+
fs.writeFileSync(gamePath, `${JSON.stringify({ ...parsed, artStyle }, null, 2)}\n`);
|
|
390
|
+
}
|
|
371
391
|
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAA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AS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChD,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,MAAc,EAAE,QAAkB;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,QAAQ,CAAC,uBAAuB,QAAQ,6CAA6C,CAAC,CAAC;IACnG,CAAC;IACD,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3E,MAAM,IAAI,QAAQ,CAAC,GAAG,QAAQ,kEAAkE,CAAC,CAAC;IACpG,CAAC;IACD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,GAAI,MAAkC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACnH,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* markdown, so backticks are escaped exactly as project-files.ts escapes them.
|
|
10
10
|
*/
|
|
11
11
|
/** The `## Reference image` section of the scaffolded AGENTS.md, placed before the cover section. */
|
|
12
|
-
export declare const AGENTS_MD_REFERENCE_SECTION = "## Reference image \u2014 offer it when the idea has a strong setting\n\nWhen the idea names a **place or a look** \u2014 a tropical island, a neon city \u2014 offer to make a\nconcept image of the world before generating anything else:\n\n```\nbitmagic reference make # a candidate lands in .bitmagic/reference/\nbitmagic reference make --from <id> --prompt \"same island, but at dusk\"\nbitmagic reference accept <id> # the human's call, never yours\n```\n\
|
|
12
|
+
export declare const AGENTS_MD_REFERENCE_SECTION = "## Reference image \u2014 offer it when the idea has a strong setting\n\nWhen the idea names a **place or a look** \u2014 a tropical island, a neon city \u2014 offer to make a\nconcept image of the world before generating anything else:\n\n```\nbitmagic reference make # a candidate lands in .bitmagic/reference/\nbitmagic reference make --from <id> --prompt \"same island, but at dusk\"\nbitmagic reference accept <id> # the human's call, never yours\n```\n\nThe prompt follows game.json's `artStyle`, so declare the medium first. Show the human each image\nfile and let THEM iterate and accept. Once accepted, it is the default\nstyle reference for `generate skybox|background|block-type|image`, `bitmagic cover` and\n`bitmagic forge` (whose designer literally sees the picture) \u2014 one look across the whole game;\n`--no-reference` exempts a call, and a picture the human hands you for ONE request rides that\ncall as `--reference-image <file>` instead. Accepting prints a durable URL: paste it into\n`GAME-DESIGN.md`'s world/look section, since `.bitmagic/` is not committed and\n`bitmagic reference accept <url>` is how a fresh clone gets it back. Details are in\n`.agents/skills/generating-assets/SKILL.md`; skip the offer when the idea has no visual identity\nyet.\n\n";
|
|
13
13
|
/** The planning skill's step-1 paragraph on offering a reference image. */
|
|
14
14
|
export declare const PLANNING_SKILL_REFERENCE_STEP1 = "If the idea describes a **place** \u2014 an island, a city, a specific look \u2014 offer a reference image\nbefore anything else is generated: `bitmagic reference make`, show the human the file it prints,\niterate with `--from <id>`, and run `accept` only when they choose one. Every skybox, block,\ncover and forge after that inherits the accepted image, so it is worth settling first \u2014 and worth\nskipping when the idea has no visual identity yet.\n\n";
|
|
15
15
|
/** The planning skill's step-4 list entry (rendered between the design-doc and cover steps). */
|
|
@@ -21,7 +21,8 @@ bitmagic reference make --from <id> --prompt "same island, but at dusk"
|
|
|
21
21
|
bitmagic reference accept <id> # the human's call, never yours
|
|
22
22
|
\`\`\`
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The prompt follows game.json's \`artStyle\`, so declare the medium first. Show the human each image
|
|
25
|
+
file and let THEM iterate and accept. Once accepted, it is the default
|
|
25
26
|
style reference for \`generate skybox|background|block-type|image\`, \`bitmagic cover\` and
|
|
26
27
|
\`bitmagic forge\` (whose designer literally sees the picture) — one look across the whole game;
|
|
27
28
|
\`--no-reference\` exempts a call, and a picture the human hands you for ONE request rides that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-guidance.js","sourceRoot":"","sources":["../../src/scaffold/reference-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,qGAAqG;AACrG,MAAM,CAAC,MAAM,2BAA2B,GAAG
|
|
1
|
+
{"version":3,"file":"reference-guidance.js","sourceRoot":"","sources":["../../src/scaffold/reference-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,qGAAqG;AACrG,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;IAmBvC,kBAAkB;;;CAGrB,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;CAM7C,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,8BAA8B,GAAG;;CAE7C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GACrC,6HAA6H,CAAC"}
|
|
@@ -94,7 +94,7 @@ are lost on the next upgrade.
|
|
|
94
94
|
| \`publishing-a-game/\` | shipping the game to bitmagic.ai — the verify gate, public vs private, thumbnails, category tags, and every way \`bitmagic publish\` can refuse |
|
|
95
95
|
| \`working-with-the-creator/\` | they are editing alongside you — gizmo drags into \`world.json\`, a pasted frame from their game, \`.bitmagic/edit/events.jsonl\`, their phone |
|
|
96
96
|
| \`converting-unity-levels/\` | a creator wants a Unity scene or game ported, replicated or "brought over" — reusing its prefabs, FBX models and colliders — or a converted level has pieces rotated, mis-scaled, walls that do not collide, an empty corner |
|
|
97
|
-
| \`building-levels-in-blender/\` | a hand-designed low-poly world — an interior, a station, a stylised set, "not voxels", "in Blender" — built from a Python script into one GLB the engine's MeshLevel loads; or such a level has walls you fall through, doors that do not open, z-fighting, an empty world after publish. Its first section says when the path is yours |
|
|
97
|
+
| \`building-levels-in-blender/\` | a hand-designed low-poly world — an interior, a station, a stylised set, "not voxels", "in Blender" — built from a Python script into one GLB the engine's MeshLevel loads, and the \`artStyle: "low-poly"\` switch in game.json that makes the cover, asset and judge defaults follow; or such a level has walls you fall through, doors that do not open, z-fighting, an empty world after publish. Its first section says when the path is yours |
|
|
98
98
|
|
|
99
99
|
Every other directory here is yours. \`upgrade\` never opens a skill it does not ship, and never
|
|
100
100
|
deletes anything under a skills directory. Put project-specific guidance in a skill of your own, or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitmagic/cli",
|
|
3
|
-
"version": "0.1.64-dev.
|
|
3
|
+
"version": "0.1.64-dev.5",
|
|
4
4
|
"description": "Build Bitmagic games from your own agent tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Bitmagic Oy",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"playwright-core": "^1.59.1",
|
|
26
26
|
"tar": "^7.4.3",
|
|
27
27
|
"ws": "^8.21.3",
|
|
28
|
-
"@bitmagic/
|
|
29
|
-
"@bitmagic/world-forger": "0.1.24-dev.
|
|
30
|
-
"@bitmagic/
|
|
28
|
+
"@bitmagic/asset-core": "0.2.19-dev.5",
|
|
29
|
+
"@bitmagic/world-forger": "0.1.24-dev.5",
|
|
30
|
+
"@bitmagic/animation-forger": "0.1.19-dev.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@eslint/js": "^9.38.0",
|