@ludra/cli 0.5.0 → 0.8.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 (107) hide show
  1. package/blocks/chasing-enemy/assets/slime.svg +21 -0
  2. package/blocks/chasing-enemy/block.json +64 -0
  3. package/blocks/chasing-enemy/demo.json +32 -0
  4. package/blocks/chasing-enemy/scripts/chaser.ts +19 -0
  5. package/blocks/coin-row/assets/coin.svg +22 -0
  6. package/blocks/coin-row/block.json +157 -0
  7. package/blocks/coin-row/demo.json +15 -0
  8. package/blocks/falling-platform/assets/falling-platform.svg +13 -0
  9. package/blocks/falling-platform/block.json +55 -0
  10. package/blocks/falling-platform/demo.json +24 -0
  11. package/blocks/falling-platform/scripts/falling-platform.ts +56 -0
  12. package/blocks/jump-pad/assets/jump-pad.svg +6 -0
  13. package/blocks/jump-pad/block.json +56 -0
  14. package/blocks/jump-pad/demo.json +17 -0
  15. package/blocks/jump-pad/scripts/jump-pad.ts +10 -0
  16. package/blocks/key-and-door/assets/door.svg +12 -0
  17. package/blocks/key-and-door/assets/key.svg +9 -0
  18. package/blocks/key-and-door/block.json +90 -0
  19. package/blocks/key-and-door/demo.json +31 -0
  20. package/blocks/key-and-door/scripts/key.ts +12 -0
  21. package/blocks/key-and-door/scripts/locked-door.ts +15 -0
  22. package/blocks/moving-platform/assets/lift.svg +9 -0
  23. package/blocks/moving-platform/block.json +38 -0
  24. package/blocks/moving-platform/demo.json +27 -0
  25. package/blocks/patrol-enemy/assets/slime.svg +21 -0
  26. package/blocks/patrol-enemy/block.json +60 -0
  27. package/blocks/patrol-enemy/demo.json +22 -0
  28. package/blocks/spikes/assets/spikes.svg +8 -0
  29. package/blocks/spikes/block.json +49 -0
  30. package/blocks/spikes/demo.json +16 -0
  31. package/blocks/teleporter/assets/teleporter.svg +14 -0
  32. package/blocks/teleporter/block.json +89 -0
  33. package/blocks/teleporter/demo.json +17 -0
  34. package/blocks/teleporter/scripts/teleporter.ts +17 -0
  35. package/blocks/time-limit/block.json +36 -0
  36. package/blocks/time-limit/demo.json +25 -0
  37. package/blocks/time-limit/scripts/time-limit.ts +16 -0
  38. package/blocks/turret/assets/bullet.svg +5 -0
  39. package/blocks/turret/assets/turret.svg +10 -0
  40. package/blocks/turret/block.json +59 -0
  41. package/blocks/turret/demo.json +35 -0
  42. package/blocks/turret/scripts/bullet.ts +11 -0
  43. package/blocks/turret/scripts/turret.ts +36 -0
  44. package/dist/blocks.d.ts +65 -0
  45. package/dist/blocks.js +95 -0
  46. package/dist/commands/blocks.d.ts +12 -0
  47. package/dist/commands/blocks.js +49 -0
  48. package/dist/commands/check.d.ts +1 -0
  49. package/dist/commands/check.js +57 -14
  50. package/dist/commands/dev.js +7 -2
  51. package/dist/commands/new.js +1 -1
  52. package/dist/commands/play.d.ts +1 -0
  53. package/dist/commands/play.js +12 -4
  54. package/dist/commands/review.d.ts +22 -0
  55. package/dist/commands/review.js +183 -0
  56. package/dist/commands/test.d.ts +1 -0
  57. package/dist/commands/test.js +20 -5
  58. package/dist/headless.d.ts +2 -4
  59. package/dist/headless.js +21 -3
  60. package/dist/index.js +25 -5
  61. package/dist/project.d.ts +18 -5
  62. package/dist/project.js +61 -21
  63. package/dist/server.js +22 -9
  64. package/package.json +4 -3
  65. package/templates/breakout/CLAUDE.md +43 -0
  66. package/templates/breakout/_gitignore +2 -0
  67. package/templates/breakout/ludra.json +5 -0
  68. package/templates/breakout/package.json +13 -0
  69. package/templates/breakout/scenes/main.scene.json +653 -0
  70. package/templates/breakout/scripts/backdrop.ts +101 -0
  71. package/templates/breakout/scripts/ball.ts +89 -0
  72. package/templates/breakout/scripts/brick.ts +51 -0
  73. package/templates/breakout/scripts/paddle.ts +53 -0
  74. package/templates/breakout/scripts/rules.ts +147 -0
  75. package/templates/breakout/scripts/wall.ts +21 -0
  76. package/templates/breakout/shaders/neon.frag +42 -0
  77. package/templates/breakout/tests/gameplay.test.json +31 -0
  78. package/templates/platformer/CLAUDE.md +13 -8
  79. package/templates/platformer/assets/lantern.svg +9 -0
  80. package/templates/platformer/package.json +1 -1
  81. package/templates/platformer/prefabs/coin.prefab.json +8 -0
  82. package/templates/platformer/prefabs/slime.prefab.json +9 -0
  83. package/templates/platformer/scenes/level-2.scene.json +413 -0
  84. package/templates/platformer/scenes/main.scene.json +356 -59
  85. package/templates/platformer/scripts/backdrop.ts +75 -0
  86. package/templates/platformer/scripts/hud.ts +111 -0
  87. package/templates/platformer/scripts/lantern.ts +35 -0
  88. package/templates/platformer/shaders/glow.frag +29 -0
  89. package/templates/platformer/tests/gameplay.test.json +45 -7
  90. package/templates/platformer/tests/level-2.test.json +49 -0
  91. package/templates/topdown/CLAUDE.md +39 -0
  92. package/templates/topdown/_gitignore +2 -0
  93. package/templates/topdown/assets/gem.svg +16 -0
  94. package/templates/topdown/assets/grass.svg +8 -0
  95. package/templates/topdown/assets/hedge.svg +10 -0
  96. package/templates/topdown/assets/hero.svg +23 -0
  97. package/templates/topdown/assets/portal.svg +15 -0
  98. package/templates/topdown/assets/slime.svg +21 -0
  99. package/templates/topdown/assets/thorns.svg +7 -0
  100. package/templates/topdown/ludra.json +5 -0
  101. package/templates/topdown/package.json +13 -0
  102. package/templates/topdown/scenes/main.scene.json +499 -0
  103. package/templates/topdown/scripts/hud.ts +94 -0
  104. package/templates/topdown/scripts/night.ts +67 -0
  105. package/templates/topdown/scripts/portal.ts +34 -0
  106. package/templates/topdown/shaders/dream.frag +31 -0
  107. package/templates/topdown/tests/gameplay.test.json +30 -0
