Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Rule Stack: Chain Colour Rules to Rebuild a Cube Wall

Turn a wall of isometric cubes into the goal shape by chaining rules, in one offline HTML file: paint one colour into another, cap stacks, sort, fuse pairs, tuck cubes in, flip the wall. Every rule in the pipeline draws its own wall on the board, so you see where a program goes wrong. Drag to reorder, reset to start over; 18 levels in three chapters, each with a stored solution the tests replay.

示例

Rule Stack cube-pipeline puzzle
在新标签页中打开

Rule Stack cube-pipeline puzzle

该示例在沙盒化的框架中运行,无法访问此页面。

在线运行

在 SandBase sandbox 中运行,并在 Lab 中查看结果。

在 Lab 中打开 ↗

你将获得什么

Bring the pieces and the colours, and optionally new rules, new levels or chapters, the board layout and the text. The Skill returns a downloadable Skill (the puzzle project, a customize guide, headless verification) and one playable example run.

工作原理

  1. 01

    Copy the finished puzzle project

    Rule Stack hands your agent a complete game: run node scripts/new-project.mjs --out my-rules, then npm ci inside it. The project holds the rule engine in src/rules.js, 18 authored levels in src/levels.js, the isometric renderer in src/iso.js and src/board.js, pipeline UI in src/ui.js and main.js, and a window.__scene test API. It calls no model.

  2. 02

    Customize rules, levels or look

    references/customize.md lists each common request with the files and symbols to change. Colours and backdrop are usually one value in src/theme.js. A new level is an L(...) entry in src/levels.js with a stored solution, which must replay through runPipeline and solved before shipping. Rules such as paint, cap and sort are pure functions over a wall.

  3. 03

    Build single file and shoot

    npm run build:single writes dist-single/index.html, which opens with a double-click and must stay under 8 MiB with no network, storage, workers, dialogs or pointer lock. npm run shoot plays it in local Chrome, adding, reordering and removing rules, resetting, solving early and late levels and a phone game, and writes shots/report.json plus screenshots to check.

常见问题

What kind of game is Rule Stack?

Rule Stack is a calm puzzle where you chain colour rules to rebuild an isometric wall of cubes into a goal shape. Each rule in the Pipeline draws its own intermediate wall on the board, so you watch the transform step by step. Matching the goal shows Solved with a Next level button, across 18 levels in three chapters.

Does Rule Stack call a model or need a key?

No. Rule Stack is a finished game plus a customize guide, and nothing in it calls a model or a paid service. npm ci pulls pinned Vite and playwright-core from the public npm registry, and the built page makes no network calls, so playing or modifying it carries no SandBase charge.

Does Rule Stack have hints or a solver?

No. Rule Stack stores a solution with every level so the tests can replay it, but the game never shows it. A stored solution proves a level can be beaten, not that it is the shortest. To check par, the repository's solve.mjs re-derives a minimal solution, and you can copy it into your project.

Can I undo a move in Rule Stack?

No. Rule Stack has no undo, and any sequence the chapter library allows can be built, even one that makes the level unsolvable from the current wall. Press R or Reset to return to the starting wall. Drag pipeline chips to reorder them, or drag one out or click it to remove it.

How big is a Rule Stack build and where does it run?

Rule Stack's game and styles come to about 30 KiB in one HTML file, against an 8 MiB limit. It opens from disk, hosts anywhere and runs in a sandboxed iframe. Inside a sandbox there is no storage, so solved marks and best step counts reset on reload.

Does Rule Stack work with touch?

Yes. Rule Stack accepts mouse and one-finger touch: tap a rule to add it and drag pipeline chips to reorder or remove them. Phone play was verified under headless touch emulation, not on real devices.

Lab Skill · Games

Seagull Swoop

Build a 3D flight-and-delivery game with light fries, heavy fish, crosswinds and optional ring routes. The gull must bring lunch home; cargo weight changes which openings it can safely reach.

Lab Skill · Games

Wedding Cake Wobble

Build a 3D fragile-cargo delivery game around a wobbling wedding cake. Brake before turns, avoid crossing guests and steer around tables. Lost tiers change the score, while a partial delivery can still succeed.

Lab Skill · Games

Hermit Tide

Build a 3D route-and-timing game where a hermit crab changes shells to cross a tidal shore. Narrow gaps favour the cap, stronger shells resist waves, and dry stones provide shelter and checkpoints.

Lab Skill · Games

Clover Circuit: Estate Cut

Drive a coral ride-on mower through a fenced estate garden. Steering, braking and the moving blade cut actual grass tufts; Overview reveals the genuine trail. Edit three gardens and three scene palettes offline. Coverage counts trimmed tuft centers rather than continuous ground area.

Lab Skill · Games

Glide Gates: Lagoon Run

Flap a golden bird through emerald pipe pairs above a turquoise lagoon. Actual fixed-step gravity, swept circle contacts and full-gate scoring power both manual flight and clearly labeled practice. Edit three courses and three scene palettes offline.

Lab Skill · Games

3D Interactive Garden Islands

Walk a curved garden, harvest fruit, share gifts, catch butterflies, fish, grow flowers and craft furniture. Four lighting states and one offline HTML with bilingual keyboard and touch controls.