# Crate Courier: A 3D Warehouse Crate-Pushing Puzzle

> Walk a courier round a small 3D warehouse and push crates onto glowing delivery pads, in one offline HTML file: ten solvable levels from a one-crate tutorial to five-crate rooms, unlimited undo, restart, move and push counters, keyboard and swipe controls. Models, textures and sounds are all generated in code.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.2
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/crate-courier

## What you get

Bring a setting, its crates and the courier, and optionally new levels, rules and sounds. The Skill returns a downloadable Skill (the reference puzzle project, a customize guide, a level solver, headless verification) and one playable example warehouse.

## Install

Download the Skill package from https://www.sandbase.ai/skills/games/crate-courier (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/crate-courier make a crate-pushing puzzle set in <your setting>, with <your crates and courier> and <your levels>
```

## How it works

1. **Copy the warehouse puzzle** Crate Courier starts with node scripts/new-project.mjs --out my-dock, which copies the project without build products. Your coding agent reads references/customize.md, which maps the look, levels, numbers, text, sound and new tiles to files and symbols. A prompt names your setting, your crates and courier, and your levels, for example a snowy dock with ice blocks and a penguin courier.
2. **Edit levels, look and rules** Levels are text maps in LEVELS in src/levels.js, the look is src/theme.js and src/textures.js, and rules are src/logic.js. Crates must equal pads in number, or parseLevel rejects the map. After a level change, run the breadth-first solver and paste its solution into par. Models, textures and sound are drawn in code, and the build calls no model.
3. **Build and replay the solutions** npm ci and npm run build:single write dist-single/index.html, one offline file of about 0.6 MiB. npm run shoot needs local Chrome and checks the build in a sandboxed frame, writing shots/report.json with screenshots: a push, a wall, undo, restart, solving level 3 with the solver, the win panel, level change and a phone swipe. Every level's par must still replay.

## FAQ

### How do you play Crate Courier?

Crate Courier is a grid push-puzzle in a small three.js warehouse. The courier walks one cell at a time and pushes crates onto glowing delivery pads, and a level clears when every pad holds a crate. The ten levels run from a one-crate tutorial to five-crate rooms, with unlimited undo, restart, and move and push counters.

### Can I add my own Crate Courier levels?

Yes. Crate Courier takes new levels appended to LEVELS in src/levels.js. Find a solution with the built-in solver and paste it into par, and the tests replay it. Keep custom levels compact, because a large open level with six or more crates can take minutes or make solve() return null; you can then write par by hand.

### Can the Crate Courier courier pull crates?

No. Crate Courier's shipped rules only allow pushing. The move rule lives in tryMove() in src/logic.js, and adding a pull rule means changing undo as well.

### Does Crate Courier need a key or a server?

No. Crate Courier calls no model and makes no network calls, so playing is free. It is not suited to multiplayer or online level sharing, because the build runs under a no-network sandbox. Any asset you add must be your own or clearly licensed and listed in assets/crate-courier/CREDITS.json.

### What are the Crate Courier keyboard and touch controls?

Crate Courier moves with the arrow keys or WASD, undoes with Z or Backspace, restarts with R and changes level with N and P. On a phone you swipe on the warehouse, and buttons in a bottom dock cover undo, restart and level change. Restart acts at once because confirm dialogs are dropped in a sandboxed frame.

### Why is Crate Courier slow on my machine?

Crate Courier's shoot check falls back to SwiftShader without a GPU, which slows start-up and frame rate, and the cover check can time out. The puzzle itself is small, but rendering still goes through three.js and WebGL.

## Examples

- Crate Courier 3D warehouse puzzle (scene)
- Warehouse (video)
