Create a small, editable JSON recipe; validate it; render it; inspect the PNG preview; revise the source. Use compact palette grids for silhouettes, symbols for repeated objects and inherited frames for small pose changes. The renderer is deterministic. It does not use an image model.
For visual quality decisions, regional corrections, pose compilation, scenes, material passes and PNG interchange, follow the art workflow. These are supported extensions around version-1 recipes, not permission prompts or aesthetic guarantees.
For looping interference and portal interiors, see baked wave effects. pixel_compile accepts pixelforge-wave sources, and pixel_help topic wave returns their schema. The studio preserves the editable source while exports contain ordinary sprite frames.
Required: version: 1, name, width, height, frames.
name: starts with a letter, then letters, numbers, hyphens or underscores; at most 64 characters. Frame, symbol and animation names follow the same convention. Windows device names (CON, PRN, AUX, NUL, COM1–9, LPT1–9) are reserved. Frame and animation names must also be unique ignoring case so bundles work on case-insensitive filesystems.width,height: integers from 1 to 1024, and an animation frame holds at most 262,144 pixels (320 × 180, 480 × 270, 640 × 360, 512 × 512 and 1024 × 256 fit). A still, a recipe with exactly one frame, may be up to 4096 a side and 4,194,304 pixels in all (1920 × 1080 and 2560 × 1440 fit), for a backdrop or mural drawn at one screen pixel per art pixel. A scene's view, each scene asset, an effect source and animported frame have the animation frame's limit; pose, bodies, crystal, normals and compiled powder sources keep 256 a side, and fluid and wave sources 128.palette: map names to literal#RGB,#RGBA,#RRGGBB,#RRGGBBAAortransparent. Single-character keys are usable in grids. Palette values cannot reference other palette entries..and space are reserved for skipping pixels;transparentis reserved. Grid characters must be single UTF-16 code units (letters such asÀwork; emoji do not).- Shared palettes:
"palette": { "$ref": "../palette.json", "x": "#fff" }loads a palette file (a flat map, or any JSON with apalettemap) relative to this recipe; local entries add to or override it. A file with apalettemap may also listramps, which a recipe or pose source without ramps of its own takes. The CLI and MCP resolve references before rendering (MCP only inside its--root). The pure renderer rejects unresolved references.patch --outkeeps the reference and writes only new or changed entries locally;previewopens the recipe as written, so the studio's Save JSON keeps it too. background: palette name or color; defaults to transparent.ramps: optional lists of palette keys from dark to light, one per material:[["k", "s", "t", "u"], ["f", "g", "h"]].shadeand scene ramp lighting move a colour along its ramp instead of inventing a darker one, so shading keeps the palette. A key belongs to one ramp; a colour shared by keys in two ramps follows the first. A shared palette file written as{ "palette": {...}, "ramps": [...] }supplies ramps to every recipe that links it and declares none of its own.anchor: optional[x, y]pivot shared by every frame (frames may override it). The atlas exports it asanchorPxin exported pixels, and asanchorandpivot, both anchor ÷ source size: the TexturePacker convention Phaser and PixiJS read as a sprite's origin.[x, y]names the top-left corner of that pixel.symbols: map names to equal-width string arrays. A symbol is a reusable palette grid.frames: 1–256 frames. At most 4,194,304 total source pixels: 72 frames of 320 × 180, 18 of 640 × 360, 16 of 512 × 512. Frame order sets atlas order; when a script generates frames from an object, remember that JavaScript lists integer-like keys ("0","7") before all others, so build the list from an array when order matters.animations: map names to{frames: [frame names], direction?, loop?}. Omit for a default animation using all frames.{}(an empty map) says the frames are stills (icons, UI states, tiles): the export writes the sheet, an atlas of the frames alone (no animations or frame tags),frames/and the source, with no SpriteFrames, CSS, animated PNGs, player or GIF, and the render check counts them asstills.directionisforward(default),reverseorpingpong. Pingpong excludes repeated endpoints: a,b,c becomes a,b,c,b.loopdefaults to true; false plays once and holds the last frame. ZIP32 bundles require animation count + frame count + 10 support files ≤ 65,535 (the ninth and tenth are the Godot TileSet and Tiled tileset a tile set gets). Validation rejects overflow before rasterizing frames; at most 65,524 animations fit with one frame. Each input sequence has at most 1,024 references before pingpong expansion.sheet:{columns, padding, scale, trim}. Defaults: up to 8 columns, 0 padding, scale 1, untrimmed. Padding surrounds each cell on every side, so the distance between adjacent contents is twice the padding. Padding and dimensions are multiplied by the integer scale. Scale 1–16; columns 1–256; padding 0–16. Atlas area must be at most 16,777,216 pixels.trim: truepacks each frame by its visible bounds (deterministic shelf packing;columnsis ignored); atlas entries reporttrimmed: truewithspriteSourceSizeoffsets inside the unchangedsourceSize. Frames whose visible pictures are the same share one rectangle of the sheet, each with its own name, duration and offset: a hold made withfrom, or a frame moved whole withtranslate, costs no sheet space. The default grid keeps a cell per frame, since grid importers find a frame by its position. Individual frame PNGs and APNGs stay full-canvas, and the CSS export switches betweenframes/*.pnginstead of sliding an atlas background.
Use node bin/pixelbolt.js schema for the complete JSON Schema. Unknown fields are errors so misspelled instructions do not disappear silently. Omit optional fields to use defaults; null is not accepted.
In the portable Pixelbolt Studio build, run .\pixelbolt on Windows or ./pixelbolt elsewhere from the build folder instead of node bin/pixelbolt.js.
A frame is {name, duration?, time?, from?, translate?, wrap?, flipX?, flipY?, palette?, anchor?, points?, groups?, tile?, ops?, layers?, pixels?}.
duration is 1–60000 milliseconds, default 100. from copies an earlier frame; otherwise the frame starts with the project background. Whole-frame flips happen first, then translate: [dx, dy], then ops, then layers in array order, then final pixels corrections. Translation leaves newly exposed pixels transparent and clips at the canvas boundary; with wrap: true pixels scroll around the canvas instead (animated water, conveyors, clouds).
palette recolors project palette keys for this frame's own drawing: {"!": "w", "@": "tint2"}. Keys must exist in the project palette; values are colors or project palette names. This is palette cycling: stamp the same symbol in every frame and give each frame a different mapping, with no marker colors or replace passes. anchor overrides the project anchor; points names up to 64 positions ({"hand": [12, 9], "advance": [6, 0]}) exported per frame in the atlas, in exported pixels. tile describes the frame as a tile for the Godot TileSet: terrain (the autotile set it belongs to; default the recipe name, so two sets in one recipe need their own) or corners (a layered set's tile: the terrain names at its NW, NE, SW and SE corners; the recipe's layered tiles make one terrain set whose first terrain is the ground under the others), weight (1–1000, how often it is picked against the other frames for the same cell), collision (3–32 points [x, y] around its solid part, in canvas pixels from [0, 0] to [width, height], in order around the shape, or a list of up to 8 such polygons for separate parts) and oneWay (bodies pass up through it and land on top). The autotile compiler writes them from variants[].weight and collision; any frame with tile makes the export write a TileSet. Inherited frames do not copy their source frame's anchor, points, tile or palette.
Ordinary drawing layers are {name?, group?, visible?, opacity?, x?, y?, palette?, sort?, ops?}. They render to a transparent buffer of the canvas size, then translate by x/y, then composite in order with source-over alpha. opacity is 0–1, applied once to the flattened layer. Hidden layers are validated but not composited. Drawing outside an ordinary layer's own canvas is clipped before the layer is translated.
Use a frame's groups to move several layers together. With "groups": {"swimmer": [2, -1]}, each layer with "group": "swimmer" moves two pixels right and one up. Its own x and y add to that translation, so a fin can also move locally. The layers keep their draw order, clipping, opacity and names for inspection. Declare up to 64 named offsets per frame. A frame continued with from declares its own groups for its new layers.
A layer palette recolors project palette keys for that layer's own drawing, on top of the frame's palette: {"layers": [{"name": "panel", "ops": [...]}, {"name": "glow", "palette": {"r": "#ffffff"}, "ops": [...]}]} flashes the glow white while the panel, drawn with the same key r, keeps its colour. Keys must exist in the project palette; values are colors or project palette names (resolved against the project palette, not the frame's). Use it for a strobe, a hit flash or a cycle on one part of a frame; the frame's ops, other layers and pixels corrections keep the frame's colours. Diagnostics count the colours it introduces as declared.
sort: "ground" draws a layer's operations far to near by the row each stands on instead of in list order, operations on the same row keeping list order, as a game draws actors and props (scene placements take the same sort, and a sorted scene tilemap joins tile by tile, each tile standing on the bottom row of its frame). An operation stands on its ground, or by default on the lowest row it draws: the bottom row of a stamp, grid or copy after scale and rotation, a line's lower end, a polygon's lowest vertex plus its y offset, the bottom edge of a rectangle, ellipse, box or autotile tile, a pixel's own row. A text operation in a sorted layer has no lowest row of its own, so it needs ground there. Area operations (dither, shade, fill, replace, clear, outline, rewrite, tilemap) are refused in a sorted layer, and ground outside one is an error. Error and clipping paths keep list positions. Put everything that stands on the ground (trees, grass blades, rocks, figures) in one sorted layer rather than a layer per kind: a later layer always draws over an earlier one, so grass in a layer after the trees covers the trees that stand in front of it.
Transparent drawing skips pixels. Use clear to erase. Clearing a layer erases only that layer's own pixels; it does not erase underlying layers. A from frame is already flattened, so later operations can edit or erase its pixels.
pixels is an optional list of {x, y, color} corrections in final canvas coordinates (top-left origin). Each entry replaces the exact RGBA after all operations and layers: transparent erases even underlying layers; a semi-transparent color sets that exact alpha instead of blending. Coordinates are required integers inside the canvas, colors use palette names or hex, and later entries at the same coordinate win. At most 262,144 entries are allowed per frame, a whole 512 × 512 frame. Original layer operations are preserved. Frames that inherit this frame also inherit its corrections before applying their own transforms. Remove a correction to reveal the original drawing beneath it. Use pixel_patch's paint change to manage these corrections without knowing the layer structure.
Draw a wing once in project parts, including its outline, veins and eyespots. Put its pivot on the shoulder. Each instance places that pixel at layer [x, y] plus its frame group offset. Coordinates on either side of the pivot may be negative. The renderer scales vertices around the pivot, rounds to integer pixels, reflects the raster with flipX or flipY, then clips at the destination canvas. The pivot stays fixed through every pose.
{
"version": 1, "name": "wingbeat", "width": 24, "height": 16,
"parts": {
"wing": {"pivot": [1, 0], "ops": [
{"op": "polygon", "points": [[1,0],[-7,-4],[-5,2]], "color": "#65b6a0"},
{"op": "line", "x": 1, "y": 0, "x2": -5, "y2": -2, "color": "#ffe39c"}
]}
},
"scaleTracks": {"beat": {"loop": true, "ease": "inOut", "keys": [
{"at": 0, "scale": 1}, {"at": 100, "scale": [0.3, 1]}, {"at": 200, "scale": 1}
]}},
"frames": [
{"name": "open", "layers": [
{"part": "wing", "x": 10, "y": 8, "scale": "beat"},
{"part": "wing", "x": 13, "y": 8, "scale": "beat", "flipX": true}
]},
{"name": "fold", "layers": [
{"part": "wing", "x": 10, "y": 8, "scale": "beat"},
{"part": "wing", "x": 13, "y": 8, "scale": "beat", "flipX": true}
]}
]
}- Define up to 64 parts. Each draws up to 2,048
polygon,lineorpixeloperations in order with their usual coordinates and colours.pivotdefaults to[0,0]. Layerpalette,opacity, visibility and drawing order apply to the instance. Optional layeropsdraw over the part in canvas coordinates before compositing. - Layer
scaleaccepts a number for both axes,[xScale,yScale], or a named track. Each axis ranges from 0 to 16. Zero collapses that axis to the pivot, which can leave a one-pixel edge. Usevisible: falseto hide it. - Define up to 64
scaleTrackswith 1–256 keys in increasing milliseconds. The frame samples the total duration of preceding frames in recipe order.frame.timeoverrides that frame’s sample. Layerdelaysubtracts milliseconds from that sample, so a positive value makes the part follow later. Reversing an animation plays its sampled poses in reverse. - Between keys, each axis interpolates with
linear(default),hold,in,outorinOuteasing. A one-shot holds the nearest endpoint outside its keys. A loop starts at 0, needs at least two keys, and wraps at the last key’s time, including for a delayed instance. Give the first and last keys the same scale for a continuous seam.
Coordinates are integers; origin is the top-left; positive y points down. x/y default to 0. Coordinates are limited to -4096–4096. Shapes with positive w/h extend w/h pixels including their origin. Out-of-bounds drawing is clipped with a warning that names the first location; clipping (validate, inspect, patch and render results) lists every operation, translation or layer offset that clipped, with a pixel count, e.g. {"path": "project.frames[2].ops[0]", "pixels": 3}. Explicit false/zero values are honored.
| op | Properties | Behavior |
|---|---|---|
pixel |
x, y, color | One pixel, source-over alpha |
rect |
x, y, w, h, color, filled? | Filled by default; false draws a 1px outline |
ellipse |
x, y, w, h, color, filled? | Pixel-center ellipse inside the bounding box |
polygon |
points, color, x?, y?, filled? | Closed outline of 3–256 integer pixel vertices relative to x/y, filled by default |
line |
x, y, x2, y2, color | 1px integer line; both endpoints included |
clear |
x, y, w, h | Set a rectangle to fully transparent black |
fill |
x, y, color | Four-connected flood fill matching the seed's exact RGBA; replaces RGBA |
replace |
from, to | Replace every exact RGBA match in the current buffer |
grid |
x, y, rows, scale?, flipX?, flipY?, rotate?, remap? | Draw palette rows; dot and space skip |
stamp |
x, y, symbol, scale?, flipX?, flipY?, rotate?, remap? | Place a named symbol |
text |
x, y, text, color, align?, spacing?, lineHeight?, scale?, flipX?, flipY?, rotate? | Text in the built-in pixel font |
copy |
x, y, symbol | from, sx?, sy?, w?, h?, scale?, flipX?, flipY?, rotate?, remap? | Copy a rectangle of a symbol (palette characters) or an earlier frame (exact RGBA, optionally swapped) |
autotile |
x?, y?, symbol, mask, mode?, remap? | One autotile tile: the four quarters of a template symbol that a neighbour mask selects |
box |
x?, y?, w, d, h?, top?, left?, right?, edge? | An isometric box: a 2:1 top face over a left and a right face, each pixel in the face its centre lies in |
tilemap |
x?, y?, tile, rows, legend, outside?, empty?, classes?, seed?, layout? | A character map drawn from this recipe's symbols and autotile templates, with variants, weights and neighbour rules; layout: "iso" lays it on a 2:1 diamond grid |
outline |
color, diagonal?, position?, width?, directions? | Outline every visible pixel in this buffer: outside rings, inside edge rings or both, in chosen directions |
dither |
x?, y?, w?, h?, color | erase, density?, direction?, pattern?, offset?, seed?, scale?, over? | Ordered, noise or value-noise dither: draw (or erase) where a canvas-anchored threshold pattern is below the density |
shade |
x?, y?, w?, h?, steps?, shape?, density?, direction?, pattern?, offset?, seed?, scale?, over? | Move pixels along their colour's ramp: shadows and light that keep the palette on any surface |
rewrite |
x?, y?, w?, h?, rules, empty?, steps?, chance?, limit?, seed?, rotate?, mirror? | Markov-style rewrite rules: small match grids replaced wherever they occur, in a seeded order |
Rectangle/ellipse/clear w/h are integers 1–512 (on a canvas wider or taller than 256, up to twice that side; dither and shade regions alike). Grid and symbol rows must be rectangular, at most 1024 rows of 1024 characters and 262,144 characters in all (256×256 in pose, crystal and wave sources), and use defined palette keys. Grid/stamp/copy scale is 1–16. Flip X/Y before rotation; rotation is 0, 90, 180 or 270 degrees clockwise; then scale. x/y locates the transformed grid's upper-left corner. Geometry is never anti-aliased.
A fin can be drawn with {"op":"polygon","points":[[0,0],[7,2],[3,3],[1,6]],"color":"teal"}. The last vertex connects to the first. The boundary includes its vertex pixels. The interior covers pixel centres between pairs of edge crossings (even-odd), including for concave or self-crossing outlines. Either winding draws the same pixels. Each covered pixel receives the colour once. Set filled: false to draw only the boundary.
text draws the built-in font: printable ASCII, the accented letters of western European languages (À–ÿ, including ß, æ, ø, ñ and ç, and Œ œ Š š Ž ž Ÿ) and the symbols ¡ ¿ « » ‹ › ° © ® £ € ¥ ¢ · × ÷ ± – — … ‘ ’ ‚ “ ” „ •. Capitals are 7 pixels tall, lowercase 5, descenders 1 below the baseline, so a line is 8 rows and y is the top of the capitals; the accent of a capital (É, Ñ, Ü) reaches 2 rows above y, so leave that room above the first line; on later lines the accent uses the gap between lines. Glyphs are as wide as their ink (1 to 5 pixels), digits are always 5 so counters do not jitter, and a space is 3; with the default spacing of 1 a line of n characters is about 6n pixels wide, so 40 characters fit a 240-pixel canvas. \n starts a new line (default lineHeight 10). align says what x is: the left edge (default), the center or the right edge of the text, and lines align the same way. scale, flips and rotation work as for grids. A character the font lacks (other scripts, emoji) is an error that names it; draw those yourself with grid. Text that overhangs the canvas is clipped and reported like any other drawing. measureText(text, { spacing, lineHeight }) from src/font.js returns the width, the height and top (0, or -2 when an accented capital on the first line needs the rows above) before you draw. An outlined title with a drop shadow is two layers, the shadow first and a pixel down and right of the other, each a text followed by an outline. Use outline after it for a readable edge on busy backgrounds.
remap recolors grid characters for one operation only, {"1": "4", "2": "#ffffff"}: one authored shape, several color variants. copy takes sx, sy, w, h from its source (defaults: the whole source) and draws it like a stamp; it is what lets one template symbol hold every autotile quarter. Frame copies keep exact RGBA; their remap swaps exact colours instead of characters, with keys that name a colour by project palette key (any length) or hex: {"op": "copy", "from": "walk-1", "remap": {"k": "r", "#ffffff80": "glow"}} recolors a copied pose for a hit flash. Keys resolve against the project palette, so they match a pose drawn with it; values resolve like any other colour in the frame. A key cannot be transparent (frame copies skip transparent pixels), and two keys cannot name the same colour. outline works on the buffer it is in: frame ops outline everything drawn so far (including an opaque background, which leaves nothing to outline), layer ops outline only that layer. The default is 4-connected; diagonal: true also fills corners. Stamp clusters in a layer and finish with outline to get one silhouette around their union.
autotile draws one tile of an autotile set from a template symbol two tiles wide and three tall (see autotile templates): the four quarters that mask selects. mode is blob (default; N=1, NE=2, E=4, SE=8, S=16, SW=32, W=64, NW=128, reduced so a diagonal counts only when both of its sides match), cardinal (N=1, E=2, S=4, W=8) or corner (a tile that sits where four cells meet; its mask names the cells around that point that are terrain, NW=1, NE=2, SW=4, SE=8, and each of its quarters is the inner quarter of one of them). The autotile compiler emits one per frame, so a compiled frame reads as its mask and editing the template redraws every tile.
outline options: position is outside (default), inside (recolor the shape's own edge pixels) or middle (split the width; an odd pixel goes outside). width (1–8) adds rings. directions is a 3×3 grid centred on a visible pixel, with a dot in the centre, whose x marks the sides that get the line: ["...", "...", "..x"] outside is a drop shadow (with width: 2, a longer one), and [".x.", "...", "..."] inside recolors only edges whose upper neighbour is transparent, a top rim light. It replaces diagonal. The canvas edge does not count as transparent, so a shape cut by the canvas gets no inside line there.
dither draws color (or clears, with erase: true) where an ordered threshold pattern is below density. x/y default to 0 and w/h run to the canvas edge. density is 0–1 (default 0.5) or [from, to], ramping along direction: down (default), up, right, left or radial (centre to edge). pattern is bayer2, bayer4 (default), bayer8, noise, value or a custom matrix of ranks; low ranks turn on first, and a highest rank n gives n + 1 levels, so [[0, 1], [1, 0]] is a checkerboard at 0.5 and [[0], [1]] gives stripes. noise is seeded white noise with no period, for large areas, fades and dissolves where a Bayer grid would show; seed (0–2147483647, default 0, only with noise or value) chooses its order. value is seeded smooth noise: neighbouring thresholds are close, so a density draws connected clumps about scale pixels across (1–64, default 4) instead of speckle, for moss, rubble or grass patches. Its thresholds are equalized, so density is still the share of a large area that is drawn; {"op": "dither", "x": 8, "y": 40, "w": 44, "h": 30, "color": "n", "density": [0.9, 0], "direction": "radial", "pattern": "value", "scale": 5, "seed": 3, "over": "g"} grows a moss patch on the floor colour that thins toward its edge. Each pixel keeps its threshold for a seed, so raising density frame by frame dissolves pixels in one fixed order with no flicker, and a new seed per frame makes the noise boil. The noise is a seeded integer hash, the same on every engine. Patterns follow canvas coordinates, so neighbouring dithered areas line up; offset: [dx, dy] shifts the pattern (crawl it between frames). over limits the change to pixels of listed exact colors, so {"op": "dither", "x": 24, "w": 8, "color": "S", "density": [0, 1], "direction": "right", "over": "s"} is a shading band that never spills outside the stone color. Use dithering for transitions and bands, not for whole surfaces.
shade moves every pixel of its region steps along its colour's ramp (see ramps): −1 (the default) is one step darker, positive steps lighten, and the ends of a ramp clamp. A shadow is then right on any surface: {"op": "shade", "shape": "ellipse", "x": 30, "y": 62, "w": 10, "h": 4} darkens floor, moss and brick under a barrel each within its own colours. Colours on no ramp stay as they are, transparent pixels stay transparent, and diagnostics find no new colours. The region, over and the density field work as for dither, with a default density of 1; a radial [1, 0] density with pattern: "value" gives a pool of light or shadow a ragged edge. shape: "ellipse" keeps to the ellipse inside the region. A recipe without ramps cannot shade.
box draws an isometric box from the top-left of its bounds. The top face's right edge runs w pixels across and the left edge d (both even), each half as far down; the left and right faces hang h pixels below it. The bounds are w + d wide and (w + d) / 2 + h tall: {"op": "box", "w": 16, "d": 16, "h": 16, "top": "t", "left": "l", "right": "r", "edge": "e"} is the standard 32×32 block of a 32×16 grid, and h: 0 with only top is its floor diamond. Each pixel belongs to the face its centre lies in, so edges step exactly two pixels across per row, faces never overlap, and boxes laid on a 2:1 grid meet with no gap or overlap. A diamond's tips are two pixels wide and its widest rows w + d - 2: its corner columns belong to its neighbours on the grid. edge marks the top's front edges and the corner between the sides; a face given no colour is left out, and outline afterwards adds a silhouette line. In a sorted layer a box stands on its bottom row. For lighting, give its keys normal faces (top → w, left → z, right → c).
tilemap draws a whole character map into the buffer, so later operations see the composed room: a dither ... over the floor colour grows moss only on the floor, a shade darkens whatever a shadow lands on, and rewrite rules can find corners. tile is the cell size; rows are equal-width strings where dot and space are empty cells; legend maps each other character to a symbol drawn at the cell, symbols (variants picked by cell position, optionally weights), or an autotile template/templates with autotile: "blob", "cardinal" or "corner" (drawn half a cell up and left, where four cells meet, so a corner map needs an even cell width and height and a square layout, never iso; in a symbol, frame or animation name {corners} becomes the four cells' characters, NW NE SW SE, for a layered set, and of several names those the set has no tile for there are left out, so a layer's variants land only on its plain tile) and an optional match string of characters counted as the same terrain. A legend entry of null is a context cell: never drawn, but counted by masks and rules. The legend and rules are the same as in scene tilemaps (see the art workflow):
{ "op": "tilemap", "tile": [8, 8], "empty": "~", "rows": ["WWWW", "WFFW", "WWWW", "...."], "legend": {
"F": { "rules": [
{ "symbols": ["floor-0", "floor-1"], "weights": [3, 1] },
{ "where": [".W.", "...", "..."], "symbol": "north-face" }
] },
"W": { "rules": [
{ "templates": ["cap", "cracked"], "weights": [2, 1], "autotile": "blob" },
{ "where": ["...", "...", ".~."], "symbol": "cliff", "offset": [0, 1] }
] }
} }Here a floor cell draws a floor variant and, when a wall lies above it, the wall's north face over it; a wall draws its cap and, when nothing lies below it, a cliff into the empty cell beneath.
rewrite applies up to 16 rules {match, replace}: equal-size grids of up to 8×8 palette keys. In match a dot or space matches anything; in replace it keeps the pixel. Choose an empty character (not a palette key) to match transparent pixels and to erase. Each step applies every rule in order: its matches are found on the pixels as they were when that rule started and applied in a seeded order, skipping any that would read or write a pixel the rule already rewrote in that step, so two overlapping fixes never both apply. steps (1–64, default 1) repeats, stopping early when nothing changes. chance (0–1) and limit (per rule per step) thin the matches; seed makes the result reproducible. rotate also matches the rules turned 90°, 180° and 270°; mirror also matches them flipped horizontally. Rewrites set exact colors. Example: moss on exposed tops, {"op": "rewrite", "empty": "_", "rules": [{"match": ["_", "k"], "replace": [".", "m"]}], "chance": 0.7, "seed": 2}. See examples/shrine.json for cracks, moss, dithered bands, a shading band, a rim light and a drop line.
Look at every frame before exporting. Inspection renders its images in memory; the CLI saves the contact sheet only when given --out file.png. MCP inspection also saves an immutable recipe revision for later calls, without exporting assets.
-
Contact sheet: one PNG with the selected frames left to right, top to bottom, on a neutral checkerboard with dark gutters. The response's
cellslists the frames in order with their durations, a line per run that lasts the same and a run of numbered names as its ends ("smoke-puff-0 … smoke-puff-18: 60 ms each"), plus the layout (columns,rows,scale,gap). The default is every frame in project order; with noscale, a selection too big for one 4096-pixel sheet at scale 1 is sampled evenly, endpoints included, andsamplingsays so; withbeside, each recipe's sheet is fitted to its share of the one image, so it may show fewer cells.animationshows one sequence in playback order, including reverse and pingpong.frameslists frame names in any order. The automatic scale is the largest, at most 16, that keeps each cell within 256px and the sheet within 1024px, or 1 when none does.scale(1–16) overrides it, up to 4096px of frames a side plus 2px gutters, so a still 4096 pixels wide shows whole at scale 1.backgroundischecker(default),transparent, a palette name or a hex color, such as your game's backdrop. -
Palette-key grids (
grid: true, CLI--grid): each distinct selected frame read back in the recipe's grid format. A pixel whose exact RGBA matches a single-character palette key shows that key;.is fully transparent. Any other color, whether a multi-character palette name, a literal hex color or a semi-transparent blend, gets a legend symbol: a digit, letter or punctuation mark that is not a palette key. Symbols belong to the recipe, not the request: multi-character palette names come first, in palette order, then other colors in the order frames use them. Every readback of the same recipe therefore agrees, and each response lists only the symbols it uses.?counts any colors left once the symbols run out. Grids are limited to 16,384 pixels in total. MCP prints them with x/y rulers; the CLI returns JSONrowsthat start at the region's top-left corner. -
Region (
region: {x, y, w, h}, CLI--region x,y,w,h): crops every cell and grid to a canvas rectangle. Smaller regions are shown larger, so you can compare a face across a blink or read the pixels around a joint without printing the whole canvas. A small region of a few frames is enlarged by itself, each cell up to 256 pixels within a sheet of 1024 (a 64-pixel region of 4 frames at scale 4, of 64 frames at scale 1); otherwise passscale(CLI--scale). -
Patterns and strides: in
frames,*matches any run of characters and?one character, so"flash-*"(CLI--frames 'flash-*') selects every matching frame in project order.step: nwith optionaloffset: k(CLI--step n --offset k) keeps every nth cell of the selection, frames or animation positions, from position k (counting from 0). Use it for long cycles with a repeating structure: in a strobe that alternates A and B frames,step: 2shows only the A frames andstep: 2, offset: 1only the B frames, wheremaxCells's evenly spaced samples would alias between them. The stride applies beforemaxCells;samplingreportsstep,offset, the original positions and the method. -
Pacing: with an
animation,every: 100(CLI--every 100, 10–60000 ms) draws one cell per 100 ms of playback instead of one per frame, so a frame fills as many cells as it is held: a long hold is a run of equal cells and a quick step a single one, at most 256 cells. Cells by time are never sampled: wheneverymakes more than 256, more thanmaxCellsor more than one sheet holds (big frames hold fewer, and fewer still withbeside), it is refused with the smallesteverythat fits (choose every 29 or more). Withbeside, the refusal names the sheet refused at theeveryasked and oneeverythe whole stack holds (choose every 31), not always the smallest. A frame shorter thaneverycan fall between two cells. The reply'stiming.entries(also withdiagnostics) give each step'sstart,durationandchanged, the pixels that differ from the step before: 0 is a hold, and a count far above its neighbours is a jump.everytakes nosteporoffset. -
Art review:
view: "silhouette"|"grayscale"|"onion"|"tile"(defaultcolor),native: true,diagnostics: true, andmaxCells: 1..256. Onion requires an animation and shows pink previous/cyan next neighbors by playback position. Tile repeats each selected frame 3×3 and addstiles: per-axisdoubledRows/doubledColumns(a line on both opposite edges that doubles when repeated),wrapStepsversusinteriorMaxSteps(large value steps across the wrap versus across the busiest interior boundary) and asuspiciousflag. A stroke that merely touches one edge is not flagged; the image is the evidence. Native adds a second 1× image, or, when the sheet is already 1×, repliesnative: "same as sheet". Diagnostics are advisory and include timing evidence and per-framecorners/strayscounts (pixels acleanupchange would alter); sampled previews report original positions and omissions. For off-palette colours,palettelists directly painted colours andalpha-blendlists results of translucent drawing or layer opacity. Each gives a count of distinct colours and up to 32 sample coordinates per frame. The same RGBA can appear under both when two pixels have different origins. Exact grids always use source colors. CLI flags:--view,--native,--diagnostics,--max-cells. -
Guides (
guides: {horizon, vanish, iso}, CLI--guides '<json>'): a horizon row, rays from up to three vanishing points and an isometric diamond grid drawn over the enlarged sheet (not the native one), to check receding edges and 2:1 lines; see depth and perspective. Not withview: "tile". -
Laid over one another (P-167):
stack: [["body"], ["body", "plate", "fin"]](CLI--stack body,body+plate+fin) draws each group of frames in one cell, the first at the bottom, as a game stacks separate frames (armour over a body, a light over a lamp); the cells are namedbody+plate+finand take the other options as frames do. It replacesframesandanimation. CLI--under ground.json:tilelays that frame of another recipe (its first frame without:name) under every cell, repeated from the top left: a sprite seen on the ground it will lie on. Not withgridordiagnostics, which read the recipe's own pixels. -
Isolation/comparison:
layers: ["body"]isolates named layers (excluding unassigned canvas ops/corrections), andreference: "revision-id"compares to a saved recipe. CLI:--layers bodyand--reference previous.json.palette: true(CLI--palette) adds each palette key with its colour, its pixels over every frame and the layers or pose parts it colours, the keys of a ramp together dark to light: which keys to change for a colour variant (pixels are told apart by colour, so keys that share one are counted under the first, andsamenames them;layerslists every layer by name, for aframes[*].layers[<name>].palettepatch).beside: ["revision-id", ...](CLI--beside blue.json,green.json, up to eight) draws the same view of those recipes under this one in the one image, each under its name (the file's, or the revision's), for variants such as team colours; the reply'sstacksays where each starts. See the detailed semantics. -
Parts (
view: "parts", CLI--view parts): every pixel in one flat colour for the layer that drew it last, with the names in a legend beside the cells and in the reply asparts(name,color,pixelsshown). A compiled pose names each layer after its part, so a pose source (source, or the.poses.jsonon the CLI) or its compiled recipe shows which part drew a stray pixel or lies on top where limbs cross, without bisecting withlayers. Frameopsshow asframe.ops, an opaque background asbackgroundand an unnamed layer aslayers[i]. A finalpixelscorrection over a drawn pixel keeps that pixel's part (a pose's inner lines recolour its outline); one on empty canvas shows asframe.pixels. Withgrid: truethe grids hold one character per part and the legend names them. In JavaScript, render withrenderProject(recipe, { owners: true })beforeinspectProject.
Change a recipe with small edits instead of rewriting it. Over MCP, send the full recipe once: every successful response from pixel_validate, pixel_inspect, pixel_patch and pixel_render includes a revision id, and those tools accept revision in place of project. Revisions are immutable recipe snapshots saved in <MCP --out directory>/.revisions/, including edits that have never been exported. Restart with the same output directory to keep using earlier ids as undo points. Use an absolute --out path so changing the working directory does not change the store. Older ids can also be recovered from recipes in existing render folders under that directory. Unknown or damaged revisions produce an error; stored snapshots are never silently replaced. Snapshots are retained until you explicitly remove their files; keep the output directory backed up. The CLI patches files instead.
changes apply in order:
| Change | Effect |
|---|---|
{"set": path, "value": v} |
Replace a value, or add an object field |
{"insert": path, "value": v} |
Insert into a list before the selected item; [-] appends |
{"remove": path} |
Delete an object field or list item |
{"set": "frames[*].layers[plume].palette", "value": {"s": "#6a2c91"}} |
[*] is every item of a list, in a set, remove or insert: here one layer recoloured in every frame, leaving other layers that use the same key. Items without what the rest of the path names are passed over. {"insert": "frames[*].ops[0]", "value": {"op": "stamp", "symbol": "stump", "x": 26, "y": 48}} draws a prop behind every frame of a compiled effect |
{"paint": "frames[blink]", "value": [{"x": 9, "y": 7, "color": "k"}]} |
Set exact pixels in final canvas coordinates after all layers; transparent erases |
{"grid": "frames[blink]", "value": {"x": 9, "y": 7, "rows": [".kk", "~k."], "erase": "~"}} |
Compact correction; dots/spaces preserve, explicit erase clears |
{"move": "frames[blink]", "value": {"x": 9, "y": 7, "w": 3, "h": 2, "dx": 1, "dy": 0}} |
Move selected RGBA, clearing source; overlapping moves retain corrections |
{"recolor": "frames[blink]", "value": {"x": 9, "y": 7, "w": 3, "h": 2, "from": "k", "to": "g"}} |
Recolor exact matches in a region |
{"cleanup": "frames[run-2]", "value": {"corners": true, "strays": true}} |
Propose fixes for doubled corners and stray pixels as canvas corrections |
Regional actions accept an optional matching mask (x selects, . preserves). Canvas actions accept scope: "frame" or "inherited" (default); frame scope records compensating literal-color corrections on affected dependents and reports them. Named selections and guarded rebuilds use overlay sidecars.
cleanup reads the rendered frame and writes ordinary pixels corrections, named by palette key where one matches. corners removes the corner pixel of an L-shaped step in a one-pixel line (a "double"), giving it the colour outside the step; filled areas and right-angle corners whose arms are longer than one pixel are left alone. strays gives a pixel the colour all eight of its neighbours share: noise in a fill, pinholes and isolated specks. An empty pixel closed in by drawn ones of several colours is a pinhole too, and takes the colour most of them have; so do the two cells of a hole that touch only at a corner. At least one must be true. Optional x, y, w, h and mask limit where pixels may change, and colors limits which original colours may change. The edit reports corners and strays counts, and the comparison lists every pixel, so check it: eyes, sparks and deliberate corners are legitimate. inspect --diagnostics counts, per frame, how many pixels each option would change. They are counts rather than findings because most L-steps and specks in finished, hand-drawn art are deliberate; they matter most for rotated, rewritten, compiled or imported frames.
Paths use the same form as error paths, with an optional project. prefix: frames[3].duration, palette.k, symbols.mossling[9], sheet.padding. In a list, [name] selects the item whose name, or string value, matches, and [-] is the end: frames[blink].layers[body].ops[2].x2, animations.idle.frames[-]. Quote unusual keys: palette["dark.green"]. Intermediate fields must exist, except that an insert can create the list it inserts into, and a set starts a missing top-level sheet, palette, symbols or animations, one level deep only (sheet.columns on a recipe without a sheet); set may add the final object field. Frame ops draw before the frame's layers. Use paint to correct the visible result directly; use set or insert inside layer ops when changing how that layer is drawn.
paint accepts a frame path by name or index and 1–262,144 {x, y, color} entries. Coordinates match inspection grids, with no layer-offset conversion. It updates the frame's pixels corrections, retaining only the last correction at each coordinate. Palette references stay editable. Remove frames[blink].pixels to reveal that frame's original drawing, or use an earlier revision to undo the whole patch.
A patch is atomic: if any change fails, or the result does not validate, the source and earlier revisions stay unchanged and no result revision is saved. MCP saves successful base and result revisions; the CLI saves only the outputs requested by flags. Patching reports:
edits: each change with its resolved index path (at) and the value it replaced (before), orcreated. Paint edits report the number of submitted pixels; the comparison below reports their visible effects.frames.changed: every frame whose pixels differ, including frames that inherit from an edited frame, with a pixel count and bounding box. Up to 16 changed pixels are listed with canvas coordinates and palette-key characters (from,to); larger changes are summarized as color transitions. When more than eight frames changed (a palette change touches every frame), a reply gives one summary instead of a list:count, theframesby name, thepixelsandboxover all of them, the commonesttransitionssummed and the three frames that changedmost.unchanged,added,removedanddurationscomplete the picture, andanimationslists changed sequences and loop settings.- A before/after PNG (MCP) with one row per changed, added or removed frame: before on the left, after on the right; where two frames side by side would pass 4096px (a still over 2048 wide), before is above after and
imageNotesays so. It is cropped to the changed area plus 2 pixels when no frames were added or removed.
CLI: node bin/pixelbolt.js patch sprite.json --changes fix.json previews the report. --changes - reads the changes from stdin as a JSON list. Add --out sprite-v2.json to save the patched recipe and --image diff.png for the before/after image; existing files are kept unless you pass --force.
For a moving character, use bone limbs with length/width profiles, a mass torso with squash, and rows for detailed heads and props. For a slime or blob that sits on the ground, use a flat mass body and an idle motion with squash instead of breath (examples/slime-idle.poses.json): it squashes and stretches with its base on rig.ground in every frame. Declare dark-to-light ramps and world light (default 225°). A figure is outlined once, round its silhouette: where a bone or mass outline falls inside it (an arm across the chest), it is drawn a ramp step below the part's base colour; "innerLines": "outline" keeps it in the outline colour. Relative angle follows the parent; legacy rotate stays absolute. Attachments resolve in any order while parts paint in listed order. A two-bone reach targets a canvas point; grid views preserve authored detail at key angles.
Assign rig roles (body, head, legs, arms, tail, ground, rest) and add motions for idle, walk, run, jump, attack or hurt. For a four-legged animal name fore and hind legs instead of legs, with an optional chest bone the gallop bends against the body and a neck that keeps the head steady: its walk is a lateral sequence with three feet down, trot moves diagonal pairs and run is a gallop with two flights (examples/fox.poses.json; four-legged rigs). Templates compile to ordinary recipes with named layers; pixelbolt compile actor.poses.json --expand --out actor-edit.poses.json exposes the generated poses. An authored pose with the same name overrides a generated pose. A jump tucks its legs in the air, a hand that would float beside the body gets more elbow bend, and a grid foot with a toe-up and a toe-down view rolls from heel to toe (feet without views stay flat). Keep the source authoritative and tune reach warnings, contacts and silhouette before export. The full pose reference gives field ranges, defaults, points, joint rules and template parameters.
Use pixelbolt inspect actor.poses.json --motion run --speed 48 or MCP pixel_inspect with {source, view:"motion", animation:"run", speed:48}. A compiled recipe/revision needs explicit metadata from pixel_compile with metadata:true. Review slide, signed ground error, key-pose spread and joint loop seams, and in a walk or run the gait: arms swinging against the legs (armSwing), knees nearly straight where both feet are down (contactLegs) and a walk's lifted knee not marched up (kneeLift); missing information is reported as unavailable, and a four-legged rig's gait checks are null while slide, ground and the loop seam measure all four feet. Contact checks sample frame onsets, not continuous travel during a held frame. The image shows at most 32 evenly spaced timing cells, fewer for big frames, while the numbers measure every frame; when cells are left out the reply's top-level sampling gives total, shown, omitted and method, and with every frame shown there is none (motion.sampling only says how contacts are sampled). A trajectory or arcs that do not fit the image are left out, with a reason. The review image also draws the arcs: one cycle's path of each foot and hand (the ends of the rig's legs and arms) and the top of the head over the first pose, magnified under the timing cells, near limbs solid and far ones dashed, with a ring where a foot lands on that foot, its hand and the head (white for the near foot, yellow for the far one). In a walk or run the foot's ring sits at the front of its loop and the hand's at the back of its arc: a hand ringed mid-arc swings a quarter cycle late, a head ringed at the bottom of its path crouches into each contact, and one foot's loop rising well above its partner's is a marched knee. arcs in the reply names each path's colour and the landings; checks that pass are no substitute for looking. In the studio, open the pose source, select Motion or Show contacts, and keep Travel (px/s) separate from playback speed.
- Use a 16×16 or 24×24 canvas and 4–8 colors. Establish the silhouette as a readable grid.
- Save repeated components as symbols. Name colors semantically for shape operations; use one-character palette keys in grids.
- Build one good resting pose. Create frames with
fromfor small changes, or stamp body parts in separate layers for movement. - Start at 80–200ms per frame. Add holds intentionally by increasing a pose's duration. Group sequences by behavior: idle, walk, jump, impact.
- Validate, inspect, patch, repeat; render when the art is right. A valid JSON document can still have a bad silhouette, wrong facing or a jerky loop. Check each animation's contact sheet, read a region grid before editing exact pixels, and confirm each patch changed only the pixels you meant to change.
- Save the JSON source with the output bundle. Inherit poses instead of repainting the entire image where possible.
CLI: node bin/pixelbolt.js inspect sprite.json --out sprite-frames.png, optionally with --animation idle or --grid --region 4,6,8,6; node bin/pixelbolt.js patch sprite.json --changes fix.json --out sprite-v2.json for targeted edits; then node bin/pixelbolt.js render sprite.json --out output/sprite. autotile (and compile of an autotile source) takes --preview <new.png> to write every tile over a test map. Files that compile, autotile, import and overlay generate, and the examples, use compact formatting: anything that fits in 120 columns (a frame, an operation, an animation) stays on one line, and pixel grids keep one row per line.
CLI sharing is opt-in: pixelbolt share <recipe.json|-> prints a playground link to the resolved source, including wave, crystal, falling-sand and rigid-body sources, which the playground compiles and keeps editable; render and scene accept --embed-recipe, and import image.png --embedded --out recipe.json recovers its source. MCP pixel_render accepts share: true and embedRecipe: true for the same resolved recipe. Links carry the recipe text and engine version in the URL fragment, which browsers do not send to a server; PNGs carry them in a compressed recipe chunk, for recipes up to 1 MiB (the most a PNG can carry and still open in Pillow); a larger recipe is refused, so share its file or a link instead.
MCP: call pixel_help once for a short quick start. Its topic returns one longer document when you need it: this guide (guide), the art workflow (workflow), the recipe's JSON Schema (schema), a complete recipe (example), or a source format's schema (poses, scenes, autotile, fx, fluid, wave, crystal, bodies, normals). The guide, the workflow and the craft notes are long, so without name each returns its opening and the list of its sections with their sizes. With name set to a section's heading (or its start, such as "Depth") it returns that section alone, or for a section over 12 KB ("Fluid effects") its opening and the list of its parts, each read the same way ("Whitewater"). A word that starts no heading ("apex", "gifScale") returns the paragraphs that mention it, cut to the table rows, list items and sentences that do; "all" is the whole document and "Fluid effects all" a whole section. A schema topic is read the same way: without name an outline of its properties, with a path of property names ("effects.bodies") that part as JSON, and with "all" the whole schema. From a shell, pixelbolt help <topic> [section] prints the same, such as pixelbolt help workflow "Fluid effects" (quickstart for the quick start).
The tools describe project only briefly; the server checks every recipe and names the path of any mistake. Send { "project": <recipe> } to pixel_inspect (plus any inspection options) or pixel_validate, a cheaper check without images. Afterwards pass { "revision": <id> } instead of the recipe, and use pixel_patch for edits (or overlay to apply a saved correction overlay). When the art is right, call pixel_render with the revision. Rendering returns the output directory, the key files relative to it (sheet, atlas, name.pixel.json, CSS, preview and animations, with frames/<frame name>.png standing for the one PNG of each frame), and animations: by name, how many frames each plays, its duration, whether it loops and, where its frames all last the same, its fps (two decimals, or three significant figures under 1; the first 16 animations, the rest named in moreAnimations; validate, inspect and compile replies describe them the same way, a still tile set has no rate, and the export's README.txt times every animation of two or more frames) and a PNG contact sheet of every frame; pass listFiles: true for every path. The CLI's render and scene reply the same way: the absolute directory once and files relative to it, without each frame unless --list-files. compile, autotile and import write their metadata only to --metadata <new.json>; without it the reply says so instead of printing it. Clipping lists the first 16 places, with clippingOmitted for the rest. Its preview metadata gives the region, sheet layout and cell names/durations. Add "animation": "idle" to preview that sequence in expanded playback order, including repeated poses; all animations are still exported. Every render gets a unique output directory, so iterations do not overwrite earlier results.
Large pixel_render previews are automatically sampled to stay inside inspection bounds; all animation frames are still exported. The response explicitly includes preview.sampling and a playback HTML path when rendering. Use pixel_inspect with a narrower selection for omitted detail. Contact sheets are static, even when arranged in playback order.
Topic presets lists the shipped presets read from the package's examples/ folder: every *.fluid.json, *.fx.json, *.wave.json, *.crystal.json, *.powder.json, *.bodies.json, *.poses.json and *.autotile.json source and each plain recipe whose animations all loop (the coin spin, the ember) and that no source there compiles to, each as one line under its name: kind, size, frames (and in how many animations, when more than one), loop or one-shot (or both), colours and what it is for. With "full": true (pixelbolt presets --full) each is an object instead, with its name, kind, file, size, frames, plays, colors, for and every animation's frames. It compiles every preset to measure them, so the first listing takes 10–20 seconds (over MCP, past 20 seconds it lists the rest without measuring them, marked unmeasured in full, with a note; pixelbolt presets measures them all). Once the export directory exists, the MCP server keeps those measurements in its .presets folder, one file for the engine's exact code, so later listings read them instead of compiling (past the 20 seconds too) and a changed preset or engine is measured again; pixelbolt presets measures afresh each time. Topic preset with name returns one preset's source with any file it names inlined, ready to edit and send to pixel_compile as source (a plain recipe preset is already a recipe: send it as project). A name is the file name without .json and its format word (smoke-puff, fire-spells, hero); when two presets would share one, both are named with their kind (torch.fluid). The CLI's pixelbolt presets [name] prints the same.
pixel_compile turns a pixelforge-poses source, a pixelforge-autotile template, a pixelforge-fx source (particles and spell shapes; see spell and impact shapes), a pixelforge-fluid source (simulated smoke, fire, explosions, steam, magic, water and thick liquids such as honey and slime; see fluid effects), a pixelforge-wave source (looping interference and portals), a pixelforge-bodies source (balls, boxes and hoops that bounce, stack, topple and rest, with joints, ropes and cloth, and territory matches; see rigid bodies; with sequence ({ fps, size, … }, animation naming the effect) a match is written as numbered video frames instead of a recipe, so it may run past 256 frames, and a match too long to draw within the call's time limit is refused at once with the pixelbolt sequence command to run instead), a pixelforge-crystal source (faceted crystals, clusters, geodes and snowflakes that grow from seeds and come to rest; see crystal growth), a pixelforge-powder source (a falling-sand sandbox of sand, water, fire, smoke, lava and more, with heat, burning, collapse and moving air, sampled into one-shot clips; see falling sand), or a pixelforge-normals source (or, with preset instead of source, a shipped preset by name, compiled exactly as its file compiles; pixelbolt compile --preset <name> --out <new.json> from a shell; with size such as "32x32", --size in a shell, the compiled drawing is put on a canvas of that size, cut to the window holding the most of it or given margins and never scaled, a warning saying what share a cut leaves out (metadata: true adds resized: the old size, the window's offset and the share cut), and a recipe whose operations read the whole canvas, such as an outline or a dither, is refused, as is a layer sorted by ground that draws past the canvas where the new one has a margin; with frames such as 8, --frames in a shell, each animation that has more keeps that many evenly spaced frames, each lasting as long as the frames it stands for, the reply's kept saying what each went from and to; an fx source authored at a screen size is thinned this way to fit the 4,194,304-pixel total, its total and operations counted over the frames kept) into a recipe revision with a contact sheet (an autotile set also returns every tile over a test map as a second image, and its warnings name any seam; see autotile templates) (metadata: true adds pose attachments and markers, the autotile mask table and seam counts, particle counts, fluid peaks and per-frame pixel counts, crystal counts and the frame each growth settles, or the normal directions and their pixel counts).
With draftViews ({"boot": [30, 330]}, at most 16 angles a part and 32 drafts a call) and a pixelforge-poses source or preset, it compiles nothing: it drafts those grid parts turned by pixel-art rules and returns each as a view's rows, anchor and points (with a note on how it was drafted, and which authored view the compiler draws there today) and a sheet of every draft beside the flat drawing, today's turn and that view; correct the rows, then paste each into parts.<name>.views (see relative joints, targets and views; pixelbolt compile <source> --draft-views boot:30,330 [--preview drafts.png] [--out drafts.json] from a shell).
A normals source derives a lighting normal pass from a colour recipe given inline, as a file inside the root or as {"revision": id}, rounding each shape, except that faces gives the pixels of chosen palette keys one flat direction each (a box's top and front); see generated normal passes.
pixel_scene renders a pixelforge-scene manifest at a time and returns the image with placements and warnings (view: "depth" tints placements far to near, draws each sorted one's ground line and lists who covers whom; guides as for inspection); assets may be inline recipes, files inside the server root or {"revision": id}, export: true writes a replayable scene bundle, and gif: {} (with scale 1–16, fps, default 25, and background, an opaque hex to blend onto) writes the whole scene as one looping GIF, through its duration once: pixelbolt gif <scene.json> --out <new.gif> [--scale 4] [--fps 25] [--background "#14213d"] [--sheet <frames.png>] in a shell. A duration that is not a whole number of frames gets a note naming one that is. With no fps, when 25 holds some placement's frames for uneven numbers of GIF frames, a note names a rate from 8 to 25 that holds each for a whole number (fps 20 for frames of 100 ms, which 25 shows for 120 and 80 ms by turns); the default stays 25.
pixel_import turns a base64 PNG (data) or a file inside the root (path) into a lossless recipe revision.
For an interactive web page, createLiveFluid(source, { effect, warmup }) from pixelbolt/fluid runs one effect of a fluid source live, a frame at a time, instead of baking a recipe. step(n) advances it; push({ x, y, vx, vy, radius }) stirs the flow; puff({ x, y, radius, density, temperature }) adds or takes away smoke, heat or water; boost(name, strength, frames) scales a named emitter for a while; and render() returns { rgba, keys, fluid }, drawn with the effect's own look (fluid marks the pixels the fluid itself is drawn on, apart from an outline or decoration in its key). It makes the same checks as compileFluid before simulating (only its warm-up counts against the work budget, since it steps a frame at a time) and runs the same simulation, so the same calls give the same pixels in every engine. A 128 × 60 steam plume steps in about 8 ms on a desktop CPU. See live fluids.
Exports include a TexturePacker-style RGBA atlas, named sequences, exact durations, Aseprite-style frame tags, a Godot 4 SpriteFrames (name.tres, beside the sheet it names) and, for a recipe whose frames are an autotile set or have tile, a Godot 4 TileSet (name.tileset.tres) with a terrain whose peering bits come from each tile's mask, each tile's probability and collision, and a Tiled tileset (name.tsx) whose Wang sets carry the same terrains, individual frames, APNGs, CSS and a Canvas player. A tile set with no animations of its own exports no SpriteFrames, APNGs, CSS or player, since its only animation would flip through every tile, and neither do stills ("animations": {}), which also get no GIFs or video frames; the atlas of either lists the frames alone, with no animations and no meta.frameTags, so read a frame's rectangle by name instead of calling frameAt. Browsers play an animation frame of 10 ms or less at 100 ms, so the APNGs give such frames 11 ms (with a warning); the atlas, CSS and player keep the exact durations.
sheet.scale applies to every raster export and atlas coordinate. Metadata coordinates are already scaled; do not multiply them again. The browser player's optional scale is an additional display scale. Frames with anchors or points carry anchor, pivot and points in the atlas. player.js also exports loadSpriteSheet(url), frameAt(atlas, animation, ms) and drawFrame(context, sheet, name, x, y, { scale, flipX, anchor }) for games that draw many sprites into one canvas; drawFrame places a frame by its anchor and honors trimmed rectangles; flipX mirrors around the anchor corner, exactly as a compiled mirror pose does.
For Godot 4, use name.tres with name.png beside it (see game integration). For grid-based game engines, prefer padding 0. For atlas importers, use the exact frame rectangles. Atlas animations list expanded playback order (including reverse/pingpong) and a loop flag.
Every render reports a check of what it delivered: the size of each exported frame (the canvas times sheet.scale), each animation's frame count and loop, the colours used (fully transparent pixels are not colours), whether the frames are transparent, the GIF size, and frames that are fully transparent. For every animation of two or more played frames (the first 16), check.motion gives each played frame's silhouette box [x, y, w, h] (its pixels with any alpha, in canvas pixels before sheet.scale; null for an empty frame) and its lowest row, in play order (at most 64, with omitted for the rest; a tile set without animations of its own has none). A reply carries the boxes only of the animations a note is about.
When the recipe names its animations, check.notes also points out loop motion that tends to look wrong, in a loop whose every frame is a solid body (its pixels fill at least 40% of its box): frames of which at least half stand on one lowest row while one leaves it by 2 rows or more (a body standing on the ground should squash onto that row; a hop, a jump, a run's flight frames or something that floats may leave it on purpose); a step of 3 px or more that is at least twice the median step (a step is the largest move of any edge of the box), or a jump of that size from the last frame back to the first (not a pingpong's turn), with the steps that barely move beside them; and, in any loop, neighbouring frames that are pixel-identical with equal durations (a different duration, or a repeated frame name, is a hold). For a loop that only loops by default, the first lift, uneven or join note says how to make it play once. One-shots get no motion notes. These notes are advice, at most eight motion notes a check plus a count of the rest, and they never change check.ok or add a problem; pixel_inspect with view: "motion" and the animation shows those frames in play order.
The check reads what the export delivered. Give it what the user asked for, as MCP pixel_render's expect or pixelbolt render --expect '<json or file>' (width and height of each frame, frames per animation, at most colors, transparent for the background, loop, sheet, the sprite sheet the user named (its width and height in pixels, or its columns and rows: {"rows": 1} is a one-row strip, since a sheet wraps at 8 columns unless the recipe sets sheet.columns), and gifScale, the GIFs' enlargement over the asked frame size, where the call writes GIFs: gif over MCP, --gif or --gif-scale from a shell), and check.ok says whether the files match, with one entry in check.problems per mismatch: the file, what was asked, what was delivered and the patch or render call that fixes it. frames is either one count that every animation should play or a count per animation name, {"idle": 4, "walk": 8}, where a name the recipe lacks is a mismatch. With one count, a one-frame animation beside longer ones is a still (a standing pose, a prop) and is left out with a note; when no animation plays the count but the animations' frames add up to it, the one problem says so and gives the per-animation form, rather than padding every animation. A fix never adds frames by repeating names, which only holds a pose. GIFs a whole number of times the frame size, when only the frame size was asked for, are noted rather than failed: the note gives the gifScale that checks that size and the call that writes GIFs at the frames' own size. Otherwise GIFs are checked against the asked size when width, height or gifScale is given, and against transparent and colors: a GIF background makes an opaque GIF with a colour of its own. With animation (CLI --animation), only that animation and its frames are checked.
A delivery with nothing visible, every checked frame fully transparent, fails the check even without expect (check.ok false): a recipe compiled from a source usually has its drawing outside the canvas, so read the compile warnings. The check reads the export and never changes it. Its fixes stay inside the format's limits: a size an animation frame cannot hold (over 1024 px a side or 262,144 pixels) becomes a smaller canvas at a whole sheet.scale (the one nearest the drawing, and the most detailed: 1920 × 1080 becomes 128 × 72 at 15 or 640 × 360 at 3), more than 256 frames come from an animation that repeats frame names (up to 1,024 names, or 2,046 frames as a pingpong), and an opaque background that frame drawing erases names the clear, erasing dither, translate or "transparent" pixels that do it; a fix that would pass the exporter's pixel budgets (frames, atlas, animations, GIFs) says so instead. delivered.partlyTransparent reports pixels that are only partly transparent.
pixelbolt render --scale 4 (MCP pixel_render with scale, 1–16) enlarges every exported pixel, sheet, frames, animations and atlas alike: it is the recipe's sheet.scale set for that export, kept in the bundle's copy of the recipe and in the revision MCP returns. --columns <n> (MCP columns, 1 to the frame count) is its sheet.columns the same way: --columns <frame count> with --expect '{"sheet":{"rows":1}}' is a one-row strip. --normal <file> (MCP normal: a normal recipe, {"revision": id} or a pixelforge-normals source) exports a normal pass beside the sheet, on its grid, as <name>.normal.png, <name>.normal_y_up.png and a Godot <name>.canvas.tres that <name>.tres then draws through; the pass must share the recipe's size and frames.
For sharing where only GIF animates, pixelbolt gif <recipe> --out <new.gif> [--animation name] [--scale 1-16] [--background color] writes one GIF, and pixelbolt render --gif (--gif-scale 4 to enlarge) or MCP pixel_render with "gif": {} writes one for each animation beside the bundle, at the frames' own size unless a scale enlarges them: exact colours and never quantized (a frame needing more than 256 colours is an error), 1-bit transparency at 50% alpha unless a background colour blends it, and delays in 10 ms steps (20 ms minimum). Read the returned notes; use APNG or the atlas when alpha or timing must be exact.
pixelbolt gif-frames <folder> --fps 25 --out <new.gif> [--loops 0] [--background color] [--prefix name_] makes a GIF from a folder of numbered PNG frames (name_0001.png …, from sequence, a video tool or an editor) by the same rules, one GIF frame per file in number order. It never quantizes: a frame over 256 colours is refused by name, and frames whose colours differ across the loop each carry their own colour table, so thousands of colours over a loop stay exact. Frame k starts at k × 1000 / fps ms rounded to centiseconds, so 25 fps is 40 ms per frame, 30 fps alternates 30 and 40 ms and keeps the loop's length, and above 50 fps delays are raised to 20 ms (reported). --loops is the number of plays, 0 (default) for ever. Without transparency, frames after the first store only the rectangle that changed. The result reports the delays used, colours per frame and in all, gaps in the numbering, other PNGs left out and notes. The PNGs may be RGB, RGBA, greyscale or indexed with up to 8 bits per channel (not interlaced), all the same size and at most 4096 pixels a side, and 134,217,728 pixels (115 frames at 1080 × 1080) and 18,000 frames in all.
Before making frames for video, pixelbolt validate <recipe> --fps 30 (MCP pixel_validate with "fps": 30) adds frameGrid: the frames whose durations are not whole video frames (with how many frames they are), and for each animation the positions a sequence would lengthen, shorten or never show, the pass length in video frames, whether a loop closes on the grid and loopsThatFit when it does not. It predicts exactly what sequence writes without writing anything.
For a video editor, pixelbolt sequence <recipe|source|scene> --out <new folder> --fps 30 --size 1080p (or "sequence": { "fps": 30, "size": "1080p" } on MCP pixel_render and pixel_scene) writes one PNG per video frame with straight alpha, enlarged by a whole number and placed with align and offset. Without scale the enlargement is the largest that fits size (1 without a size); background, a palette name or opaque hex colour, replaces the alpha; seconds sets the clip's length instead of loops; and on pixel_render, animation picks the animation (by default the previewed one, or the first) and step: 2 holds each sampled pose for two video frames, animating on twos. fit: "cover" (with a size) takes the smallest whole enlargement that covers the canvas and crops the overhang; placement.visible in the result is the [x, y, width, height] of the source that stays in view, so keep the action inside it. A video frame shows the pose active when the frame starts, so durations that are whole multiples of the frame time (33.333 ms at 30, 41.667 ms at 24) survive unchanged: prefer 100, 200 or 500 ms at 30 fps and 125 or 250 ms at 24 fps. Read notes for poses that changed length, poses shorter than a frame that are never shown, and whether the loop closes on the frame grid; loops can make it close. Author a scene at 192×108 or 240×135 to fill 1080p exactly; any other scene gets margins in its own background colour (when that is opaque), or fills the canvas with fit: "cover". A pixelforge-bodies match and a pixelforge-powder clip are stepped frame after frame instead of compiled (pixelbolt sequence <source>, or sequence on pixel_compile), so they may run past a recipe's 256 frames. The result includes the ffmpeg command for an alpha .mov; Pixelbolt does not encode video.
To deliver files at the names the user asked for, pass pixel_render a saveAs map, such as {"sheet": "assets/hero_sheet.png", "atlas": "assets/hero.json", "gif": "assets/hero.gif"}. Keys are sheet, atlas, recipe, gif and apng (the GIF or APNG of the one animation, or of animation when the project has several), or any PNG, GIF or JSON file the export lists, such as frames/idle-0.png or gifs/walk.gif; a GIF here makes the GIFs at the frames' own size unless gif says otherwise. Paths are relative to the server root and keep the file's type. Everything is checked before anything is written: a path outside the root (a symbolic link that leads out of it included), inside the revision store, under a hidden name (one starting with .) or in the home folder's AppData (Windows) or Library (macOS), with another extension, named twice, or of an existing file is refused by name, and "overwrite": true lets it replace existing files: any image, but a JSON file only if it is a recipe, atlas or sequence (an object with frames), a .tres only if it is the same kind of Godot resource (SpriteFrames, TileSet or CanvasTexture), and a .tsx only if it is a Tiled tileset. A saved atlas names the saved sheet (or the export folder's sheet) in meta.image, and sequence/ files can be saved when sequence is given. With a normal pass, a saved CanvasTexture (key "<name>.canvas.tres") names the saved sheet and the saved <name>.normal_y_up.png (or the export folder's), and a saved SpriteFrames (godot) draws through a CanvasTexture saved in the same call; saved without one it draws the plain sheet, unlit, and its saved entry has a note saying so. Paths are compared after resolving links, so a link can't lead into the revision store or name one file twice. The export folder is still written, and the reply's saved lists each copy (replaced: true where it overwrote one).
Clients that negotiate MCP Apps (io.modelcontextprotocol/ui, with MIME type text/html;profile=mcp-app) also get an inline player from ui://pixelbolt/viewer for inspect, patch, compile, render, scene and import. Its data lives only in _meta["io.github.skulitom/pixelbolt"].preview: version 1, native width/height, suggested integer scale, frames (name, duration in milliseconds, base64 png), animations (name, zero-based frame indices in expanded playback order, loop) and truncated (omitted frames). An optional animation selects the initial sequence. The preview keeps a prefix of at most 240 frames and 4 MiB of base64; exports stay complete. Render adds at most 64 absolute files paths of at most 1,024 characters each (key exports, saveAs targets and GIFs first), with filesOmitted counting any paths left out, verdict (passed, failed, or not-checked) and shareLink when requested. The viewer uses no network; its playground button asks the host to open the link. Clients without the extension keep their existing static contact sheets; exported APNGs and preview.html play animations in either case.
At most 20,000 operations and 67,108,864 estimated drawing pixels are accepted. Animation exports across all sequences are also limited to 67,108,864 scaled pixels, and so are the frames an export writes whole to frames/ (stills on a trimmed sheet at a large scale reach it first). CLI/MCP transport errors and render errors provide actionable paths; don't suppress them. An invalid drawing operation doesn't stop the check: the others are still checked, and the reply's errors lists each (up to ten) once, a message that starts with its path. A grid names every row whose width differs from row 0, with its width, and every unknown character. Requests may be up to 16 MiB; an oversized request gets a JSON-RPC error and the server keeps running. Calls run one at a time in the order sent; ping is answered even while one runs, and notifications/cancelled stops a running or waiting call, which then gets no reply.