Skip to content

Releases

v0.97.0: Ludra Studio

Choose a tag to compare

@github-actions github-actions released this 06 Nov 20:31
6e74463

An agent can make a game in minutes, but until now a person could only see the result when it was done. Ludra Studio is a desktop app to watch it happen: the game runs in the window, and each change the agent makes shows up in place, with its diff, while the game keeps going.

npm install -g @ludra/cli @ludra/studio
ludra studio my-game

Then run your agent (Claude Code or any other) in my-game and watch.

What you see

  • The game, live. It plays in the middle of the window. You can pause it, step frame by frame, restart it or pick a scene. You can also play it yourself.
  • Hot reload that keeps your place. When the agent changes a scene, a prefab, a script or an asset that the running scene uses, Studio rebuilds the world and replays the inputs played so far, up to the same frame. The game doesn't restart: "state kept at 41.5 s". A change that doesn't pass check is rejected, and the old version keeps running.
  • Activity. Every file the agent touches, as it happens, with a syntax-colored diff and the hot reload's result.
  • Hierarchy and Inspector. The scene's entities with search and icons, and the selected one's components with live values. Click an entity in the game to select it (2D).
  • Problems, Tests, Review, Console. check runs on its own after each change, so Problems is always current. test and review run with one click.
  • A native app. Menus, Open project and recent projects, a remembered window size and shortcuts: F5 play/pause, F10 step, Ctrl+R restart, Ctrl+Shift+C check, Ctrl+Shift+T test.

ludra dev --studio

Studio drives an ordinary ludra dev server with --studio, which adds /__ludra/project, /__ludra/events (file changes as server-sent events) and /__ludra/run (check, test and review as JSON), and game pages that hot-reload in place. The whole protocol is in docs/studio.md, so other tools can use it too.

The studio endpoints answer only a local host and, when LUDRA_STUDIO_TOKEN is set, only requests that carry it. Studio makes a random token for each game it opens, so a web page open in your browser can't read your project through them.

Games on GPUs that drop WebGL

Some GPUs give a page a WebGL context and lose it right away. A scene with a postfx shader then showed a white frame. Now a lost context counts as no WebGL: the game plays on without its shader, as it already did where WebGL is missing, and the page doesn't ask again, so the browser doesn't fall back to drawing everything in software.

Upgrading

  • Nothing to change in your games.
  • @ludra/studio is a separate package because it brings Electron. @ludra/cli doesn't depend on it: ludra studio finds it when it's installed, and otherwise says how to install it.

Next

  • v1.0: any genre in 2D or 3D, with a make-games skill and complete docs. First up: game systems, starting with pathfinding and enemy behavior.

