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

Crater Raid: A Run-and-Gun on Destructible Terrain

Run, shoot, roll and throw grenades across a seeded crater world where every tile can be blasted, in one offline HTML file: bullets chew dirt, grenades dig craters, fire spreads and a roll puts it out. Clear each outpost of patrols, dodgers and grenadiers; levels grow wider, lives run out and the best level is kept. Every sprite, tile and sound is drawn or synthesised in code.

示例

Crater Raid run-and-gun game
在新标签页中打开

Crater Raid run-and-gun game

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

在线运行

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

在 Lab 中打开 ↗

你将获得什么

Bring the theme, the hero and the enemies, and optionally the terrain, the weapons, the level growth and the HUD text. The Skill returns a downloadable Skill (the run-and-gun project, a customize guide, headless verification) and one playable example run.

工作原理

  1. 01

    Copy the run-and-gun game

    Crater Raid starts with node scripts/new-project.mjs --out my-raid and npm ci, which fetches Vite and playwright-core. Your coding agent reads references/customize.md for palette and weather, terrain and outposts, the enemy table and escalation, movement, roll and grenades, props and barrels, HUD copy, the cover script and the touch layout. A prompt names your hero and the world they raid.

  2. 02

    Tune terrain, enemies and feel

    The seeded generator builds one deterministic plan per seed and level, with level.baseSeed in config.js. Every sprite, tile texture, prop, sky and sound is drawn or synthesized in code under assets/crater-raid/src/, so there are no image or audio files. It runs on Canvas 2D only, with a fixed 60 fps axis-aligned tile world and no WebGL requirement.

  3. 03

    Build, shoot and read the report

    npm run build:single writes dist-single/index.html, about 0.1 MiB. npm run shoot needs local Chrome, with SwiftShader acceptable, and plays the title, moving, shooting, breaking terrain, a grenade crater, a roll, a kill, damage and respawn, a level clear, game over and restart, plus a phone run. Look at shots/*.jpg and shots/report.json until every check passes.

常见问题

What happens in a Crater Raid level?

Crater Raid is a 2D run-and-gun on destructible seeded terrain. You run with A and D, jump with W or Space, shoot with Z, dodge-roll with X and throw a fuse grenade with C. Bullets chip dirt, glass and pipe, explosions carve craters and burning barrels chain-detonate. Clear every enemy on a sector to advance to a wider level.

How smart are the Crater Raid enemies?

Crater Raid enemies run a small state machine, patrol, alert, fight and lost, with vision range, facing and line-of-sight raycasts. They spot you after a reaction delay, shoot, dodge-roll and lob grenades back. They are not pathfinders, so they walk, jump and use ladders and can be evaded.

Is the Crater Raid level the same every run?

Yes, for a given seed. Crater Raid always builds the same world for sector N from level.baseSeed in config.js, and changing it gives a different planet. There is no hand-authored level data and no tile editor.

Does Crater Raid save progress?

Only within the session. Crater Raid keeps best, the furthest sector reached, in an in-memory store, and closing the tab resets it. There is deliberately no disk persistence, because the sandbox allows no storage.

Does Crater Raid need a key or downloaded assets?

No. Crater Raid calls no model, fetches nothing and uses no storage or workers, so there is no usage charge. Everything is original code, and npm run build:single writes a THIRD_PARTY_NOTICES comment at the top of the file that must not be stripped.

What are the Crater Raid limits?

Crater Raid has no slopes, fluids or polygon terrain, and tiles are the unit of destruction with no partial-tile damage. It is single-player, its UI is English only and there is no co-op. Sound is synthesized with Web Audio on the first gesture, so a muted browser stays silent.

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.