Getting started · celworld docs

Getting started

celworld is a procedural, cel-shaded world engine. Every model and scene is a short script that Claude writes and your browser compiles from a seed. This is the path from nothing to your own game.

What you write

Everything in celworld is a script. There are three kinds:

KindWhat it isHow it's written
ModelsCritters, machines, furniture, landmarks, vehicles: anything in the libraryA .cel script, usually 20 to 70 lines
ScenesLiving dioramas: towns, carnivals, harbours, offices, dungeonsA .scene script that names models and lays them out by structure
GeneratorsPeople, trees, bushes, rocks, props, buildingsHand-coded TypeScript in the engine; scenes use them as built-ins

Claude writes the models and scenes. A Claude Code session follows these docs, drives the cel command line, looks at its own screenshots and keeps going until the thing is right. You can write them by hand too: the language is small and the Playground compiles as you type. To read a script someone else wrote, paste it into Explain: every line gets a plain-English card linked to the live render, with any error pinned to its line and what to change.

One art style, for free

Every script compiles to the same primitives (lathes with superellipse sections, balls, limbs, rounded boxes, cones, tori), the same toon materials (three hard light bands and a thin rim) and the same plum ink outlines. There is no shader to pick and no texture to paint. A model that compiles is already on-style, and it sits next to every other model in the library without looking borrowed.

The look is a switch, not a rewrite. Cel is the default; Diorama and Papercraft draw the same seeds, models and scenes as soft daylight on a floating island, or as cut and folded card in a pop-up book.

Seed, spec, geometry, instance

Every thing in celworld is built one way:

StageWhat it isTouches the GPU
SeedA 32-bit number. Same seed, same thing, foreverNo
SpecVersioned pure data: compileCel(src, seed), resolveScene(prog, …), generateCharacter(seed)No
GeometryOne merged, vertex-coloured mesh per ink classYes
InstanceShared toon materials, ink outlines, procedural motionYes

A .cel script is a family, not a single model. Every seed grows a different, equally good variant: a..b draws a number, red:3|teal|cobalt picks a colour by weight, chance(.4) decides whether a part exists. Pin a model version and a seed, and you get the same thing back years later.

A model, start to finish

This is the fox cub from the reference set: a body, four legs, a face, a chained tail, idle motion and a walk state, in 32 lines with comments.

1asset fox_cub "Fox cub" complexity=4
2// a chibi fox cub: a round body on four short legs, a big head with a pointed muzzle and tall ears,
3// a fat brush tail with a pale tip; it breathes and wags at rest, trots when a game says walk
4let S = .9..1.1
5let coat = tangerine:3|copper:2|honey|cream:.5
6let pale = cream:2|white
7let sock = walnut:2|redwood|iron
8let earS = .9..1.15
9
10// body: the root bone, standing on four legs
11ball body at=(0, .27*S, 0) r=(.16, .15, .22)*S color=coat under=pale segs=20 rings=12 joint
12limb leg x2 on=body row=(0, 0, .25*S) at=(.085*S, -.02*S, 0) mirror len=.2*S r=(.052, .044)*S bands=[.6:sock] color=coat segs=10 joint
13
14// head and muzzle
15ball head on=body at=(0, .16*S, .2*S) r=(.165, .145, .145)*S color=coat under=pale segs=20 rings=12 joint
16ball cheek on=head surf=(0, -26) upright lift=-.07*S r=(.11, .07, .08)*S color=pale segs=12 rings=7
17cone muzzle on=head surf=(0, -12) lift=-.03*S h=.11*S r=.06*S r2=.022*S color=coat segs=12
18ball nose on=muzzle at=end r=.028*S color=inkDark ink=thin segs=8 rings=5
19face look on=head eyes=round:3|happy mouth=cat spacing=30 eyeY=14 mouthY=-36 mouthW=.3 size=.2 detail=.6
20cone ear on=head surf=(34, 52) lift=-.03*S mirror h=.15*S*earS r=.065*S r2=.008*S depth=.55 color=coat segs=10
21cone inner on=ear at=(0, .01*S, .022*S) h=.11*S*earS r=.04*S r2=.006*S depth=.4 color=pale segs=8
22
23// the brush tail: three links that curl up, a pale tip
24ball tail x3 on=body at=(0, .02*S, -.2*S) chain=(0, .07*S, -.07*S) rot=(-28, 0, 0) scale=1.08 r=(.07, .07, .09)*S color=coat segs=12 rings=7 joint
25ball tip on=tail at=(0, .1*S, -.06*S) r=(.07, .08, .08)*S color=pale segs=12 rings=7 if=i==2
26
27// idle: breathe, wag, look about; walk: a trot (diagonal pairs) with a bob
28anim body breathe
29anim tail wag stagger=.12
30anim head sway amp=5 hz=.3
31anim walk: leg gait amp=30 hz=1.8 stagger=.5
32anim walk: body bob amp=.02 hz=3.6

Open it in the Playground and press the grid button: seeds 1 to 9 grow nine different cubs from the same lines.

The loop

Write, check, look, save. Each step is one command, run from the repo root with the site up on its dev port:

bun run dev                                              # the site; cel shot and cel thumb render through it
bun run cel catalogue                                    # what already exists: library models and built-ins
bun run cel agent start --label "Tiny Harbor: 3 models + scene"   # opens a run; prints its id
bun run cel scene new tiny_harbor --template beach       # a scene skeleton that checks clean as written
bun run cel check path/to/model.cel                      # until 0 must-fix
bun run cel shot model --file path/to/model.cel --out shots/model.png   # look at it, fix, repeat
bun run cel save path/to/model.cel --agent <run> --new --prompt "<the brief>"
bun run cel scene check packages/engine/src/scene/scripts/tiny_harbor.scene
bun run cel scene save packages/engine/src/scene/scripts/tiny_harbor.scene --agent <run> --prompt "<the brief>"
bun run cel shot scene tiny_harbor --out shots/tiny_harbor.png

Reuse beats making. Built-in generators and existing library models are approved and ready; search the catalogue for your scene's nouns before you write anything new.

Where to next

  • Writing a .cel model: the anatomy, kinds, budgets, motion, faces and the mistakes everyone makes once
  • Writing a .scene: templates, layout by footprint, life, lights, interiors
  • The cel CLI: every command, in the order you use them
  • Build a game: the renderer, the art table, saves, and Fold-Up Factory as the worked example
  • Engine laws: the rules that keep saved seeds stable and pages fast
  • Language reference: every kind, key, preset and palette name, generated from the compiler

Access

celworld is proprietary. The engine, the model and scene library, the cel tools and these docs live in a private repository, and nothing here is open source. Access is by arrangement. The guide on these pages is the same one the models, scenes and games on this site were built with.