# Claw Catch 3D: A Physics Claw-Machine Collecting Game

> Name a prize theme and your Agent builds a 3D claw-machine collecting game in one offline HTML file, with one generated image and image-to-3D model per prize. In the main example, ten dessert keychain charms sit in a pastel cabinet; the claw moves, drops, closes and carries each prize on real Rapier convex-hull physics, and a coin budget, rarity tiers and an album turn catches into a collection. The prizes, cards, music and effects are generated through SandBase; the machine and physics are code.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.0
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/claw-catch-3d

## What you get

Bring a prize theme and, optionally, the prize count; the Agent writes the prize list, rarities, cards and cabinet. The Skill returns a downloadable Skill (the game project, a greybox prototype mode, a cost-reserving SandBase model-job helper, an offline build and a scripted play-through) and two playable examples with their prepared media.

## Install

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

```text
/claw-catch-3d build a 3D claw-machine game full of <your prize theme>, in a <your mood> mood
```

## How it works

1. **Name the prizes** Tell your Agent the theme and how many kinds of prizes to make, for example: ten dessert keychain charms — six common, three rare, one secret tier cake. On your machine with Node 22.14.0, the Agent runs node scripts/new-project.mjs my-game and npm ci, then writes src/game.json: prizes with rarity tiers, the coin budget, sparks that refund coins, three rounds with loosening grip, the restock rule and the generated album copy.
2. **Catch greybox boxes, then generate the charms** Run ALLOW_PLACEHOLDERS=1 npm run build and npm run shoot first: tune coins, rounds and grip so a human can win in about three minutes and the autopilot session fits the time budget. The Agent then checks SandBase for compatible endpoints and prices and generates per prize one image and one image-to-3D call, plus album cards, a music loop and one call per sound effect; every submission is reserved before it is sent and billed to your account.
3. **Win a prize yourself** npm run build inlines three.js, the Rapier physics wasm, every GLB and the audio into dist/index.html under connect-src none. npm run shoot moves, drops, makes a real catch, opens and closes the album and plays a full session. Then catch one yourself: a well-centred grab should carry to the chute, and a sloppy grab should slip.

## FAQ

### Is the grab random like a real arcade machine?

No. Claw Catch 3D decides a grab from measured geometry when the prongs close — wrap depth and offset from the prize centre — and a held prize slips only when weight, grab offset and cable swing exceed a fading grip. The physics is a tuned game model on Rapier, not an arcade-accurate simulation: prongs are kinematic and concave prizes collide as their convex hull.

### What does the coin budget do?

Coins are a per-session budget, 16 in the example. Every catch spends nothing extra; duplicates convert to sparks, and every sparksPerCoin sparks refund one coin. Rounds change the stock and loosen the grip, and the machine restocks between rounds or when stock runs low, favouring prize kinds you have not collected yet.

### How is the secret prize unlocked?

Collecting every non-secret kind unlocks the secret prize, which then joins the next restock between rounds. The album shows the rarity tiers, your duplicates, the generated names and blurbs of what you have won, locked silhouettes for the kinds still missing, and a completion reward once the secret lands.

### Which SandBase models does Claw Catch 3D use?

Per prize, one image call and one image-to-3D call through SandBase, plus one LLM call for every album card, one music loop and one call per sound effect. All generation bills your SandBase account, and each submission is reserved in the project before it is sent so a new theme cannot double-pay. At runtime the built file calls nothing.

### Is the game in English only?

Yes, the machine UI and album text are in English; this page is in English and Chinese. The example build is one offline file of about 5.1 MiB — it inlines the Rapier wasm and every prize model — needs WebGL 2 and makes no network request.

### Why is the demo sandboxed?

The frame has an opaque origin and no network access, so the scene can’t read anything from this page or reach the internet.

### Can I play Claw Catch 3D on a phone?

Yes, a touch stick moves the claw and a single action button drops, grabs early and releases in place of the Space key, while the album opens from its on-screen button. The headless session drives the same touch controls at 390×844; it has been verified under touch emulation, not on real devices.

### Why is there no online generation?

Building a new scene needs a model key inside the sandbox, which the backend doesn’t support yet. Run the Skill with your own agent for now.

## Examples

- Claw Catch 3D playable claw machine (scene)
- Crystal Cavern Claw (scene)
- Sugar Charm Claw (video)
- Crystal Cavern Claw (video)
