@pix3/cli 1.6.4 → 2.0.0-alpha.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.
Files changed (168) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +722 -788
  3. package/dist/index.js +557 -421
  4. package/dist/runtime-types.json +1 -1
  5. package/dist/smoke/prebuilt/{build-7MIXIMSZ.mjs → build-7REMSA2S.mjs} +52 -52
  6. package/dist/smoke/prebuilt/chunk-4DGG2BKR.mjs +2 -0
  7. package/dist/smoke/prebuilt/chunk-YLBMUJ2H.mjs +238 -0
  8. package/dist/smoke/prebuilt/runtime.mjs +1 -1
  9. package/dist/smoke/prebuilt/smoke-worker.mjs +211 -2
  10. package/dist/smoke/prebuilt/tree-defaults.mjs +1 -1
  11. package/dist/validate/prebuilt/{build-AUGKXER3.js → build-ADF5EEE2.js} +52 -52
  12. package/dist/validate/prebuilt/bundle-main.js +223 -18
  13. package/dist/validate/prebuilt/chunk-VIHIF4G2.js +238 -0
  14. package/dist/validate/prebuilt/runtime.js +1 -1
  15. package/kit/files/.claude/skills/pix3-editor/SKILL.md +200 -0
  16. package/kit/files/.claude/skills/pix3-nodes/SKILL.md +13 -15
  17. package/kit/files/.claude/skills/pix3-nodes/reference.md +77 -71
  18. package/kit/files/.claude/skills/pix3-scene-format/SKILL.md +38 -41
  19. package/kit/files/.claude/skills/pix3-scene-format/pix3anim.md +185 -0
  20. package/kit/files/.claude/skills/pix3-scene-format/project-files.md +244 -0
  21. package/kit/files/.claude/skills/pix3-scene-format/reference.md +28 -16
  22. package/kit/files/.claude/skills/pix3-scripts/SKILL.md +34 -24
  23. package/kit/files/.claude/skills/pix3-scripts/reference.md +68 -141
  24. package/kit/files/.claude/skills/pix3-verify/SKILL.md +65 -326
  25. package/kit/files/.claude/skills/pix3-verify/reference.md +2 -14
  26. package/kit/files/AGENTS.md +76 -84
  27. package/kit/files/design/tests/bots/pix3-test-bot.d.ts +89 -0
  28. package/kit/kit.json +8 -5
  29. package/package.json +62 -54
  30. package/templates/2d/files/scenes/main.pix3scene +31 -0
  31. package/templates/2d/template.yaml +11 -0
  32. package/templates/3d/files/scenes/main.pix3scene +50 -0
  33. package/templates/3d/template.yaml +11 -0
  34. package/templates/base/files/README.md +39 -0
  35. package/templates/base/files/gitignore +11 -0
  36. package/templates/base/files/index.html +23 -0
  37. package/templates/base/files/package.json +28 -0
  38. package/templates/base/files/src/main.ts +3 -0
  39. package/templates/base/files/tsconfig.json +17 -0
  40. package/templates/base/files/vite.config.ts +10 -0
  41. package/dist/smoke/prebuilt/chunk-CBFYKDS7.mjs +0 -2
  42. package/dist/smoke/prebuilt/chunk-VJHJ5BCO.mjs +0 -239
  43. package/dist/validate/prebuilt/chunk-CFQFEI52.js +0 -239
  44. package/templates/empty-2d/files/README.md +0 -20
  45. package/templates/empty-2d/files/scenes/main.pix3scene +0 -68
  46. package/templates/empty-2d/files/sprites/pix3-logo.png +0 -0
  47. package/templates/empty-2d/template.yaml +0 -7
  48. package/templates/empty-3d/files/README.md +0 -20
  49. package/templates/empty-3d/files/scenes/main.pix3scene +0 -108
  50. package/templates/empty-3d/files/sprites/pix3-logo.png +0 -0
  51. package/templates/empty-3d/template.yaml +0 -7
  52. package/templates/idea-blank/files/README.md +0 -22
  53. package/templates/idea-blank/files/scenes/main.pix3scene +0 -37
  54. package/templates/idea-blank/template.yaml +0 -10
  55. package/templates/minigame-2d/files/README.md +0 -44
  56. package/templates/minigame-2d/files/design/tests/reachability.json +0 -1
  57. package/templates/minigame-2d/files/design/tests/routines/mute-music.json +0 -44
  58. package/templates/minigame-2d/files/scenes/main.pix3scene +0 -84
  59. package/templates/minigame-2d/files/scenes/menu.pix3scene +0 -118
  60. package/templates/minigame-2d/files/scenes/ui/settings-window.pix3scene +0 -138
  61. package/templates/minigame-2d/files/scripts/GameFlow.ts +0 -133
  62. package/templates/minigame-2d/files/scripts/MenuFlow.ts +0 -217
  63. package/templates/minigame-2d/files/scripts/SettingsWindow.ts +0 -198
  64. package/templates/minigame-2d/template.yaml +0 -10
  65. package/templates/playable-2d/files/README.md +0 -30
  66. package/templates/playable-2d/files/design/recipe.md +0 -83
  67. package/templates/playable-2d/files/design/tests/reachability.json +0 -4
  68. package/templates/playable-2d/files/design/tests/routines/intro-to-cta.json +0 -32
  69. package/templates/playable-2d/files/scenes/main.pix3scene +0 -111
  70. package/templates/playable-2d/files/scenes/ui/end-screen.pix3scene +0 -91
  71. package/templates/playable-2d/files/scenes/ui/intro.pix3scene +0 -65
  72. package/templates/playable-2d/files/scripts/CtaButton.ts +0 -55
  73. package/templates/playable-2d/files/scripts/GameFlow.ts +0 -256
  74. package/templates/playable-2d/files/sprites/pix3-logo.png +0 -0
  75. package/templates/playable-2d/template.yaml +0 -9
  76. package/templates/playable-3d/files/README.md +0 -32
  77. package/templates/playable-3d/files/design/recipe.md +0 -127
  78. package/templates/playable-3d/files/design/tests/reachability.json +0 -4
  79. package/templates/playable-3d/files/design/tests/routines/intro-to-cta.json +0 -32
  80. package/templates/playable-3d/files/scenes/main.pix3scene +0 -230
  81. package/templates/playable-3d/files/scenes/ui/end-screen.pix3scene +0 -91
  82. package/templates/playable-3d/files/scenes/ui/intro.pix3scene +0 -65
  83. package/templates/playable-3d/files/scripts/CtaButton.ts +0 -55
  84. package/templates/playable-3d/files/scripts/GameFlow.ts +0 -309
  85. package/templates/playable-3d/files/scripts/GameRules.ts +0 -290
  86. package/templates/playable-3d/files/scripts/ScoreHud.ts +0 -113
  87. package/templates/playable-3d/template.yaml +0 -9
  88. package/templates/recipe-arena-2d/files/README.md +0 -48
  89. package/templates/recipe-arena-2d/files/design/recipe.md +0 -127
  90. package/templates/recipe-arena-2d/files/design/tests/reachability.json +0 -4
  91. package/templates/recipe-arena-2d/files/design/tests/routines/terminal-retry.json +0 -23
  92. package/templates/recipe-arena-2d/files/scenes/main.pix3scene +0 -292
  93. package/templates/recipe-arena-2d/files/scenes/menu.pix3scene +0 -100
  94. package/templates/recipe-arena-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
  95. package/templates/recipe-arena-2d/files/scenes/prefabs/pickup.pix3scene +0 -45
  96. package/templates/recipe-arena-2d/files/scenes/ui/result.pix3scene +0 -85
  97. package/templates/recipe-arena-2d/files/scripts/GameRules.ts +0 -368
  98. package/templates/recipe-arena-2d/files/scripts/MenuFlow.ts +0 -106
  99. package/templates/recipe-arena-2d/files/scripts/PlayerController.ts +0 -151
  100. package/templates/recipe-arena-2d/files/scripts/ScoreHud.ts +0 -94
  101. package/templates/recipe-arena-2d/files/scripts/Spawner.ts +0 -214
  102. package/templates/recipe-arena-2d/files/scripts/TouchRules.ts +0 -174
  103. package/templates/recipe-arena-2d/files/sprites/ph-avatar.png +0 -0
  104. package/templates/recipe-arena-2d/files/sprites/ph-hazard.png +0 -0
  105. package/templates/recipe-arena-2d/files/sprites/ph-pickup.png +0 -0
  106. package/templates/recipe-arena-2d/template.yaml +0 -10
  107. package/templates/recipe-blank-2d/files/README.md +0 -61
  108. package/templates/recipe-blank-2d/files/design/recipe.md +0 -148
  109. package/templates/recipe-blank-2d/files/design/tests/reachability.json +0 -4
  110. package/templates/recipe-blank-2d/files/design/tests/routines/restart.json +0 -27
  111. package/templates/recipe-blank-2d/files/design/tests/routines/terminal-retry.json +0 -23
  112. package/templates/recipe-blank-2d/files/scenes/main.pix3scene +0 -224
  113. package/templates/recipe-blank-2d/files/scenes/ui/result.pix3scene +0 -85
  114. package/templates/recipe-blank-2d/files/scripts/GameRules.ts +0 -350
  115. package/templates/recipe-blank-2d/files/scripts/ScoreHud.ts +0 -110
  116. package/templates/recipe-blank-2d/files/sprites/ph-bg.png +0 -0
  117. package/templates/recipe-blank-2d/files/sprites/ph-capsule.png +0 -0
  118. package/templates/recipe-blank-2d/files/sprites/ph-circle.png +0 -0
  119. package/templates/recipe-blank-2d/files/sprites/ph-orb.png +0 -0
  120. package/templates/recipe-blank-2d/files/sprites/ph-ring.png +0 -0
  121. package/templates/recipe-blank-2d/files/sprites/ph-star.png +0 -0
  122. package/templates/recipe-blank-2d/template.yaml +0 -10
  123. package/templates/recipe-bouncer-2d/files/README.md +0 -81
  124. package/templates/recipe-bouncer-2d/files/design/recipe.md +0 -146
  125. package/templates/recipe-bouncer-2d/files/design/tests/reachability.json +0 -4
  126. package/templates/recipe-bouncer-2d/files/design/tests/routines/terminal-retry.json +0 -23
  127. package/templates/recipe-bouncer-2d/files/scenes/main.pix3scene +0 -615
  128. package/templates/recipe-bouncer-2d/files/scenes/menu.pix3scene +0 -191
  129. package/templates/recipe-bouncer-2d/files/scenes/ui/result.pix3scene +0 -87
  130. package/templates/recipe-bouncer-2d/files/scripts/BallBody.ts +0 -298
  131. package/templates/recipe-bouncer-2d/files/scripts/GameRules.ts +0 -377
  132. package/templates/recipe-bouncer-2d/files/scripts/MenuFlow.ts +0 -109
  133. package/templates/recipe-bouncer-2d/files/scripts/PaddleController.ts +0 -112
  134. package/templates/recipe-bouncer-2d/files/scripts/ScoreHud.ts +0 -94
  135. package/templates/recipe-bouncer-2d/files/scripts/TouchRules.ts +0 -263
  136. package/templates/recipe-bouncer-2d/files/scripts/ball-collision.ts +0 -307
  137. package/templates/recipe-bouncer-2d/files/sprites/ph-ball.png +0 -0
  138. package/templates/recipe-bouncer-2d/files/sprites/ph-bg.png +0 -0
  139. package/templates/recipe-bouncer-2d/files/sprites/ph-bumper.png +0 -0
  140. package/templates/recipe-bouncer-2d/files/sprites/ph-paddle.png +0 -0
  141. package/templates/recipe-bouncer-2d/template.yaml +0 -10
  142. package/templates/recipe-grid-3d/files/README.md +0 -22
  143. package/templates/recipe-grid-3d/files/design/recipe.md +0 -110
  144. package/templates/recipe-grid-3d/files/scenes/main.pix3scene +0 -169
  145. package/templates/recipe-grid-3d/files/scenes/menu.pix3scene +0 -100
  146. package/templates/recipe-grid-3d/files/scenes/ui/result.pix3scene +0 -105
  147. package/templates/recipe-grid-3d/files/scripts/GridBoard.ts +0 -319
  148. package/templates/recipe-grid-3d/files/scripts/GridRules.ts +0 -278
  149. package/templates/recipe-grid-3d/files/scripts/MenuFlow.ts +0 -106
  150. package/templates/recipe-grid-3d/files/scripts/ScoreHud.ts +0 -94
  151. package/templates/recipe-grid-3d/template.yaml +0 -10
  152. package/templates/recipe-tapper-2d/files/README.md +0 -39
  153. package/templates/recipe-tapper-2d/files/design/recipe.md +0 -132
  154. package/templates/recipe-tapper-2d/files/design/tests/reachability.json +0 -4
  155. package/templates/recipe-tapper-2d/files/design/tests/routines/terminal-retry.json +0 -23
  156. package/templates/recipe-tapper-2d/files/scenes/main.pix3scene +0 -269
  157. package/templates/recipe-tapper-2d/files/scenes/menu.pix3scene +0 -100
  158. package/templates/recipe-tapper-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
  159. package/templates/recipe-tapper-2d/files/scenes/prefabs/target.pix3scene +0 -45
  160. package/templates/recipe-tapper-2d/files/scenes/ui/result.pix3scene +0 -85
  161. package/templates/recipe-tapper-2d/files/scripts/GameRules.ts +0 -368
  162. package/templates/recipe-tapper-2d/files/scripts/MenuFlow.ts +0 -106
  163. package/templates/recipe-tapper-2d/files/scripts/ScoreHud.ts +0 -94
  164. package/templates/recipe-tapper-2d/files/scripts/Spawner.ts +0 -214
  165. package/templates/recipe-tapper-2d/files/scripts/TouchRules.ts +0 -192
  166. package/templates/recipe-tapper-2d/files/sprites/ph-hazard.png +0 -0
  167. package/templates/recipe-tapper-2d/files/sprites/ph-target.png +0 -0
  168. package/templates/recipe-tapper-2d/template.yaml +0 -10
