Change a colour
Palette names make global art direction legible. Change one hex value; every use updates.
pal sky=#1a1c2c glow=#ffcd75
rect 0,0 16x16 sky
circ 8,8 3 glow
You never have to write PixelCraft to create with PixelPlace—your agent can do that. Learning a few lines simply gives you another way to steer: change a colour, nudge a shape, or understand exactly what your collaborator made.
A program starts with an exact canvas and named colours, then draws from back to front. The source stays readable, diffable, and reversible.
canvas 16x16
pal bg=#1a1c2c ink=#f4f4f4 heart=#ef7d57
rect 0,0 16x16 bg
rect 4,4 8x8 ink
px 6,6 9,6 bg
rect 6,9 4x2 heart
Palette names make global art direction legible. Change one hex value; every use updates.
pal sky=#1a1c2c glow=#ffcd75
rect 0,0 16x16 sky
circ 8,8 3 glow
Wrap related marks in offset. One pair of numbers moves the complete cluster.
offset 2,-1 {
rect 4,5 8x6 body
px 6,7 9,7 eye
}
A timeline declares its frames. Expressions keep motion consistent and easy to revise.
timeline 0..3 {
each {
circ 8,(8 - sin01(tt) * 2) 3 glow
}
}
get_pixelcraft_guide tool, so the human and agent learn from one source of truth.canvas WxHRequired. Set canvas size (1..256 per side)
canvas 16x16version 0.1Optional top-level language line pragma
version "0.1.x"pal ...Define indexed or named palette
pal bg=#1a1c2c skin=#ef7d57pal :pico8 | :dawnbringer16 | :gameboy | :endesga32Load a built-in palette preset
pal :pico8pal+ ...Explicit palette append syntax
pal+ :gameboy ui=#f0f0f0pal name=#hex..#hex steps NGradient range (creates name0..nameN-1)
pal sky=#1a1c2c..#6eb5ff steps 5let name = EXPRDeclare variable ($name to reference)
let size = 4const name = EXPRDeclare semantic scalar symbol (forward refs supported in compiler flow)
const pulse = (sin01($t) * 4)letpair name = PAIR_EXPRDeclare reusable pair alias
letpair spray = 8x4defpt name = POINT_EXPRDeclare declarative point symbol (forward refs supported in compiler flow)
defpt flame = face +1,-1box name X,Y WxHDeclare a named layout region with semantic points like topLeft and center
box hud 2,2 20x10box name in parent dock POINT WxH [offset X,Y]Dock a child layout region to a parent box edge/corner using matching semantic points
box footer in hud dock bottomRight 12x4 offset -2,-2layer "name"Create/switch layer (first created = back)
layer "details"with layer "name" [clear] { ... }Scoped layer block (desugars to push/layer/body/pop)
with layer "fx" clear { glow center 6 aura }fade [layer "name"] FACTORMultiply the alpha of everything already on a layer by FACTOR (0..1); repeated fades make trails and afterimages that deterministically dissolve
with layer "trail" fade 0.8 { px ($x),($y) spark }offset DX,DY { ... }Scoped translation block: shifts all drawing inside by (DX, DY); expressions allowed, nested blocks compose
offset ($sway),($bob) { px 4,4 ink line 0,0 8,8 ink }clear [COLOR|layer "name" [COLOR]]Clear/fill active or named layer
clear layer "fx" #00000000font "name" { glyph ... }Bitmap font declaration (preamble)
font "tiny" { glyph "A" advance 4 { "11" "11" } }pushSave drawing state (mirror, cursor, offset, color, layer)
pushpopRestore most recently saved state
poppx X,Y COLORPixel (supports multi-point)
px 0,0 4,4 8,8 1rect X,Y WxH COLORFilled rectangle
rect 2,2 4x6 2orect X,Y WxH COLORRectangle outline
orect 2,2 4x6 trimline X1,Y1 X2,Y2 COLORLine segment
line 0,0 15,15 1oline X1,Y1 X2,Y2 COLOROutline line segment
oline 0,1 15,1 glowcirc X,Y R COLORFilled circle
circ 8,8 3 glowarc X,Y R START END COLORClockwise arc stroke (0 degrees = +X)
arc 8,8 4 315 45 glowocirc X,Y R COLORCircle outline
ocirc 8,8 3 glowellipse X,Y RXxRY COLORFilled ellipse
ellipse 8,8 4x2 glowoellipse X,Y RXxRY COLOREllipse outline
oellipse 8,8 4x2 glowpoly X,Y ... COLORFilled polygon
poly 2,5 8,1 14,5 3opoly X,Y ... COLORPolygon outline
opoly 2,5 8,1 14,5 3glow X,Y R COLORRadial glow (fades to transparent)
glow 8,8 4 #ffcd75dither checker|bayer|noise at X,Y WxH A B [seed N]Two-color dither fill with deterministic mode/seed
dither noise at 0,0 16x16 bg fog seed 42fill X,Y COLORFlood fill
fill 0,0 bgcolor COLORSet current color for following commands
color skintext "..." at X,Y font "name" color CRender bitmap text (supports align/tracking/lineHeight/wrap)
text "HELLO" at 2,2 font "tiny" color skin align centercenterCanvas center keyword
circ center 4 1+X,+YRelative coordinate from cursor
px +1,+0 2cursor X,YSet cursor position manually
cursor 8,8anchor name X,YName semantic positions
anchor face 8,6mirror :x|:y|:xy|offSymmetry mode
mirror :xgroup "name" [pivot X,Y] { ... }Reusable code block with optional stamp pivot
group "eye" pivot 1,1 { px 0,0 1 }bitmap "name" [pivot X,Y] { ... }ASCII sprite definition with optional stamp pivot
bitmap "spark" pivot 1,1 { ".1." "111" ".1." }tileset "name" tileSize WxH [seed N] { tile ... [weight N] }Tile symbol library for tilemaps (preamble, supports deterministic symbol variants)
tileset "terrain" tileSize 8x8 seed 7 { tile "W" "window_off" weight 4 tile "W" "window_on" weight 1 }tilemap "name" from "tileset" { ... }Grid layout of tile symbols (preamble)
tilemap "field" from "terrain" { "GGSS" "G..S" }stamp "name" at X,Y [opacity A]Place group/bitmap
stamp "spark" at 4,2stamp "name" at X,Y :flipx :flipyPlace stamp with flip
stamp "arrow" at 4,2 :flipxstamp "name" at X,Y :rot90Place stamp with rotation (90/180/270)
stamp "arrow" at 4,2 :rot90stamp "name" at X,Y :centerCenter bitmap footprint on target point
stamp "arrow" at center :centerstamp "name" at X,Y :pivotAlign the target's declared pivot to the target point
stamp "icon_sword" at 12,12 :pivotrepeat N step DxDy { ... }Offset loop ($i = 0..N-1 inside)
repeat 4 step 2x0 { px 0,0 1 }timeline A..B { each { ... } range C..D { ... } at N,M { ... } every N [offset O] { ... } }Compact animation timeline that expands to frames
timeline 0..7 { each { px ($frameNumber,0) 1 } }tile "name" at X,Y WxH [step WxH]Region tiling (supports transforms)
tile "grass" at 0,0 32x32map "tilemap" at X,YRender a tilemap using its tileset symbols
map "field" at 0,0scatter "name" in X,Y WxH count N seed SRandom stamp placement (seeded PRNG)
scatter "star" in 0,0 32x32 count 20 seed 42emit "name" at X,Y [count N] [spread WxH] [drift DXxDY] [time T] [vel VXxVY] [jitter JXxJY] [active A..B] [life L] [loop N] [fade] [seed S]Seeded particle-like stamps with optional per-frame drift
emit "spark" at 8,8 count 10 spread 6x4 drift -1x0 time ($frame - 3) vel -1x0 jitter 2x1 life 6 loop 24 fade seed 42version 0.1 or quoted variants like "0.1.x").0..(palette_length-1); out-of-range values emit runtime errors and fall back to 0.0-9, a-z, and A-Z (indices 0..61).drift); prefer names like driftVec or delta.center behavior depends on command type; for visual stamp centering, use stamp ... :center.pivot X,Y on a group or bitmap, then use stamp ... :pivot for semantic alignment (great for icons and HUD parts).stamp placements (including transforms), scoped static repeat tracing, and scoped static tile tracing. scatter/emit, group-nested stamp paths, and unresolved/oversized repeat/tile expansions remain unsupported in v1.Target = Tilemap ... with direct map-instance picking, brush/erase cell edits, and source-mapped row commit. Group-nested map paths are currently not selectable for pointer painting.emit is stateless per frame and deterministic for the same seed + frame/time/loop inputs.frame/frames, keep canvas, pal, group, bitmap, tileset, and tilemap in preamble.You know enough. Make one change, look at the canvas, and let the conversation continue.
Create with an agent