@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,653 @@
1
+ {
2
+ "name": "Neon Breakout",
3
+ "world": {
4
+ "width": 960,
5
+ "height": 540,
6
+ "gravity": 0,
7
+ "background": "#05001a",
8
+ "lives": 3
9
+ },
10
+ "fonts": {
11
+ "Orbitron": "google"
12
+ },
13
+ "postfx": {
14
+ "shader": "shaders/neon.frag",
15
+ "uniforms": {
16
+ "bloom": 1.6,
17
+ "aberration": 0.8,
18
+ "scanlines": 0.5,
19
+ "curve": 0.08,
20
+ "vignette": 0.9
21
+ }
22
+ },
23
+ "effects": {
24
+ "bounce": {
25
+ "sound": "blip",
26
+ "particles": {
27
+ "count": 5,
28
+ "color": "#fff3b0",
29
+ "speed": 80,
30
+ "life": 0.25,
31
+ "size": 2,
32
+ "gravity": 0
33
+ }
34
+ },
35
+ "brick": {
36
+ "sound": "hit",
37
+ "shake": 4
38
+ },
39
+ "launch": {
40
+ "sound": "jump"
41
+ },
42
+ "die": {
43
+ "sound": "explosion",
44
+ "shake": 10
45
+ },
46
+ "gameover": {
47
+ "sound": "explosion",
48
+ "shake": 14
49
+ },
50
+ "win": {
51
+ "sound": "powerup",
52
+ "shake": 4,
53
+ "particles": {
54
+ "count": 80,
55
+ "color": "#00f0ff",
56
+ "speed": 320,
57
+ "life": 1.4,
58
+ "size": 4,
59
+ "gravity": 0
60
+ }
61
+ }
62
+ },
63
+ "entities": [
64
+ {
65
+ "id": "backdrop",
66
+ "components": {
67
+ "transform": {
68
+ "x": 480,
69
+ "y": 270
70
+ },
71
+ "script": {
72
+ "src": "scripts/backdrop.ts"
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "id": "wall-left",
78
+ "components": {
79
+ "transform": {
80
+ "x": 10,
81
+ "y": 270
82
+ },
83
+ "body": {
84
+ "type": "static",
85
+ "width": 20,
86
+ "height": 540
87
+ },
88
+ "script": {
89
+ "src": "scripts/wall.ts"
90
+ }
91
+ }
92
+ },
93
+ {
94
+ "id": "wall-right",
95
+ "components": {
96
+ "transform": {
97
+ "x": 950,
98
+ "y": 270
99
+ },
100
+ "body": {
101
+ "type": "static",
102
+ "width": 20,
103
+ "height": 540
104
+ },
105
+ "script": {
106
+ "src": "scripts/wall.ts"
107
+ }
108
+ }
109
+ },
110
+ {
111
+ "id": "wall-top",
112
+ "components": {
113
+ "transform": {
114
+ "x": 480,
115
+ "y": 10
116
+ },
117
+ "body": {
118
+ "type": "static",
119
+ "width": 960,
120
+ "height": 20
121
+ },
122
+ "script": {
123
+ "src": "scripts/wall.ts"
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "id": "brick-1-1",
129
+ "components": {
130
+ "transform": {
131
+ "x": 120,
132
+ "y": 80
133
+ },
134
+ "body": {
135
+ "type": "static",
136
+ "width": 110,
137
+ "height": 28
138
+ },
139
+ "script": {
140
+ "src": "scripts/brick.ts",
141
+ "params": {
142
+ "ball": "ball",
143
+ "points": 3,
144
+ "color": "#ff2a6d"
145
+ }
146
+ }
147
+ }
148
+ },
149
+ {
150
+ "id": "brick-1-2",
151
+ "components": {
152
+ "transform": {
153
+ "x": 240,
154
+ "y": 80
155
+ },
156
+ "body": {
157
+ "type": "static",
158
+ "width": 110,
159
+ "height": 28
160
+ },
161
+ "script": {
162
+ "src": "scripts/brick.ts",
163
+ "params": {
164
+ "ball": "ball",
165
+ "points": 3,
166
+ "color": "#ff2a6d"
167
+ }
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "id": "brick-1-3",
173
+ "components": {
174
+ "transform": {
175
+ "x": 360,
176
+ "y": 80
177
+ },
178
+ "body": {
179
+ "type": "static",
180
+ "width": 110,
181
+ "height": 28
182
+ },
183
+ "script": {
184
+ "src": "scripts/brick.ts",
185
+ "params": {
186
+ "ball": "ball",
187
+ "points": 3,
188
+ "color": "#ff2a6d"
189
+ }
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "id": "brick-1-4",
195
+ "components": {
196
+ "transform": {
197
+ "x": 480,
198
+ "y": 80
199
+ },
200
+ "body": {
201
+ "type": "static",
202
+ "width": 110,
203
+ "height": 28
204
+ },
205
+ "script": {
206
+ "src": "scripts/brick.ts",
207
+ "params": {
208
+ "ball": "ball",
209
+ "points": 3,
210
+ "color": "#ff2a6d"
211
+ }
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "id": "brick-1-5",
217
+ "components": {
218
+ "transform": {
219
+ "x": 600,
220
+ "y": 80
221
+ },
222
+ "body": {
223
+ "type": "static",
224
+ "width": 110,
225
+ "height": 28
226
+ },
227
+ "script": {
228
+ "src": "scripts/brick.ts",
229
+ "params": {
230
+ "ball": "ball",
231
+ "points": 3,
232
+ "color": "#ff2a6d"
233
+ }
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "id": "brick-1-6",
239
+ "components": {
240
+ "transform": {
241
+ "x": 720,
242
+ "y": 80
243
+ },
244
+ "body": {
245
+ "type": "static",
246
+ "width": 110,
247
+ "height": 28
248
+ },
249
+ "script": {
250
+ "src": "scripts/brick.ts",
251
+ "params": {
252
+ "ball": "ball",
253
+ "points": 3,
254
+ "color": "#ff2a6d"
255
+ }
256
+ }
257
+ }
258
+ },
259
+ {
260
+ "id": "brick-1-7",
261
+ "components": {
262
+ "transform": {
263
+ "x": 840,
264
+ "y": 80
265
+ },
266
+ "body": {
267
+ "type": "static",
268
+ "width": 110,
269
+ "height": 28
270
+ },
271
+ "script": {
272
+ "src": "scripts/brick.ts",
273
+ "params": {
274
+ "ball": "ball",
275
+ "points": 3,
276
+ "color": "#ff2a6d"
277
+ }
278
+ }
279
+ }
280
+ },
281
+ {
282
+ "id": "brick-2-1",
283
+ "components": {
284
+ "transform": {
285
+ "x": 120,
286
+ "y": 118
287
+ },
288
+ "body": {
289
+ "type": "static",
290
+ "width": 110,
291
+ "height": 28
292
+ },
293
+ "script": {
294
+ "src": "scripts/brick.ts",
295
+ "params": {
296
+ "ball": "ball",
297
+ "points": 2,
298
+ "color": "#b14aed"
299
+ }
300
+ }
301
+ }
302
+ },
303
+ {
304
+ "id": "brick-2-2",
305
+ "components": {
306
+ "transform": {
307
+ "x": 240,
308
+ "y": 118
309
+ },
310
+ "body": {
311
+ "type": "static",
312
+ "width": 110,
313
+ "height": 28
314
+ },
315
+ "script": {
316
+ "src": "scripts/brick.ts",
317
+ "params": {
318
+ "ball": "ball",
319
+ "points": 2,
320
+ "color": "#b14aed"
321
+ }
322
+ }
323
+ }
324
+ },
325
+ {
326
+ "id": "brick-2-3",
327
+ "components": {
328
+ "transform": {
329
+ "x": 360,
330
+ "y": 118
331
+ },
332
+ "body": {
333
+ "type": "static",
334
+ "width": 110,
335
+ "height": 28
336
+ },
337
+ "script": {
338
+ "src": "scripts/brick.ts",
339
+ "params": {
340
+ "ball": "ball",
341
+ "points": 2,
342
+ "color": "#b14aed"
343
+ }
344
+ }
345
+ }
346
+ },
347
+ {
348
+ "id": "brick-2-4",
349
+ "components": {
350
+ "transform": {
351
+ "x": 480,
352
+ "y": 118
353
+ },
354
+ "body": {
355
+ "type": "static",
356
+ "width": 110,
357
+ "height": 28
358
+ },
359
+ "script": {
360
+ "src": "scripts/brick.ts",
361
+ "params": {
362
+ "ball": "ball",
363
+ "points": 2,
364
+ "color": "#b14aed"
365
+ }
366
+ }
367
+ }
368
+ },
369
+ {
370
+ "id": "brick-2-5",
371
+ "components": {
372
+ "transform": {
373
+ "x": 600,
374
+ "y": 118
375
+ },
376
+ "body": {
377
+ "type": "static",
378
+ "width": 110,
379
+ "height": 28
380
+ },
381
+ "script": {
382
+ "src": "scripts/brick.ts",
383
+ "params": {
384
+ "ball": "ball",
385
+ "points": 2,
386
+ "color": "#b14aed"
387
+ }
388
+ }
389
+ }
390
+ },
391
+ {
392
+ "id": "brick-2-6",
393
+ "components": {
394
+ "transform": {
395
+ "x": 720,
396
+ "y": 118
397
+ },
398
+ "body": {
399
+ "type": "static",
400
+ "width": 110,
401
+ "height": 28
402
+ },
403
+ "script": {
404
+ "src": "scripts/brick.ts",
405
+ "params": {
406
+ "ball": "ball",
407
+ "points": 2,
408
+ "color": "#b14aed"
409
+ }
410
+ }
411
+ }
412
+ },
413
+ {
414
+ "id": "brick-2-7",
415
+ "components": {
416
+ "transform": {
417
+ "x": 840,
418
+ "y": 118
419
+ },
420
+ "body": {
421
+ "type": "static",
422
+ "width": 110,
423
+ "height": 28
424
+ },
425
+ "script": {
426
+ "src": "scripts/brick.ts",
427
+ "params": {
428
+ "ball": "ball",
429
+ "points": 2,
430
+ "color": "#b14aed"
431
+ }
432
+ }
433
+ }
434
+ },
435
+ {
436
+ "id": "brick-3-1",
437
+ "components": {
438
+ "transform": {
439
+ "x": 120,
440
+ "y": 156
441
+ },
442
+ "body": {
443
+ "type": "static",
444
+ "width": 110,
445
+ "height": 28
446
+ },
447
+ "script": {
448
+ "src": "scripts/brick.ts",
449
+ "params": {
450
+ "ball": "ball",
451
+ "points": 1,
452
+ "color": "#00e5ff"
453
+ }
454
+ }
455
+ }
456
+ },
457
+ {
458
+ "id": "brick-3-2",
459
+ "components": {
460
+ "transform": {
461
+ "x": 240,
462
+ "y": 156
463
+ },
464
+ "body": {
465
+ "type": "static",
466
+ "width": 110,
467
+ "height": 28
468
+ },
469
+ "script": {
470
+ "src": "scripts/brick.ts",
471
+ "params": {
472
+ "ball": "ball",
473
+ "points": 1,
474
+ "color": "#00e5ff"
475
+ }
476
+ }
477
+ }
478
+ },
479
+ {
480
+ "id": "brick-3-3",
481
+ "components": {
482
+ "transform": {
483
+ "x": 360,
484
+ "y": 156
485
+ },
486
+ "body": {
487
+ "type": "static",
488
+ "width": 110,
489
+ "height": 28
490
+ },
491
+ "script": {
492
+ "src": "scripts/brick.ts",
493
+ "params": {
494
+ "ball": "ball",
495
+ "points": 1,
496
+ "color": "#00e5ff"
497
+ }
498
+ }
499
+ }
500
+ },
501
+ {
502
+ "id": "brick-3-4",
503
+ "components": {
504
+ "transform": {
505
+ "x": 480,
506
+ "y": 156
507
+ },
508
+ "body": {
509
+ "type": "static",
510
+ "width": 110,
511
+ "height": 28
512
+ },
513
+ "script": {
514
+ "src": "scripts/brick.ts",
515
+ "params": {
516
+ "ball": "ball",
517
+ "points": 1,
518
+ "color": "#00e5ff"
519
+ }
520
+ }
521
+ }
522
+ },
523
+ {
524
+ "id": "brick-3-5",
525
+ "components": {
526
+ "transform": {
527
+ "x": 600,
528
+ "y": 156
529
+ },
530
+ "body": {
531
+ "type": "static",
532
+ "width": 110,
533
+ "height": 28
534
+ },
535
+ "script": {
536
+ "src": "scripts/brick.ts",
537
+ "params": {
538
+ "ball": "ball",
539
+ "points": 1,
540
+ "color": "#00e5ff"
541
+ }
542
+ }
543
+ }
544
+ },
545
+ {
546
+ "id": "brick-3-6",
547
+ "components": {
548
+ "transform": {
549
+ "x": 720,
550
+ "y": 156
551
+ },
552
+ "body": {
553
+ "type": "static",
554
+ "width": 110,
555
+ "height": 28
556
+ },
557
+ "script": {
558
+ "src": "scripts/brick.ts",
559
+ "params": {
560
+ "ball": "ball",
561
+ "points": 1,
562
+ "color": "#00e5ff"
563
+ }
564
+ }
565
+ }
566
+ },
567
+ {
568
+ "id": "brick-3-7",
569
+ "components": {
570
+ "transform": {
571
+ "x": 840,
572
+ "y": 156
573
+ },
574
+ "body": {
575
+ "type": "static",
576
+ "width": 110,
577
+ "height": 28
578
+ },
579
+ "script": {
580
+ "src": "scripts/brick.ts",
581
+ "params": {
582
+ "ball": "ball",
583
+ "points": 1,
584
+ "color": "#00e5ff"
585
+ }
586
+ }
587
+ }
588
+ },
589
+ {
590
+ "id": "paddle",
591
+ "components": {
592
+ "transform": {
593
+ "x": 480,
594
+ "y": 500
595
+ },
596
+ "body": {
597
+ "type": "kinematic",
598
+ "width": 120,
599
+ "height": 16
600
+ },
601
+ "topdown": {
602
+ "speed": 480,
603
+ "directions": "x"
604
+ },
605
+ "script": {
606
+ "src": "scripts/paddle.ts",
607
+ "params": {
608
+ "ball": "ball"
609
+ }
610
+ }
611
+ }
612
+ },
613
+ {
614
+ "id": "ball",
615
+ "components": {
616
+ "transform": {
617
+ "x": 480,
618
+ "y": 484
619
+ },
620
+ "body": {
621
+ "type": "dynamic",
622
+ "width": 14,
623
+ "height": 14,
624
+ "bounce": 1,
625
+ "gravityScale": 0
626
+ },
627
+ "script": {
628
+ "src": "scripts/ball.ts",
629
+ "params": {
630
+ "speed": 420,
631
+ "launchDelay": 0.6,
632
+ "paddle": "paddle"
633
+ }
634
+ }
635
+ }
636
+ },
637
+ {
638
+ "id": "rules",
639
+ "components": {
640
+ "transform": {
641
+ "x": 0,
642
+ "y": 0
643
+ },
644
+ "script": {
645
+ "src": "scripts/rules.ts",
646
+ "params": {
647
+ "prefix": "brick-"
648
+ }
649
+ }
650
+ }
651
+ }
652
+ ]
653
+ }