What's changed

  • v0.97: Ludra Studio (#21)

Full changelog: v0.96.0...v0.97.0

v0.96.0: Shipping

Choose a tag to compare

@github-actions github-actions released this 05 Nov 21:49
e8e4ea2

A game that only runs in ludra dev hasn't reached anyone. This release takes it to where players are: one file for itch.io or any web host, played with a keyboard, a gamepad or a phone's screen, with review saying what would make it heavy or slow there.

npx @ludra/cli build
npx @ludra/cli review

ludra build

✓ Built Slime Valley: 1 scene, 2 scripts, 8 assets
  build/index.html  395 KB   one file: open it, or put it on any web host
  build/slime-valley-web.zip  100 KB   for itch.io: upload it as an HTML game

build/index.html is the whole game: engine, every scene, scripts, images, sounds, fonts and models. It plays from a double click (file://), any web host or an itch.io page.

  • No bundler. Ludra puts each module in the page as it is, type-stripped, and links them with an import map, so it stays free of dependencies.
  • Only what the game runs. An arcade game is a few hundred KB. Rapier (about 3 MB) and Three.js (about 2 MB) come only with games that use them, and only the Rapier a game uses.
  • Never a broken build. It refuses what ludra check refuses, scripts included, and says why.
  • A shipped game. The page fills its window and keeps the game's shape (pixel art scales by whole steps), backquote no longer opens the debug view, and nothing in the file names the machine that built it.
  • --out picks the folder, --json gives the same answer for a script.

Gamepads and touch

  • Gamepads play in the standard layout: the left stick or the d-pad moves, A jumps, the other face buttons are action, Start restarts and Back mutes.
  • Touch screens get buttons on the first touch, for the actions this game uses: what its player components need, and what its scripts read (input.held("action")). Movement sits under the left thumb, where a finger can slide round and press diagonals; jump and action under the right; sound and restart in a corner.
  • view.touch tells a draw hook the buttons are showing, so a game's own interface can say "tap" instead of naming keys. Every template's and example's HUD now drops "M sound · R restart" then, as the default HUD does.

Both work in ludra dev too, and go into recordings like keys: a session played with a gamepad or on a touch screen replays and becomes a test the same way. A build doesn't record.

ludra review asks if it will ship

A new Shipping area:

  • R_BIG_BUILD: the zip is over 10 MB (an idea) or 50 MB (an issue).
  • R_HUGE_IMAGE: an image over 4096 px on a side. An issue for a 3D texture, which many phones can't load; an idea for a 2D image.
  • R_HEAVY_ASSET (idea): one file over 8 MB, usually an uncompressed WAV.
  • R_HEAVY_MODEL: a 3D scene's models draw over 1M triangles (an idea) or 4M (an issue), counted once per entity showing one.
  • R_MANY_ENTITIES: over 2000 entities alive at once in the tests' runs (an idea), or 6000 (an issue).
  • R_SLOW_STEP (idea): a step takes over 3 ms on this machine.

What can fail --strict is counted, not timed, so a busy machine reviews a game the same as an idle one.

For engine users

  • startGame takes assetUrl (where each asset path loads from), loadScript, actions, touch: false and debugKey: false.
  • SoundPlayer takes a function from path to URL as well as a prefix.
  • The 3D renderer loads through a LoadingManager, so a .gltf's own .bin and textures are found wherever assets live.
  • actionsUsed is exported from @ludra/core.

Limits

  • Draco-compressed models don't load in a build (the decoder is a separate file), and Google fonts need the internet. Others use a fallback font offline.
  • Render hooks must name three addons with a literal, addon("postprocessing/RenderPass.js"), for the build to find them. It says when one doesn't.
  • Touch controls are checked in Chrome's phone emulation, with real and synthetic touches. They haven't been tried on a real iPhone or Android phone yet.

Upgrading

  • npm install @ludra/cli@^0.96.0.
  • build/ appears in a project once you build. New projects ignore it in git; add build/ to an existing project's .gitignore.
  • A draw hook's view has a new field, touch. Nothing to do, unless code of yours builds a view object by hand for a draw hook's type.
  • On a touch screen, buttons now cover the bottom corners of the page. Keep what players must see out of the bottom 150 px at the sides, or check view.touch and move it.

Next

  • v1.0: any genre in 2D or 3D, with a make-games skill and complete docs.

What's changed

  • v0.96: shipping: ludra build, gamepad and touch controls, review's Shipping area (#19)

Full changelog: v0.95.0...v0.96.0

v0.95.0: Humans in the loop

Choose a tag to compare

@ersingvn ersingvn released this 05 Nov 21:01
3190b55

A search can prove a level can be beaten, and a review can say it isn't broken. Neither knows it was boring. Only a person does, and until now what they felt was lost the moment they closed the page.

This release brings a player's session back to the agent:

  • every session in ludra dev is recorded;
  • the player marks how a moment feels, while playing;
  • ludra feedback adds up what players felt;
  • ludra replay shows any moment again, and turns a run into a test.
npx @ludra/cli dev
npx @ludra/cli feedback
npx @ludra/cli replay . --test

ludra dev records

Every session lands in recordings/<session>.rec.json. A session where no key was pressed leaves no file, and --no-record turns recording off.

While playing, a person presses 1 too hard, 2 boring, 3 confusing, 4 love this, or N for their own words. The game waits while they write.

ludra feedback

What every recording adds up to, scene by scene: marks, deaths with their cause and place, where players stopped, and crashes.

  • Moments within 64 px (4 m in 3D) of each other count as one place.
  • Each line comes with the command that shows it.
  • Those from an older version of the game are counted apart.

--json gives the same answer for a script.

ludra replay

Plays a recording again from its inputs and says what became of each take, one run of one scene. A folder means its newest recording.

  • same: it plays out as the player saw it.
  • changed: the game changed since, and so did this run. It says in which 5 seconds the run left the original.
  • diverged: the same game played differently, so determinism is broken.
  • gone: the scene no longer loads.

Anything but same exits 1.

--mark 1 with --take draws a contact sheet from 3 seconds before the mark to 1 second after, so an agent sees what the player saw when they pressed the key. --sheet, --screenshot and --debug work as in ludra play, on one take.

--test writes to tests/recordings.test.json: the takes that reached an end, or the last take if none did, or the one --take names.

  • A take asserts won, lost or moving on, its score and its deaths.
  • A take that wasn't finished also asserts where the player stopped, within 16 px (1 m in 3D).
  • A take that crashed stays red until the bug is fixed.

ludra review asks what players said

A new Players area reads the recordings of the game as it is now:

  • R_NO_PLAYTEST (idea): nobody has played it yet.
  • R_PLAYER_MARKS (idea): moments that bothered players.
  • R_PLAYER_LOVED (idea): moments to keep.
  • R_PLAYER_CRASH (issue, under proof): a player's run crashed.

Tests from recordings are a person's runs, not routes, so they don't count toward R_FRAME_PERFECT.

Smaller things

  • ludra play --from 3s starts a --sheet there instead of at the beginning.
  • carry and recording on a test case: what the run starts with from the scene before, and the session it came from.

Fixed

  • Tweens and 2D joints now give the same bits in every engine. sineInOut and the other eases, the 2D joint helpers and the speed of players and of the breakout ball used Math.cos, Math.sin, ** or Math.hypot, which engines may round differently. Chrome and Node really do: a run of Clockwork Keep, Moonlit Shrine or the 3D template split in the last bits. They now use dmath and plain arithmetic.
  • A test holds this in place. It moves the result of every such Math function by a hair and requires each game's every frame to stay the same, so a new call in the simulation fails at once.

Limits

A closing page's last request isn't sure to arrive, so a session can lose up to its last 2 seconds. Such a take counts as stopped and replays up to there.

Replay is checked between Node and Chromium: frame by frame on all 10 games and templates, in Chrome 156 and Edge 156 against Node 24 on Windows x64. Firefox and Safari haven't been tried: if a recording from one of them doesn't play the same, replay says diverged.

Upgrading

  • npm install @ludra/cli@^0.95.0.
  • v0.93 and v0.94 weren't published on their own, so this is the first npm release with ludra solve, ludra fuzz, ludra diff, play --sheet and game.md. Their notes are in v0.93.0 and v0.94.0.
  • Tweened motion can move by a last digit. Nothing to do unless a test of yours compares exact values from a tween.
  • ludra dev now records by default. A recordings/ folder appears in the project once someone plays. Use --no-record to turn it off.
  • review asks more of existing games. A game nobody has played gets the idea R_NO_PLAYTEST, and a recorded crash on the current version is an issue, so review --strict can start failing on it.

Next

  • v0.96, shipping: a single-file web build for itch.io, touch and gamepad controls, performance budgets.
  • v1.0: any genre in 2D or 3D, with a make-games skill and complete docs.

What's changed

  • v0.95: humans in the loop: recording in ludra dev, ludra feedback, ludra replay, review's Players area (#18)

Full changelog: v0.92.0...v0.95.0

v0.94.0: Sharper eyes and taste

Choose a tag to compare

@ersingvn ersingvn released this 05 Nov 21:01
ceaca5e

We built the same game twice, once with Ludra and once without. The Ludra game passed its checks, and the person who played both still found the other one more creative and more beautiful. Checks had caught what was broken and said nothing about what was dull.

This release makes an agent look harder at its own work, and decide what a game should look like before drawing any of it:

  • see a whole run at once;
  • see exactly what a change changed;
  • find what the player can't read;
  • write down a look, and be held to it.
npx @ludra/cli play . --sheet 0.5s
npx @ludra/cli diff before/ after/

ludra play --sheet

One PNG of the whole run: a frame every interval and the last, each with its time. An agent reads a run in one image instead of opening a screenshot at a time.

ludra diff

What changed between two screenshots, or two folders of them matched by file name.

ludra diff before.png after.png --out diffs --threshold 24

--json gives the same answer for a script.

ludra play --camera

For 3D scenes, draws the frames from somewhere other than the game's camera, with --screenshot or --sheet:

  • --camera map: the whole level from above.
  • --camera x,y,z@x,y,z: from a point, looking at a point.
  • --camera x,y,z@player: looking at an entity.

ludra review asks whether you can read it

A new Readable area draws moments along the winning route with and without the player, hazards, goal and collectibles, then measures each against what is behind it. R_LOW_CONTRAST names what blends in, the moment, and the contrast it measured.

The measure can differ a little by the order things are hidden in, so treat a number near the limit as a reason to look at the frame.

game.md: a look decided first

No tool can tell a good look from a dull one. So a game writes down what it means to be, before its first asset: a promise, a style, its type and its palette. Every template and example now has a game.md, and their guides ask for it before any art.

review then holds the game to what can be measured:

  • R_NO_DIRECTION, R_THIN_DIRECTION (issues): no game.md, or a part left undecided.
  • R_OFF_PALETTE (idea): art that has left the palette.
  • R_REPEATED_TILES (issue): one tile image filling thick blocks. It counts from the scene, because measuring repetition from frames failed on real games.
  • R_ALIKE_LEVELS (idea): levels whose frames share their colors.

A clean review now says what it means: the game isn't broken, not that it's good. It sends you back to the frames.

Tools for a tighter look

  • "pixelated": true on window draws at low resolution and shows it at a whole multiple, with hard pixels.
  • ctx.pixelText writes sharp 5×7 capitals with Turkish and Latin marks. Its locale option gets a language's capitals right (with "tr", i becomes İ and ı becomes I). A game using it no longer gets the system font idea.
  • "variants" on a tiled sprite or a tilemap legend entry mixes in more cells of the same size, so the grid doesn't show.

Fixed

  • A game plays on without WebGL. A finishing shader is optional, so a browser without WebGL now shows the game without it, with a console warning, instead of covering the game with an error. A shader that fails to compile is still an error.

Upgrading

  • npm install @ludra/cli@^0.94.0.
  • review asks more of existing games. A game without a game.md gets R_NO_DIRECTION, and big blocks of one tile get R_REPEATED_TILES, so review --strict can start failing on a game that passed before. Add a game.md, and "variants" on the tiles.

Next

  • v0.95, humans in the loop: record a person's session in ludra dev, let them mark moments, and turn any recording into a test.
  • v0.96, shipping: a single-file web build for itch.io, touch and gamepad controls, performance budgets.

What's changed

  • v0.94: sharper eyes and taste: play --sheet, ludra diff, play --camera, review's Readable area, game.md and the tools for a tighter look (#17)

Full changelog: v0.93.0...v0.94.0

v0.93.0: Proof at scale

Choose a tag to compare

@ersingvn ersingvn released this 05 Nov 21:01
7a34f9f

A test proves the route its author thought of. This release makes the engine search for the rest:

  • whether a level can be won at all;
  • how much room each jump leaves a person;
  • what a careless player can break.

The agent doesn't have to play a thousand runs itself. It reads one answer, with the inputs that reproduce it.

npx @ludra/cli solve
npx @ludra/cli fuzz

Saving and restoring a world

World.save() captures a moment and World.restore(save) brings it back, any number of times. The world then goes on bit for bit as it did the first time.

  • What it captures: deep copies of the entities (references between them point at the copies), events, counters, the previous input, the seed, and the physics engine's own state.
  • Arcade keeps everything on the entities.
  • Rapier 2D and 3D save with Rapier's own snapshot and find their bodies, colliders and joints again by handle.
  • Proof: a test hashes every frame of a run that was saved, sent on a different future and restored, against one that never stopped, on all three engines.
  • Cost: on Moonlit Shrine a save costs about 1.5 simulation steps and a restore about 1.8. That is what makes searching fast: thousands of tries start from a saved moment instead of frame 0.

ludra solve

Searches the inputs for a way to win. It remembers every distinct place the player reaches (with the score and every script's state, so a key taken counts as progress), and keeps exploring from the least-tried places nearest the goal.

$ ludra solve
✓ SOLVED: a win at 2.95s (frame 177)
  ludra play . --inputs "right:1.4s, right+jump:93f"

Timing
  jump    at 1.40s (frame 84)     window 6 frames (0.10s): 0 early, 5 late      tight

As a test (add it to a tests/*.test.json file's "tests" list)
  {"name":"the solver's route reaches the goal","inputs":"right:1.4s, right+jump:93f","assert":["won == true"]}

explored 122,381 frames, 410 cells, method save, 0.4s
  • The route is simplified to read like a person's, proven by replaying it on a fresh world, and printed as a test to paste.
  • Timing windows: each press is moved frame by frame until it no longer works. It is judged like a person would judge it: the same landing, the same pickups, no death. A press is labelled tight at 6 frames (0.1 s) or less, forgiving above 15.
  • When it can't win: "every reachable place was tried" means unsolvable as far as the search can tell. "Ran out of time" means try --time 2m. Either way it prints the closest place a player stood, as a ludra play … --screenshot end line.
  • Options: --goal "<assertion>" searches for any test assertion instead of a win (--goal "score >= 5"). There are also --allow-deaths, --time, --budget, --seed and --json.
  • Exit code: 1 when unsolved.

Seven levels with answers measured by hand first (packages/cli/test/fixtures/solve) check the solver:

Level Measured by hand ludra solve
easy-walk fastest win frame 147 right:147f, frame 147
one-jump jump window 20 frames solved, window 20 frames
narrow-window jump window 6 frames, from frame 84 solved, window 6 frames at frame 84, tight
impossible no win: the gap is 90 px past the longest jump unsolved, exhausted in 0.6 s
softlock jump window 28 frames solved, window 28 frames
needs-key key first; fastest win 3.58 s solved by going left for the key first, win at 3.95 s
3d-hop three jumps on Rapier 3D; a hand sweep found a 4.37 s win solved in 7 s, win at 5.27 s

Every answer is right. On needs-key and 3d-hop the route isn't the fastest one: the search refines a win for a while, but doesn't prove it optimal.

ludra fuzz

Plays hundreds of seeded random sessions, the way someone mashing keys would. It reports:

  • Crashes: script errors, one per script, hook and cause, with the inputs that cause them.
  • Softlocks: places a player can get into but never win from, and where nothing kills them. Each new place the player stands on is checked with a quick search from a save of that moment.
  • Where players die: by cause, with the places it happens most (a difficulty map, not a bug list).
$ ludra fuzz
Played 200 random sessions: 711,902 frames in 2.1s, 397 distinct places, 4 lucky wins.

✗ SOFTLOCK at (386, 702): the player can get here (after 5.38s) but can never win from here, and doesn't die.
  ludra play . --inputs "jump:33f, left+jump:10f, jump:23f, left:46f, wait:14f, right:7f, left:28f, right:8f, wait:14f, jump:25f, right:8f, jump:0.3s, right+jump:53f, right:0.4s, wait:0.2s" --screenshot end
  fix: give the player a way out (a ladder, a spring, a ledge low enough to jump) or make falling there cost a life (a hazard or world.fallLimit).
  • It first checks that the level can be won at all. If it can't, it says so (and exits 1) instead of calling every place a trap.
  • Every finding comes with ludra play --inputs that reproduce it from frame 0.
  • It exits 1 on crashes, softlocks or an unwinnable level. Deaths alone don't fail it.

ludra review asks whether it's fair

A new Fair area:

  • R_FRAME_PERFECT (issue): a press in the winning test's route that only works on one or two exact frames.
  • R_TIGHT_TIMING (idea): a press that only works within 0.1 s. Fine for a hard moment, unfair early on.
  • R_SOFTLOCK (issue) and R_CRASH (issue, under Proof): from a few seconds of random play per scene.
  • review --fast skips the random play.

Every template and Moonlit Shrine review without issues under the new checks.

Prove, in the skill's loop

The Claude Code skill's loop gains a step between Test and Review: run solve to prove the level can be beaten (and paste its route as a test), and fuzz to find crashes and softlocks. Fix every crash and softlock, and treat an unsolved level as a bug unless the user asked for one.

Upgrading

  • npm install @ludra/cli@^0.93.0. Games simulate exactly as before: the Rapier 2D and 3D golden hashes are unchanged, and every test from v0.92 passes untouched.
  • Physics engines from outside Ludra keep working. Without save/restore, solve falls back to replaying inputs from frame 0, and fuzz skips the softlock checks.

Next

  • v0.94, sharper eyes and taste: contact sheets, visual diffs between versions, a debug camera and map in 3D, readability checks, and a game.md of design intent that review measures the game against.
  • v0.95, humans in the loop: record a person's session in ludra dev, let them mark moments, and turn any recording into a test.
  • v0.96, shipping: a single-file web build for itch.io, touch and gamepad controls, performance budgets.

What's changed

  • v0.93: proof at scale: World.save/restore, ludra solve, ludra fuzz, review's Fair area, and Prove in the skill (#16)

Full changelog: v0.92.0...v0.93.0

v0.92.0: 3D content

Choose a tag to compare

@github-actions github-actions released this 28 Oct 21:39
afcbb0a

Ludra games can use any 3D model now: made in code, generated, or downloaded from a free pack. Skinned characters animate on the simulation clock, colliders can take any shape, and every asset can be read as text before it is used. It still runs through the same loop: check, play, test, review and real screenshots.

npx @ludra/cli inspect assets/knight.glb

The idea, written down

README's "The idea" now lists the principles every feature is held to:

  1. Raw power, thin layer. Three.js, Rapier, Web Audio, GLSL and Canvas are fully open to scripts.
  2. Starting points are source, not boxes. Templates, blocks and examples are files to rewrite, not presets.
  3. Eyes. Anything a human would check by looking, an agent can check from text or a real frame.
  4. Proof. The engine, not the agent, does the searching.
  5. Taste. review judges feel, not only completeness.
  6. Agent-shaped interface. Plain JSON, short outputs, --json everywhere, and every error with a fix.
  7. Any asset, readable. The engine describes models, images and sounds to the agent, so it never uses one blind.

This release delivers the last one. The roadmap below follows from the others.

glTF models

mesh.model draws any .glb or .gltf, with its own materials, skins and textures. Draco and meshopt compressed files load too.

{ "id": "knight", "components": {
  "transform": { "x": 0, "y": 0.9, "z": 0 },
  "body": { "type": "dynamic", "shape": "capsule", "width": 0.6, "height": 1.8 },
  "character": {},
  "mesh": { "model": "assets/knight.glb", "turn": { "y": 180 },
            "animations": { "idle": "Idle", "run": "Run", "jump": "Jump", "fall": "Fall" } }
} }
  • fit sizes it to the entity:
    • "height" (the default) scales it evenly to the body's height, centres it and stands its lowest point on the bottom of the body;
    • "box" stretches it to width, height and depth;
    • "none" keeps its own metres.
  • turn fixes its facing: most glTF characters face +z and Ludra's face -z, so { "y": 180 }.
  • scale and offset adjust it after fitting.
  • A file that fails to load falls back to the mesh's shape, with one warning.

Skeletal animation, deterministic

  • Clips follow how the entity moves. animations maps the states idle, walk, run, jump and fall to clip names:
    • walk below 60% of character.speed, run above it;
    • jump while rising, played once and held;
    • fall on the way down.
      Any state can be left out.
  • Other clip sources:
    • animation plays one clip forever (a windmill).
    • A script's self.state.animation = "Wave" overrides both.
    • fade crossfades between clips, and animationSpeed scales them.
  • On the simulation clock. The renderer records which clip each entity plays once per simulation step. The pose is then a pure function of simulation time, so a screenshot of a frame shows exactly what live play shows.
  • Full control. A render hook's ctx.model is { root, clips, mixer }: find bones and materials, attach a sword to a hand, drive a clip yourself.

ludra inspect: any asset as text

assets/knight.glb  glTF binary, 412.3 KB, made by Blender
  size        0.92 × 1.84 × 0.41 m (x × y × z)
  bounds      min (-0.46, 0.00, -0.20)  max (0.46, 1.84, 0.21)
  geometry    3 meshes, 5 primitives, 6120 vertices, 9874 triangles
  materials   Armor, Skin, Cloth
  textures    3 (3 images, 3 embedded)
  skins       Armature: 24 bones
  animations
    Idle                     2.00s 72 channels
    Run                      0.80s 72 channels

hint: Use it with "mesh": { "model": "assets/knight.glb", "animations": { "idle": "Idle", "run": "Run" } }
  • Models: size in metres (node transforms applied), triangles, materials, textures, bones, every clip with its length, required extensions and external files. Its hints:
    • a ready "mesh" line with clips matched to idle/walk/run/jump/fall;
    • models exported in centimetres;
    • extensions that need decoding;
    • missing files.
  • Images: width and height of PNG, JPEG, GIF, WebP and SVG, read from the header.
  • Sounds: WAV duration, channels and sample rate; other audio by size.
  • --json gives the raw object. The glTF reader has no dependencies.

ludra check reads models

  • E_MODEL_INVALID: the file isn't a readable glTF 2.0 model.
  • E_MODEL_FILE_MISSING: a .gltf's .bin or textures aren't next to it.
  • E_MODEL_ANIMATION: a clip name the model doesn't have, with "did you mean" and the model's real clips.
  • W_MODEL_EXTENSION: a required extension the renderer can't load, such as KTX2 textures.
  • E_INVALID_MODEL: mesh.model isn't a .glb or .gltf.
  • E_ANIMATION_STATE: an animations key that isn't a movement state.
  • E_MESH_DYNAMIC: a mesh collider on a dynamic body.
  • E_MODEL_COLLIDER: a collider that can't be built from its model.

A missing model file is E_ASSET_MISSING, as for images and sounds. Problems in a prefab's model are reported once, on the prefab.

Colliders of any shape

  • "shape": "mesh" collides with exact triangles: points [[x, y, z], ...] plus triangles [[a, b, c], ...].
    • It is static or kinematic, for terrain, caves and level geometry.
    • Procedural terrain is just numbers: generate a heightmap grid in the scene or a script, and draw the same data in a render hook.
  • From a model. "body": { "shape": "mesh", "model": "" } collides with the entity's own model, and "convex" takes the hull around it, for dynamic props. Point body.model at a simpler file to collide with fewer triangles than you draw.
    • The CLI reads the geometry while it loads the scene, fits it exactly like the drawn model, and writes plain points and triangles into the scene.
    • Headless tests and the browser get identical numbers, so physics stays deterministic.

Moonlit Shrine

examples/moonlit-shrine is a second 3D game. On a night lake, a hooded wanderer carries a lantern along floating stones toward a moon gate, gathering six shards of the moon. On the way:

  • stepping stones;
  • two pillars that rise and sink out of step;
  • a torii that keeps a spirit lantern (the checkpoint);
  • a stompable wisp guarding the bridge;
  • a spirit spring that throws the wanderer up to the sanctum.

Everything is drawn in code: the water shader, the stars, the bloom chain, the paper lanterns. It has twelve tests, one per mechanic plus the pillars' timing window and the full route, and a clean review --strict.

Upgrading

  • npm install @ludra/cli@^0.92.0. Games simulate exactly as before: the 2D and 3D golden hashes are unchanged.
  • Every new field has a default, so existing scenes need no changes.

Next

The roadmap now follows the principles:

  • v0.93, proof at scale: ludra solve searches inputs for a way to win (is the level beatable, the shortest route, how wide each timing window is). ludra fuzz runs thousands of random sessions to find softlocks, falls through the floor and crashes.
  • v0.94, sharper eyes and taste: contact sheets, visual diffs between versions, a debug camera and map in 3D, readability checks, and a game.md of design intent that review measures the game against.
  • v0.95, humans in the loop: record a person's session in ludra dev, let them mark moments, and turn any recording into a test.
  • v0.96, shipping: a single-file web build for itch.io, touch and gamepad controls, performance budgets.

What's changed

  • v0.92: 3D content: glTF models, deterministic skeletal animation, mesh and convex colliders from models, ludra inspect, and Moonlit Shrine (#15)

Full changelog: v0.91.0...v0.92.0

v0.91.0: 3D

Choose a tag to compare

@github-actions github-actions released this 25 Oct 18:23
f6a38a2

Ludra makes 3D games now, through the same loop as 2D: JSON scenes, check, play, test, review and real screenshots. As in 2D, the AI gets the real tools instead of a ceiling: Three.js for looks and Rapier 3D for physics.

npx @ludra/cli new my-game --template 3d

Sky Islands

3D worlds

"world": { "dimensions": 3 } makes a scene 3D: metres, +y up, +z toward the camera, gravity 9.81 m/s².

  • Transforms get z and a rotation per axis.
  • Bodies get depth and 3D shapes: sphere, capsule, cylinder, convex hulls.
  • Tests, play --watch and scripts carry the third dimension.
  • Validation keeps 2D and 3D apart, with a fix for each mistake.

Rapier 3D

Every 3D scene runs on Rapier 3D's deterministic build, loaded only by 3D scenes.

  • Joints: hinges around any axis (with limits and motors), sliders, welds, ropes, springs and ball joints.
  • Rules: sensors, collectibles, hazards, stomps, checkpoints, goals and falling out of the world all work in 3D.
  • character, the 3D player:
    • walks on the ground plane and faces where it walks;
    • jumps with coyote time, buffering and variable height;
    • climbs slopes and steps, pushes crates and rides moving platforms.
  • Determinism: a golden hash pins the 3D simulation on Linux, Windows and macOS × Node 22 and 24.
    • macOS ARM computed Math.atan2 a last digit differently, so 3D rotations now use core's new dmath: trigonometry from IEEE-exact operations that gives the same bits everywhere.

@ludra/three, the renderer

A new package draws 3D scenes with Three.js, loaded only by 3D scenes.

  • mesh: primitives or the body's own shape, physically based materials, tiling textures and shadows.
  • light: a sun with soft shadows that follow the camera, sky fill, point, spot and ambient lights.
  • camera3d: follow, orbit, first-person and fixed.
  • Scene environment: a sky gradient, fog and tone mapping.

The 3D frame is drawn under the game's 2D layer, so drawUI HUDs, postfx shaders and screenshots work unchanged. --debug shows collider wireframes.

No ceiling: the render hook

A script's render(ctx) hook gets the real three.js every frame: the module, the scene, the camera, the renderer, and a group that moves with the entity.

  • Custom geometry and shaders, instancing and particles.
  • ctx.addon() loads any three.js addon, and ctx.setRender() takes over the frame, so a bloom or depth-of-field chain is a few lines.
  • Like draw hooks it can't change the game, and ludra check runs it against stand-ins.

Game logic in 3D gets:

  • vector impulses and forces (struck off-center, a body spins), spin, rotationX/rotationY and 3D raycasts;
  • tweens along z and around x and y;
  • the raw Rapier 3D API.

Sky Islands

--template 3d is a 3D platformer:

  • Hop between floating islands above a sea of clouds and collect five crystals.
  • Light the beacon, ride the raft across the widest gap, dodge (or stomp) the storm puff, and step through the portal.

Its hero, clouds, beacon and portal are render hooks. It has its own sounds and music, ten tests, and a clean review --strict.

ludra review knows 3D: it asks for the game's own lights, sky and materials, and points out solid bodies nobody can see.

Fixed on the way

  • Patrols could stop at their far end when the end position was a rounding error short.
  • Characters could get stuck on kinematic platforms after sinking a hair into the controller's gap on landing.

Upgrading

  • npm install @ludra/cli@^0.91.0. 2D games simulate exactly as before: every test of every example and template hashes frame for frame the same as v0.9.0.
  • @ludra/three is new; the CLI depends on it and loads it only for 3D scenes.

Next

v0.92 brings 3D content: glTF/GLB models (free model packs from the web), skeletal animation, and procedural geometry and terrain.

What's changed

  • v0.91: 3D foundations: Rapier 3D, a Three.js renderer, the 3D script API and render hook, and Sky Islands (#14)

Full changelog: v0.9.0...v0.91.0

v0.9.0: real physics, a game's own sound, and bigger worlds

Choose a tag to compare

@github-actions github-actions released this 25 Oct 12:07
1b221bc

The AI is the artist, and Ludra keeps taking ceilings away. This release adds a real physics engine, sound and music with no limits, and the tools for bigger worlds. Quality still comes from guidance and verification: everything new is deterministic, testable, and checked by ludra review.

npx @ludra/cli new my-game --template physics
npx @ludra/cli components sounds

Real physics: @ludra/physics

Set "world": { "physics": "rapier" } and a scene runs on Rapier. Arcade physics stays the default and is unchanged, frame for frame.

  • Bodies rotate, roll and tip over.
    • Shapes: circle, capsule, polygon and polyline.
    • friction, density, fixedRotation and bullet (continuous collision).
  • Joints: revolute (hinges), prismatic (sliders), fixed, rope and spring, with limits and motors. A body can have a list of joints, which bridges, ragdolls and vehicles need.
  • Players use Rapier's character controller:
    • slope limits (maxSlope) and stairs (stepHeight);
    • pushing crates (push), riding moving platforms, and coyote time.
  • Scripts get forces and rays:
    • self.applyImpulse, self.applyForce, self.mass, self.rotation, self.angularVelocity;
    • world.raycast(from, to);
    • world.physics.raw, the whole Rapier API, for anything the components don't cover.
  • Deterministic everywhere. A golden hash test proves that 6 CI machines (Linux, Windows, macOS × Node 22 and 24) simulate exactly the same frames. The browser runs the same WebAssembly, so tests stay valid.
  • See it: rotated sprites and round shapes are drawn as they are. play --screenshot --debug, or the backquote key in the browser, shows colliders, joints, velocities and ids.

New template: Crate & Chasm

npx @ludra/cli new my-game --template physics:

  • Push a crate to the foot of a cliff and climb it.
  • Cross a rope bridge of jointed planks.
  • Time your run under a swinging spiked pendulum.

Its tests cover each piece and a full route without dying.

Sound and music, without limits

Seven stock beeps are no longer the palette.

  • "sounds": a scene designs its own sounds from tone and noise layers. vary changes the pitch on every play, so repeats never sound copied. Effects and scripts use them by name.
  • "music": tracks of notes that loop. Chords, rests, holds, and noise drums (kicks, hats), or an audio file. The same music carries on across scenes; different music crossfades.
  • The sound hook gives scripts the real Web Audio API, the way draw hooks get the real canvas. Crate & Chasm's wind grows as you climb, the pendulum hisses as fast as it swings, the crate scrapes and the bridge creaks.
  • Mixing: a master compressor; mute and restart are handled.
  • Checks: ludra review flags games that only use presets (R_STOCK_SOUNDS) or have no music (R_NO_MUSIC).
  • Templates: every template now has its own sounds and music.

Run ludra components sounds for every field and an example of each.

Bigger worlds

  • tilemap: draw a level as rows of characters.
    • Tiles merge into big colliders, and letters place prefabs.
    • Each cell becomes an ordinary entity (map-3-7), so tests and scripts can use it.
    • check names a character missing from the legend by row and column.
  • cameraZone: rooms the view stays inside, fixed shots and zooms, eased over blend seconds. Zones show as violet frames in --debug.
  • tween: ease x, y, rotation, scale or opacity.
    • 9 curves, and once, loop or pingpong with a delay before every pass.
    • "on": "<event>" starts a tween when that event fires; scripts call self.tween().
    • Tweens run in the simulation, so tests see them, and tweened platforms carry the player.
  • Sprites gain scale and opacity.

New example: Clockwork Keep

examples/clockwork-keep is a two-floor castle that uses all three:

  • The whole level is a tilemap.
  • Each floor is a camera room, and the finish eases out to show the whole keep.
  • A lift rests at each floor, a gate rises when you light the lantern, a platform glides over spikes, and coins bob.

Upgrading

  • Projects: npm install @ludra/cli@^0.9.0. Nothing breaks. Arcade games simulate exactly as before; ludra review now also asks for the game's own sounds and music.
  • @ludra/physics is a new package that @ludra/cli depends on. The CLI loads it on its own when a scene says "physics": "rapier".

What's changed

  • v0.9: Rapier physics, a game's own sound and music, tilemaps, camera zones and tweens (#13)

Full changelog: v0.8.0...v0.9.0

v0.8.0: ludra review, lives, checkpoints, prefabs and levels

Choose a tag to compare

@github-actions github-actions released this 25 Oct 06:39
6a95e40

Ludra's promise, made explicit: no ceiling on creativity, no slop. This release adds the tool that tells an agent when a game is finished rather than just working, and the structure real games need: lives, checkpoints, reusable prefabs and several levels.

npx @ludra/cli new my-game        # now two levels
npx @ludra/cli review my-game

ludra review

check asks whether a game is valid and test asks whether it works. review asks whether it would pass as finished. It runs every test, reads the scenes and scripts, and flags the signs of slop:

Proof: is it shown to work?
  ✗ scripts/chase.ts (on chaser) has no test that checks what it does.
Feel: does every moment answer the player?
  ✗ These events happen in play but nothing answers them: collect, die.
Looks: does it have a style of its own?
  ✗ It uses the engine's default HUD and end screens.
  ✗ Behind the game there is only a flat background color.
  ○ No post-processing.
  • Areas: proof (a win without deaths, every mechanic tested), feel (no silent events), looks (no default HUD, flat backdrop or plain shapes) and identity (a real name).
  • Every finding comes with a fix. Issues (✗) mean the game isn't done; ideas (○) are worth considering.
  • --strict exits 1 on issues. CI runs it on every template, and the skill treats issues like failing tests.

Game structure

  • Lives: "world": { "lives": 3 }. The last death ends the game (lost, a gameover event). Scripts can read and write world.lives and call world.lose().
  • Checkpoints: the checkpoint component moves the player's respawn point to it.
  • Prefabs: prefabs/slime.prefab.json, shared by every scene. Entities use "prefab": "slime" and list only what differs; world.spawn({ prefab }) works too.
  • Multiple scenes: a goal's next or world.goto() from a script (title screens, doors) moves on to another scene, carrying score, deaths and lives.
    • check validates every scene.
    • Tests can pick a scene with "scene".
    • play takes --scene.

Templates

  • The platformer is now two levels, Night Meadow and Moonlit Cliffs, built from coin and slime prefabs:
    • 3 lives and a lantern checkpoint that lights up.
    • Its own HUD with hearts, points, a title card and end screens.
    • A parallax night sky and a glow shader.
    • Fairness checked: every timing window was swept.
  • Neon Breakout gets 3 balls and a game-over screen.
  • All three templates review clean.

Also

  • Built-in events carry their details in draw hooks, and scripts can read world.exit.
  • play describes checkpoint, game over and scene changes.
  • The README has the vision and a roadmap to 1.0, including 3D (v0.10–v0.11).
  • Each tagged release now creates its GitHub release automatically, from docs/releases/<tag>.md when it exists.

What's changed

  • v0.8: ludra review, lives, checkpoints, prefabs and multiple scenes (#12)

Full changelog: v0.7.0...v0.8.0

v0.7.0: blocks, genres and art without limits

Choose a tag to compare

@ersingvn ersingvn released this 25 Oct 06:11
8aef3cf

Two versions in one release: v0.6 (a block library and a design guide) and v0.7 (new genres, bounce physics, and art without limits). v0.6 was never published on its own.

npx @ludra/cli new my-game --template breakout   # or platformer, topdown
Neon Breakout Crystal Grove
Neon Breakout Crystal Grove

Art without limits (v0.7)

No preset menu: the agent gets the whole canvas.

  • draw / drawUI script hooks receive the real Canvas 2D context: gradients, glow, additive light, text, filters.
    • drawUI replaces the default HUD and win screen.
    • Helpers on ctx: time, local, view, recent(event), image, burst, shake, random.
  • Scene fonts: Google Fonts or font files.
  • Scene postfx: a GLSL fragment shader over every frame, with custom uniforms. Headless screenshots render it too.
  • Draw hooks are read-only: changing the game from one throws, so the browser can never drift from what tests verified.
  • ludra check runs draw hooks against a mock canvas (E_DRAW_HOOK).

Genres (v0.7)

  • topdown component: movement seen from above in 8 directions, 4 directions, or a single axis (paddles).
  • body.bounce: balls that rebound, with a bounce event.
  • Paddles: player-steered kinematic bodies stop at walls.
  • Two new templates, each with tests proving it can be won without dying:
    • Neon Breakout: synthwave, drawn entirely in code. Its winning route came from an autopilot, a technique the skill now teaches.
    • Crystal Grove: a moonlit top-down grove lit by code over SVG sprites.
  • The skill now covers every genre.

Blocks and taste (v0.6)

  • ludra blocks / ludra add <block> --at x,y: 11 tested gameplay blocks with scripts, art and effects:
    • jump-pad, key-and-door, chasing-enemy, patrol-enemy, moving-platform, spikes
    • coin-row, turret, falling-platform, teleporter, time-limit
  • Several copies get unique, linked ids, and files you changed are never overwritten.
  • Each block ships a demo level whose tests run in CI.
  • DESIGN.md in the skill, a design guide covering:
    • level design: teach, test, twist
    • fairness you can prove: timing windows of at least 0.2 s
    • game feel, palettes and SVG art direction
    • a "Paint with code" guide and a finishing checklist

Tooling

  • Scripts can read world.won and world.deaths.
  • npm run check:scripts type-checks every shipped game script.
  • CI tests every template and installs each one from the packed packages.

Published: @ludra/core@0.7.0 and @ludra/cli@0.7.0.

What's changed

  • v0.6: block library (ludra add) and a design guide (#10)
  • v0.7: genres, bounce physics and art without limits (#11)

Full changelog: v0.5.0...v0.7.0