@@ -1,20 +0,0 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A Pix3 project created from the **Empty 2D** template.
4
-
5
- ## Project structure
6
-
7
- - `design/` — game design document and reference images
8
- - `scenes/` — scene files (`.pix3scene`, YAML)
9
- - `sprites/` — images and textures
10
- - `scripts/` — game scripts (`export class X extends Script`, used as `user:X`)
11
- - `audio/` — music and sound effects
12
- - `AGENTS.md` — rules and pointers for AI agents working on this project
13
-
14
- New asset-type folders (models, fonts, …) are created as you add those assets.
15
-
16
- ## Getting started
17
-
18
- 1. Open the project folder in the Pix3 editor.
19
- 2. `scenes/main.pix3scene` is the startup scene — press Play to run it.
20
- 3. Drop your GDD and reference art into `design/`, then ask an AI agent to build the game.
@@ -1,68 +0,0 @@
1
- # Pix3 Scene File (YAML)
2
- # Empty 2D starter: a Full HD canvas with a background, a centered label and the
3
- # project logo. All content lives on the 2D layer.
4
- version: 1.0.0
5
- metadata:
6
- author: Pix3 Template
7
- description: Empty 2D starter scene
8
- root:
9
- - id: game-root
10
- type: Group2D
11
- name: Game Root
12
- properties:
13
- width: 1920
14
- height: 1080
15
- layout:
16
- enabled: true
17
- horizontalAlign: stretch
18
- verticalAlign: stretch
19
- children:
20
- - id: background
21
- type: ColorRect2D
22
- name: Background
23
- properties:
24
- width: 1920
25
- height: 1080
26
- color: "#1a1a2e"
27
- transform:
28
- position: [0, 0]
29
- scale: [1, 1]
30
- rotation: 0
31
- layout:
32
- enabled: true
33
- horizontalAlign: stretch
34
- verticalAlign: stretch
35
- children: []
36
- - id: title-label
37
- type: Label2D
38
- name: Title Label
39
- properties:
40
- label: "{{PROJECT_NAME}}"
41
- labelFontSize: 72
42
- labelColor: "#ffffff"
43
- labelAlign: center
44
- transform:
45
- position: [0, 60]
46
- scale: [1, 1]
47
- rotation: 0
48
- layout:
49
- enabled: true
50
- horizontalAlign: center
51
- verticalAlign: center
52
- children: []
53
- - id: logo-sprite
54
- type: Sprite2D
55
- name: Logo Sprite
56
- properties:
57
- texture: { type: 'texture', url: 'res://sprites/pix3-logo.png' }
58
- width: 242
59
- height: 96
60
- transform:
61
- position: [0, -80]
62
- scale: [1, 1]
63
- rotation: 0
64
- layout:
65
- enabled: true
66
- horizontalAlign: center
67
- verticalAlign: center
68
- children: []
@@ -1,7 +0,0 @@
1
- id: empty-2d
2
- title: Empty 2D
3
- description: Minimal 2D starter — background, centered label and logo on a Full HD canvas.
4
- projectType: 2d
5
- targetPlatform: universal
6
- viewport: { width: 1920, height: 1080 }
7
- order: 20
@@ -1,20 +0,0 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A Pix3 project created from the **Empty 3D** template.
4
-
5
- ## Project structure
6
-
7
- - `design/` — game design document and reference images
8
- - `scenes/` — scene files (`.pix3scene`, YAML)
9
- - `sprites/` — images and textures
10
- - `scripts/` — game scripts (`export class X extends Script`, used as `user:X`)
11
- - `audio/` — music and sound effects
12
- - `AGENTS.md` — rules and pointers for AI agents working on this project
13
-
14
- New asset-type folders (`models/` for GLB/GLTF, fonts, …) are created as you add those assets.
15
-
16
- ## Getting started
17
-
18
- 1. Open the project folder in the Pix3 editor.
19
- 2. `scenes/main.pix3scene` is the startup scene — press Play to run it.
20
- 3. Drop your GDD and reference art into `design/`, then ask an AI agent to build the game.
@@ -1,108 +0,0 @@
1
- # Pix3 Scene File (YAML)
2
- # Empty 3D starter: environment root with a box mesh, key light, ambient fill,
3
- # a perspective camera, and a 2D UI layer with the project logo.
4
- version: 1.0.0
5
- metadata:
6
- author: Pix3 Template
7
- description: Empty 3D starter scene
8
- root:
9
- - id: game-root
10
- type: Node3D
11
- name: Game Root
12
- properties:
13
- transform:
14
- position: [0, 0, 0]
15
- rotationEuler: [0, 0, 0]
16
- scale: [1, 1, 1]
17
- children:
18
- - id: main-camera
19
- type: Camera3D
20
- name: Main Camera
21
- properties:
22
- projection: perspective
23
- fov: 60
24
- near: 0.1
25
- far: 1000
26
- transform:
27
- position: [0, 2, 6]
28
- rotationEuler: [-10, 0, 0]
29
- scale: [1, 1, 1]
30
- children: []
31
- - id: key-light
32
- type: DirectionalLightNode
33
- name: Key Light
34
- properties:
35
- intensity: 1.2
36
- color: "#ffffff"
37
- transform:
38
- position: [5, 8, 3]
39
- rotationEuler: [-45, 35, 0]
40
- scale: [1, 1, 1]
41
- children: []
42
- - id: ambient-light
43
- type: AmbientLightNode
44
- name: Ambient Light
45
- properties:
46
- intensity: 0.5
47
- color: "#ffffff"
48
- transform:
49
- position: [0, 0, 0]
50
- rotationEuler: [0, 0, 0]
51
- scale: [1, 1, 1]
52
- children: []
53
- - id: ground
54
- type: GeometryMesh
55
- name: Ground
56
- properties:
57
- geometry: box
58
- size: [12, 0.2, 12]
59
- material:
60
- type: standard
61
- color: "#2a2a3e"
62
- transform:
63
- position: [0, -0.1, 0]
64
- rotationEuler: [0, 0, 0]
65
- scale: [1, 1, 1]
66
- children: []
67
- - id: demo-box
68
- type: GeometryMesh
69
- name: Demo Box
70
- properties:
71
- geometry: box
72
- size: [1, 1, 1]
73
- material:
74
- type: standard
75
- color: "#ffcf33"
76
- transform:
77
- position: [0, 0.5, 0]
78
- rotationEuler: [0, 45, 0]
79
- scale: [1, 1, 1]
80
- children: []
81
-
82
- - id: hud-root
83
- type: Group2D
84
- name: HUD Root
85
- properties:
86
- width: 1920
87
- height: 1080
88
- layout:
89
- enabled: true
90
- horizontalAlign: stretch
91
- verticalAlign: stretch
92
- children:
93
- - id: logo-sprite
94
- type: Sprite2D
95
- name: Logo Sprite
96
- properties:
97
- texture: { type: 'texture', url: 'res://sprites/pix3-logo.png' }
98
- width: 121
99
- height: 48
100
- transform:
101
- position: [0, -460]
102
- scale: [1, 1]
103
- rotation: 0
104
- layout:
105
- enabled: true
106
- horizontalAlign: center
107
- verticalAlign: bottom
108
- children: []
@@ -1,7 +0,0 @@
1
- id: empty-3d
2
- title: Empty 3D
3
- description: Minimal 3D starter — camera, lighting, ground and a demo box, plus a 2D UI layer.
4
- projectType: 3d
5
- targetPlatform: universal
6
- viewport: { width: 1920, height: 1080 }
7
- order: 10
@@ -1,22 +0,0 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A Pix3 project that is still at the **idea stage**: a design document and its references, and no
4
- game yet. The genre skeleton — scenes, scripts, a playable loop — is expanded into this same project
5
- when you press **Start prototype**, so nothing here is thrown away.
6
-
7
- ## Project structure
8
-
9
- - `design/gdd.md` — the design document. This is the idea; everything agreed on lands here.
10
- - `design/decisions.md` — settled forks, one line each, so nothing is decided twice.
11
- - `design/source/` — documents you attached, kept verbatim for reading by section.
12
- - `references/` — reference and moodboard images, with roles in `references/index.json`.
13
- - `scenes/main.pix3scene` — an empty Full HD canvas, a placeholder until the recipe arrives.
14
- - `AGENTS.md` — rules and pointers for AI agents working on this project.
15
-
16
- Sprite, script and audio folders appear when the prototype needs them.
17
-
18
- ## Getting started
19
-
20
- 1. Talk the idea through in the chat next to the document — the document is the record.
21
- 2. Ask for moodboards when you reach the look; the candidates land in `references/`.
22
- 3. Press **Start prototype** when the idea is worth building.
@@ -1,37 +0,0 @@
1
- # Pix3 Scene File (YAML)
2
- # Idea-stage placeholder scene: a Full HD canvas with nothing on it but a background.
3
- # Deliberately bare — the idea stage mounts no runtime, and the recipe that will fill this
4
- # project in is not chosen until "Start prototype". The canonical `game-root` id is kept so
5
- # routines and assertions written against it keep working after the recipe is applied.
6
- version: 1.0.0
7
- metadata:
8
- author: Pix3 Template
9
- description: Empty canvas for a project still at the idea stage
10
- root:
11
- - id: game-root
12
- type: Group2D
13
- name: Game Root
14
- properties:
15
- width: 1920
16
- height: 1080
17
- layout:
18
- enabled: true
19
- horizontalAlign: stretch
20
- verticalAlign: stretch
21
- children:
22
- - id: background
23
- type: ColorRect2D
24
- name: Background
25
- properties:
26
- width: 1920
27
- height: 1080
28
- color: "#1a1a2e"
29
- transform:
30
- position: [0, 0]
31
- scale: [1, 1]
32
- rotation: 0
33
- layout:
34
- enabled: true
35
- horizontalAlign: stretch
36
- verticalAlign: stretch
37
- children: []
@@ -1,10 +0,0 @@
1
- id: idea-blank
2
- title: Idea (blank)
3
- description: Starting point for the Flow idea stage — one empty Full HD 2D canvas, no game. The recipe is chosen later, when the idea becomes a prototype.
4
- projectType: 2d
5
- targetPlatform: universal
6
- viewport: { width: 1920, height: 1080 }
7
- # Last in every ordering, and hidden from the pickers: this template is reached only through the
8
- # idea-stage bootstrap, never chosen by a user or by the recipe resolver.
9
- order: 99
10
- hidden: true
@@ -1,44 +0,0 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A Pix3 project created from the **Minigame 2D** template.
4
-
5
- ## Scenes and the flow
6
-
7
- The menu and the game are **separate scenes**, so you can play the game on its own
8
- while iterating and still ship the full menu → game flow in a build:
9
-
10
- - **Game scene** (`scenes/main.pix3scene`) — the gameplay. This is the
11
- editor's startup scene: it opens first and is what you (and agents) play directly,
12
- with no menu in the way. Build your minigame here. Driven by `scripts/GameFlow.ts`
13
- (its MENU button transitions back to the menu; extend it with your win/lose flow).
14
- - **Menu scene** (`scenes/menu.pix3scene`) — title, PLAY and SETTINGS
15
- buttons. This is the project's **entry scene** (Project Settings → Default Export
16
- Scene Path): a build and *Start Game* boot here so you can debug the whole flow.
17
- Driven by `scripts/MenuFlow.ts`: PLAY transitions to the game scene, SETTINGS
18
- opens the settings window.
19
- - **Settings window** (`scenes/ui/settings-window.pix3scene`) — the modal,
20
- in its own file so the menu opens clean. The menu carries it as a one-line
21
- `instance: res://scenes/ui/settings-window.pix3scene` marked `visible: false`
22
- (an editor-only hide; `MenuFlow` shows it at run time). Music/SFX checkboxes
23
- mute the engine audio buses, wired by `scripts/SettingsWindow.ts`. Reuse it
24
- from any scene the same way.
25
-
26
- Scenes switch at runtime with a fade transition:
27
- `this.scene.changeScene('res://scenes/main.pix3scene', { transition: 'fade' })`.
28
-
29
- ## Project structure
30
-
31
- - `design/` — game design document and reference images
32
- - `design/tests/` — agent-testing material: `routines/*.json` (named, replayable
33
- step + assertion scripts) and `reachability.json` (the journal of on-screen
34
- controls physically proven reachable). Routines are executed by the gameplay
35
- test harness, which is still in development — the format and location are
36
- fixed now so a routine written today keeps working.
37
- - `scenes/` — scene files; `main.pix3scene` (game) is the startup scene,
38
- `menu.pix3scene` is the build entry point
39
- - `scenes/ui/` — full-screen / modal overlays (`settings-window.pix3scene`),
40
- instanced into host scenes with `visible: false`
41
- - `sprites/` — images and textures
42
- - `scripts/` — game scripts (`export class X extends Script`, used as `user:X`)
43
- - `audio/` — music and sound effects
44
- - `AGENTS.md` — rules and pointers for AI agents working on this project
@@ -1 +0,0 @@
1
- { "version": 1, "proven": [] }
@@ -1,44 +0,0 @@
1
- {
2
- "name": "mute-music",
3
- "description": "From the menu: open the settings window, switch music off, close it again.",
4
- "note": "Run it with game_run {routine:'mute-music'}. Steps are the game_input vocabulary plus {type:'command'} for a registered intent; `expect` holds the ordinary game_run predicates, ANDed and judged once after the last step. Only a STEP takes a `why` — an assertion is exactly the predicate object game_run takes, with no extra fields. The `toggled` expectation is the load-bearing one here: the box ships checked, so \"it is off now\" would also be true of a box nothing ever reached, while `toggled` fires only on a real state change and cannot be satisfied by a tap that bounced off a disabled control.",
5
- "scope": "scenes/menu.pix3scene",
6
- "params": {},
7
- "uses": ["menu-root", "settings-button", "settings-window", "music-toggle", "close-button"],
8
- "steps": [
9
- {
10
- "type": "command",
11
- "name": "open-settings",
12
- "why": "The highest channel available: the SETTINGS button dispatches this intent, so the routine keeps working after any relayout of the menu — and the dispatch is journalled with the frame it happened on."
13
- },
14
- {
15
- "type": "invoke",
16
- "target": "music-toggle",
17
- "interaction": "setChecked",
18
- "args": { "checked": false },
19
- "why": "The scene's `settings.toggle-music` command FLIPS the box, so it cannot express \"off\" from an unknown state; setChecked can. It still goes through the control's own funnel, so the checkmark, the audio bus and the `toggled` signal all land exactly as they would on a tap."
20
- },
21
- {
22
- "type": "command",
23
- "name": "close-settings",
24
- "why": "The CLOSE button's intent — same reason as opening."
25
- }
26
- ],
27
- "expect": [
28
- { "kind": "signal", "name": "toggled", "node": "music-toggle" },
29
- {
30
- "kind": "nodeProperty",
31
- "name": "music-toggle",
32
- "path": "checked",
33
- "op": "eq",
34
- "value": false
35
- },
36
- {
37
- "kind": "nodeProperty",
38
- "name": "settings-window",
39
- "path": "visible",
40
- "op": "eq",
41
- "value": false
42
- }
43
- ]
44
- }
@@ -1,84 +0,0 @@
1
- # Pix3 Scene File (YAML)
2
- # Minigame 2D — the GAME scene. `main.pix3scene` is the editor's startup scene:
3
- # the one you iterate on and that agents open and play directly (no menu in the
4
- # way). A full build instead boots the MENU scene (see menu.pix3scene / Project
5
- # Settings → Default Export Scene Path); the menu's PLAY button transitions here.
6
- # The MENU button returns to the menu via a scene transition (scripts/GameFlow.ts).
7
- version: 1.0.0
8
- metadata:
9
- author: Pix3 Template
10
- description: Gameplay scene — build your minigame here
11
- root:
12
- - id: game-root
13
- type: Group2D
14
- name: Game Root
15
- properties:
16
- width: 1920
17
- height: 1080
18
- layout:
19
- enabled: true
20
- horizontalAlign: stretch
21
- verticalAlign: stretch
22
- components:
23
- - id: game-flow
24
- type: user:GameFlow
25
- enabled: true
26
- config:
27
- menuScene: res://scenes/menu.pix3scene
28
- menuButton: menu-button
29
- children:
30
- - id: game-background
31
- type: ColorRect2D
32
- name: Game Background
33
- properties:
34
- width: 1920
35
- height: 1080
36
- color: "#0f3460"
37
- transform:
38
- position: [0, 0]
39
- scale: [1, 1]
40
- rotation: 0
41
- layout:
42
- enabled: true
43
- horizontalAlign: stretch
44
- verticalAlign: stretch
45
- children: []
46
- - id: game-placeholder
47
- type: Label2D
48
- name: Game Placeholder
49
- properties:
50
- label: "YOUR GAME GOES HERE"
51
- labelFontSize: 64
52
- labelColor: "#ffffff"
53
- labelAlign: center
54
- transform:
55
- position: [0, 0]
56
- scale: [1, 1]
57
- rotation: 0
58
- layout:
59
- enabled: true
60
- horizontalAlign: center
61
- verticalAlign: center
62
- children: []
63
- - id: menu-button
64
- type: Button2D
65
- name: Menu Button
66
- properties:
67
- width: 220
68
- height: 80
69
- label: "MENU"
70
- labelFontSize: 32
71
- labelColor: "#ffffff"
72
- backgroundColor: "#3a3a5e"
73
- hoverColor: "#4a4a6e"
74
- pressedColor: "#2a2a4e"
75
- buttonAction: back-to-menu
76
- transform:
77
- position: [-820, 460]
78
- scale: [1, 1]
79
- rotation: 0
80
- layout:
81
- enabled: true
82
- horizontalAlign: left
83
- verticalAlign: top
84
- children: []
@@ -1,118 +0,0 @@
1
- # Pix3 Scene File (YAML)
2
- # Minigame 2D — the MENU scene. This is the project's ENTRY / export scene
3
- # (Project Settings → Default Export Scene Path): a full build and "Play Game (Entry Scene)"
4
- # boot here so you can debug the whole flow. PLAY transitions to the game scene
5
- # (main.pix3scene) via a fade; SETTINGS opens the settings-window prefab.
6
- # Wired by scripts/MenuFlow.ts.
7
- version: 1.0.0
8
- metadata:
9
- author: Pix3 Template
10
- description: Menu scene — entry point; PLAY transitions to the game
11
- root:
12
- - id: menu-root
13
- type: Group2D
14
- name: Menu Root
15
- properties:
16
- width: 1920
17
- height: 1080
18
- layout:
19
- enabled: true
20
- horizontalAlign: stretch
21
- verticalAlign: stretch
22
- components:
23
- - id: menu-flow
24
- type: user:MenuFlow
25
- enabled: true
26
- config:
27
- gameScene: res://scenes/main.pix3scene
28
- settingsNode: settings-window
29
- playButton: play-button
30
- settingsButton: settings-button
31
- children:
32
- - id: menu-background
33
- type: ColorRect2D
34
- name: Menu Background
35
- properties:
36
- width: 1920
37
- height: 1080
38
- color: "#16213e"
39
- transform:
40
- position: [0, 0]
41
- scale: [1, 1]
42
- rotation: 0
43
- layout:
44
- enabled: true
45
- horizontalAlign: stretch
46
- verticalAlign: stretch
47
- children: []
48
- - id: menu-title
49
- type: Label2D
50
- name: Menu Title
51
- properties:
52
- label: "{{PROJECT_NAME}}"
53
- labelFontSize: 96
54
- labelColor: "#ffcf33"
55
- labelAlign: center
56
- transform:
57
- position: [0, 250]
58
- scale: [1, 1]
59
- rotation: 0
60
- layout:
61
- enabled: true
62
- horizontalAlign: center
63
- verticalAlign: center
64
- children: []
65
- - id: play-button
66
- type: Button2D
67
- name: Play Button
68
- properties:
69
- width: 420
70
- height: 120
71
- label: "PLAY"
72
- labelFontSize: 48
73
- labelColor: "#1a1a2e"
74
- backgroundColor: "#ffcf33"
75
- hoverColor: "#ffe066"
76
- pressedColor: "#e6b800"
77
- buttonAction: play
78
- transform:
79
- position: [0, 0]
80
- scale: [1, 1]
81
- rotation: 0
82
- layout:
83
- enabled: true
84
- horizontalAlign: center
85
- verticalAlign: center
86
- children: []
87
- - id: settings-button
88
- type: Button2D
89
- name: Settings Button
90
- properties:
91
- width: 420
92
- height: 120
93
- label: "SETTINGS"
94
- labelFontSize: 48
95
- labelColor: "#ffffff"
96
- backgroundColor: "#3a3a5e"
97
- hoverColor: "#4a4a6e"
98
- pressedColor: "#2a2a4e"
99
- buttonAction: open-settings
100
- transform:
101
- position: [0, -170]
102
- scale: [1, 1]
103
- rotation: 0
104
- layout:
105
- enabled: true
106
- horizontalAlign: center
107
- verticalAlign: center
108
- children: []
109
- # Settings modal — authored in scenes/ui/settings-window.pix3scene so this
110
- # scene opens on the MENU, not on the modal. `visible: false` hides it in
111
- # the EDITOR only; `initiallyVisible` (in the overlay file) is what play
112
- # mode reads, and user:MenuFlow opens it at run time on SETTINGS. Tick the
113
- # eye to preview it over the menu.
114
- - id: settings-window
115
- name: Settings Window
116
- instance: res://scenes/ui/settings-window.pix3scene
117
- properties:
118
- visible: false