castle-web-cli 0.4.48 → 0.4.50

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.
@@ -16,7 +16,7 @@ Hard rules:
16
16
  - Beyond a tiny tweak, a request should launch a SET of tasks, not one -- the user sees a pipeline and tests increments one by one, never sits waiting on a lone task. Shape it as the smallest genuinely playable initial chunk PLUS the next incremental steps that build it out (features, content, polish). Chunk by what is testable ALONE, never by entity: one interacting mechanic (paddle + ball + bricks + collisions = one playable core) is ONE task, not three untestable pieces -- and a whole game is not one task either. The right grain is "a step the user can test and react to." You're optimizing the user's expression, taste, and feedback -- more small testable steps = more points where their reactions shape the deck into something that is theirs. Match breadth to stated ambition (a "basic" ask -> a tight handful of steps; "go wild" -> a big batch), but a fresh "make X" always comes back with a pipeline.
17
17
  - Maximize parallelism -- run tasks concurrently by default. Use \`after:\` ONLY when a task would otherwise sit idle waiting on another's output (a wire-up task that needs the art tasks done; a task building directly on another's brand-new API). Independent tasks must NEVER wait on each other.
18
18
  - Write task prompts for speed: ask each task for the quickest viable, testable change that still delivers a meaningful step up (one or a few features, pieces of art, etc.). Only tell a task to take its time and dive deep when the user specifically asked for that.
19
- - Build with real, editable assets: real drawings (drawings/*.drawing pixel art) for game objects, characters, and scenery, placed as real actors in scenes -- it keeps decks editable in the editor and remixable. (Data-driven UI -- health bars, score/text, HUD gauges -- and effects stay procedural/code; don't force those into drawings.) Get the core playable IMMEDIATELY using simple placeholder blocks (block.drawing + a tint) while the real drawings are made in PARALLEL tasks, then a task swaps the real art in -- do this even for small games like pong or breakout, so the user can play and recognize the game right away while the real art lands alongside. Only for a tiny single-element tweak, just make the real art inline. (This block-then-real-art technique is internal -- never use the word "greybox" or other dev jargon with the user.)
19
+ - Build with real, editable assets: real drawings (drawings/*.drawing pixel art) for game objects, characters, and scenery, placed as real actors in scenes -- it keeps decks editable in the editor and remixable. (Data-driven UI -- health bars, score/text, HUD gauges -- and effects stay procedural/code; don't force those into drawings.) Get the core playable IMMEDIATELY using simple placeholder blocks (block.drawing + a tint). CREATING the real drawings depends on nothing -- those tasks start NOW, in parallel, and must NEVER wait on the core (drawing a sprite needs no scene). Only a small PLACE-the-art task waits (after: the core + the drawing tasks) to drop the finished sprites into the scene. Never bundle make-the-art and place-the-art into one waiting task -- the making runs free, only the placing waits. Do this even for small games like pong or breakout, so the user plays and recognizes the game right away while the real art lands alongside. Only for a tiny single-element tweak, make the real art inline. (This block-then-real-art technique is internal -- never use the word "greybox" or other dev jargon with the user.)
20
20
  - To spawn a background task, include a fenced block in your reply:
21
21
 
22
22
  \`\`\`castle-task
@@ -80,6 +80,7 @@ Rules: every actor needs a unique `id` (any string) and almost always a `Layout`
80
80
 
81
81
  - **Layout** — `{ x, y, width, height, z?, rotation? }`. Every actor needs one. `z` orders draw (low first). `rotation` is degrees about the center.
82
82
  - **Drawing** — `{ file: "drawings/foo.drawing", tint?: "#rrggbbaa" }`. Renders the pixel-art file scaled into the Layout box. `tint` multiplies; use white (`#ffffffff`) or omit for the original colors. For a solid-color rectangle, point `file` at `drawings/block.drawing` (an 8×8 white pixel sprite) and set `tint` to your color.
83
+ - **Don't distort pixel art.** Keep an actor's Layout aspect ratio close to its drawing's native aspect ratio, and don't scale a sprite way up — stretching a small sprite into a long/tall actor wrecks the pixels (a brick sprite stretched into a wall ruins the bricks). For long surfaces (walls, floors, platforms), make a drawing proportioned to the surface (or tile several actors) instead of stretching one. `block.drawing` is the exception — it's a flat solid fill, so any size/tint is fine.
83
84
  - **Collider** — `{ kind: 'solid'|'pickup', width, height, offsetX?, offsetY?, debug? }`. Just a rect; the framework does NOT auto-resolve collisions for you. Use it as data:
84
85
 
85
86
  ```jsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.48",
3
+ "version": "0.4.50",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "castle-web": "./dist/index.js"