@@ -0,0 +1,413 @@
1
+ {
2
+ "name": "Moonlit Cliffs",
3
+ "world": {
4
+ "width": 1600,
5
+ "height": 540,
6
+ "gravity": 1800,
7
+ "background": "#1a1035",
8
+ "lives": 3
9
+ },
10
+ "fonts": {
11
+ "Fredoka": "google"
12
+ },
13
+ "postfx": {
14
+ "shader": "shaders/glow.frag",
15
+ "uniforms": {
16
+ "bloom": 1.3,
17
+ "warmth": 0.7,
18
+ "vignette": 1
19
+ }
20
+ },
21
+ "effects": {
22
+ "jump": {
23
+ "sound": "jump",
24
+ "particles": {
25
+ "count": 6,
26
+ "color": "#cfd8ff",
27
+ "speed": 60,
28
+ "direction": 90,
29
+ "spread": 150,
30
+ "life": 0.25,
31
+ "size": 3,
32
+ "gravity": 0
33
+ }
34
+ },
35
+ "land": {
36
+ "sound": "thud",
37
+ "particles": {
38
+ "count": 5,
39
+ "color": "#cfd8ff",
40
+ "speed": 50,
41
+ "direction": -90,
42
+ "spread": 160,
43
+ "life": 0.2,
44
+ "size": 2,
45
+ "gravity": 300
46
+ }
47
+ },
48
+ "collect": {
49
+ "sound": "coin",
50
+ "particles": {
51
+ "count": 14,
52
+ "color": "#ffd166",
53
+ "speed": 140,
54
+ "life": 0.45,
55
+ "size": 3,
56
+ "gravity": 200
57
+ }
58
+ },
59
+ "stomp": {
60
+ "sound": "hit",
61
+ "shake": 5,
62
+ "particles": {
63
+ "count": 18,
64
+ "color": "#c77dff",
65
+ "speed": 180,
66
+ "life": 0.5,
67
+ "size": 4
68
+ }
69
+ },
70
+ "die": {
71
+ "sound": "explosion",
72
+ "shake": 10,
73
+ "particles": {
74
+ "count": 30,
75
+ "color": "#ff5d73",
76
+ "speed": 220,
77
+ "life": 0.7,
78
+ "size": 4
79
+ }
80
+ },
81
+ "win": {
82
+ "sound": "powerup",
83
+ "shake": 3,
84
+ "particles": {
85
+ "count": 60,
86
+ "color": "#4cc9f0",
87
+ "speed": 260,
88
+ "life": 1.2,
89
+ "size": 4,
90
+ "gravity": 150
91
+ }
92
+ },
93
+ "checkpoint": {
94
+ "sound": "powerup",
95
+ "particles": {
96
+ "count": 24,
97
+ "color": "#ffd166",
98
+ "speed": 120,
99
+ "life": 0.7,
100
+ "size": 3,
101
+ "gravity": -60
102
+ }
103
+ },
104
+ "gameover": {
105
+ "sound": "explosion",
106
+ "shake": 12
107
+ }
108
+ },
109
+ "entities": [
110
+ {
111
+ "id": "sky",
112
+ "components": {
113
+ "transform": {
114
+ "x": 0,
115
+ "y": 0
116
+ },
117
+ "script": {
118
+ "src": "scripts/backdrop.ts",
119
+ "params": {
120
+ "sky": [
121
+ "#140a2e",
122
+ "#3d2a63"
123
+ ],
124
+ "hills": [
125
+ "#3a2866",
126
+ "#251944"
127
+ ]
128
+ }
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "id": "player",
134
+ "components": {
135
+ "transform": {
136
+ "x": 60,
137
+ "y": 482
138
+ },
139
+ "body": {
140
+ "type": "dynamic",
141
+ "width": 28,
142
+ "height": 36
143
+ },
144
+ "sprite": {
145
+ "color": "#7cf29c",
146
+ "image": "assets/player.svg",
147
+ "frameWidth": 28,
148
+ "frameHeight": 36,
149
+ "idle": "0",
150
+ "run": "1-2",
151
+ "jump": "3",
152
+ "fall": "4",
153
+ "fps": 10,
154
+ "layer": 3
155
+ },
156
+ "platformer": {
157
+ "speed": 240,
158
+ "jumpSpeed": 680
159
+ },
160
+ "camera": {}
161
+ }
162
+ },
163
+ {
164
+ "id": "ground-a",
165
+ "components": {
166
+ "transform": {
167
+ "x": 300,
168
+ "y": 520
169
+ },
170
+ "body": {
171
+ "type": "static",
172
+ "width": 600,
173
+ "height": 40
174
+ },
175
+ "sprite": {
176
+ "color": "#3b4766",
177
+ "image": "assets/ground.svg",
178
+ "tile": true
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "id": "ground-b",
184
+ "components": {
185
+ "transform": {
186
+ "x": 910,
187
+ "y": 520
188
+ },
189
+ "body": {
190
+ "type": "static",
191
+ "width": 380,
192
+ "height": 40
193
+ },
194
+ "sprite": {
195
+ "color": "#3b4766",
196
+ "image": "assets/ground.svg",
197
+ "tile": true
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "id": "ground-c",
203
+ "components": {
204
+ "transform": {
205
+ "x": 1390,
206
+ "y": 520
207
+ },
208
+ "body": {
209
+ "type": "static",
210
+ "width": 420,
211
+ "height": 40
212
+ },
213
+ "sprite": {
214
+ "color": "#3b4766",
215
+ "image": "assets/ground.svg",
216
+ "tile": true
217
+ }
218
+ }
219
+ },
220
+ {
221
+ "id": "wall-left",
222
+ "components": {
223
+ "transform": {
224
+ "x": -10,
225
+ "y": 270
226
+ },
227
+ "body": {
228
+ "type": "static",
229
+ "width": 20,
230
+ "height": 540
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "id": "wall-right",
236
+ "components": {
237
+ "transform": {
238
+ "x": 1610,
239
+ "y": 270
240
+ },
241
+ "body": {
242
+ "type": "static",
243
+ "width": 20,
244
+ "height": 540
245
+ }
246
+ }
247
+ },
248
+ {
249
+ "id": "coin-1",
250
+ "prefab": "coin",
251
+ "components": {
252
+ "transform": {
253
+ "x": 250,
254
+ "y": 470
255
+ }
256
+ }
257
+ },
258
+ {
259
+ "id": "slime-1",
260
+ "prefab": "slime",
261
+ "components": {
262
+ "transform": {
263
+ "x": 380,
264
+ "y": 487
265
+ },
266
+ "patrol": {
267
+ "distance": 150,
268
+ "speed": 80
269
+ }
270
+ }
271
+ },
272
+ {
273
+ "id": "lantern",
274
+ "components": {
275
+ "transform": {
276
+ "x": 760,
277
+ "y": 468
278
+ },
279
+ "body": {
280
+ "type": "static",
281
+ "width": 24,
282
+ "height": 64,
283
+ "sensor": true
284
+ },
285
+ "sprite": {
286
+ "color": "#6b4f3a",
287
+ "image": "assets/lantern.svg",
288
+ "layer": 1
289
+ },
290
+ "checkpoint": {},
291
+ "script": {
292
+ "src": "scripts/lantern.ts"
293
+ }
294
+ }
295
+ },
296
+ {
297
+ "id": "ledge",
298
+ "components": {
299
+ "transform": {
300
+ "x": 930,
301
+ "y": 400
302
+ },
303
+ "body": {
304
+ "type": "static",
305
+ "width": 140,
306
+ "height": 20
307
+ },
308
+ "sprite": {
309
+ "color": "#56658f",
310
+ "image": "assets/platform.svg",
311
+ "tile": true
312
+ }
313
+ }
314
+ },
315
+ {
316
+ "id": "coin-2",
317
+ "prefab": "coin",
318
+ "components": {
319
+ "transform": {
320
+ "x": 930,
321
+ "y": 360
322
+ }
323
+ }
324
+ },
325
+ {
326
+ "id": "coin-3",
327
+ "prefab": "coin",
328
+ "components": {
329
+ "transform": {
330
+ "x": 1170,
331
+ "y": 410
332
+ }
333
+ }
334
+ },
335
+ {
336
+ "id": "slime-2",
337
+ "prefab": "slime",
338
+ "components": {
339
+ "transform": {
340
+ "x": 1290,
341
+ "y": 487
342
+ },
343
+ "patrol": {
344
+ "distance": 160,
345
+ "speed": 90
346
+ }
347
+ }
348
+ },
349
+ {
350
+ "id": "coin-4",
351
+ "prefab": "coin",
352
+ "components": {
353
+ "transform": {
354
+ "x": 1500,
355
+ "y": 470
356
+ }
357
+ }
358
+ },
359
+ {
360
+ "id": "flag",
361
+ "components": {
362
+ "transform": {
363
+ "x": 1560,
364
+ "y": 460
365
+ },
366
+ "body": {
367
+ "type": "static",
368
+ "width": 24,
369
+ "height": 80,
370
+ "sensor": true
371
+ },
372
+ "sprite": {
373
+ "color": "#4cc9f0",
374
+ "image": "assets/flag.svg",
375
+ "frameWidth": 24,
376
+ "idle": "0-1",
377
+ "fps": 3,
378
+ "flip": false,
379
+ "layer": 1
380
+ },
381
+ "emitter": {
382
+ "rate": 6,
383
+ "color": "#fff3b0",
384
+ "speed": 30,
385
+ "spread": 70,
386
+ "life": 1.2,
387
+ "size": 3,
388
+ "gravity": -20
389
+ },
390
+ "goal": {
391
+ "requireScore": 4
392
+ }
393
+ }
394
+ },
395
+ {
396
+ "id": "hud",
397
+ "components": {
398
+ "transform": {
399
+ "x": 0,
400
+ "y": 0
401
+ },
402
+ "script": {
403
+ "src": "scripts/hud.ts",
404
+ "params": {
405
+ "title": "Moonlit Cliffs",
406
+ "level": 2,
407
+ "lives": 3
408
+ }
409
+ }
410
+ }
411
+ }
412
+ ]
413
+ }