Back to Impact Yard remix
SOURCE / PINNED RELEASE

Made of little things.

Impact Yard remix

Release
5b31a37bbd07
Author-recorded commit
7762f7efb018…
License
LICENSE
Author’s source reference
nostr://npub1n8ga89w8h6tvwamxusfyzexw8gjy84yxu9rxgnmk955cxtml4ujswzxydd/wss%3A%2F%2Fgit.napplet.soy%2F/n-c1d8c061b02

Archive hash verified: c640627baa321925. The source-to-build association is the author’s claim; it has not been independently rebuilt.

docs/driving-simulator.md
# Driving simulator build spec

nappletType: impact-yard
purpose: Drive a car into freestanding structures and explore their physical collapse.
NAPs used: theme (optional), storage (optional).
requires: none.
optional domains and fallbacks: theme → local charcoal/copper palette; storage → camera preference lasts for this session only.
SDK helpers: themeGet, themeOnChanged, storage.getItem/setItem.
data flow: simulation stays in memory; only the selected camera is saved on a user camera change.
relay escape hatches: none.
config schema: none.
interop: none.
density: compact controls; larger speed digits because this is a driving instrument.
tiers: tiny = canvas, icon actions, condensed driving buttons; compact = touch controls and speed; regular = controls and compact telemetry; wide = more of the 3D yard, structure guide and full telemetry; short-height = hide secondary instruments.
minimum size: none.
theme: optional, all UI tokens and scene atmosphere follow the runtime background/text/primary; fallback #182420 / #edf2e9 / #e4ac6b.
states: inline starting status; inline WebGL failure with retry; no identity needed; absent storage affects preference persistence only.

## Simulation and presentation

### Spectacle expansion

Expand the arena to 360×360 metres and retain all twelve existing structures.
Add five complexes in the outer arena: approximately 42 m skybridge twins,
a 40 m freight avalanche tower, a 29 m cascade viaduct, a 50 m helix tower,
and five linked 34 m cathedral arches. Build them from load-bearing piers,
separate floor/deck sections and loose cargo. Removing a support must cause
gravity and subsequent impacts to carry the collapse upward or across spans.
No timed body removal, scripted collapse impulses or impact teleports.

Use shared instanced prop geometry to keep the larger body count practical.
Strong physics contacts emit a bounded queue of visual dust puffs; these fade
and have no collision authority. Rebuild clears them. Pausing/slow motion also
pauses/slows dust; reduced motion reduces it and omits camera movement effects.
The structure guide becomes a list of site actions. N or the compact next-site
button moves the car to a clear approach; R recovers there, while Rebuild resets
the entire yard and original start. Keep these controls usable at all four frame
sizes and both themes. Existing boost, car handling and optional theme/storage
integration remain unchanged; no new NAPs, requirements or external assets.

### Huge arena and rocket boost

Expand the arena from 78×78 to 180×180 metres, with the perimeter, markings,
scenery and camera visibility sharing the larger footprint. Preserve the original
course and add five freestanding mega structures in the outer yard: a 17 m
concrete wall, 16 m crate pyramid, 14 m timber tower, 10 m dominoes, and a
19 m loaded gateway. Their loose rigid bodies must stand at rest and collapse
under car impacts; keep open approaches between obstacle areas.

F on the focused canvas or the accessible rocket button fires a 1.2-second
burst: an immediate forward impulse followed by chassis-aligned thrust, also
while airborne. Twin modeled booster housings, mounting brackets, flared
nozzles and animated exhaust make the rocket visible. A compact indicator shows
burn/recharge/ready; allow another burst after a 2.4-second recharge. Braking,
blur and pause cut thrust; recovery/rebuild reset the rocket. Held F cannot
auto-repeat. All frames retain the boost button; reduced-motion users get the
same physics with steady flames and no camera kick. These changes are local
simulation and bundled geometry, with the same optional NAPs and no new domains.

### Obstacle expansion and ramp repair

Add a domino run, a timber block tower with alternating layers, and a masonry
archway carrying loose crates. Each is built from movable bodies; collapse and
chain reactions come from contacts and gravity. Spread these into the yard's
unused west and east areas, preserving driving space and the ramp approach.
The ramp becomes a solid wedge whose driving surface starts at ground level.
Physics and rendering share its vertices so the visible entrance matches the
collider. New regression checks drive the actual car up the ramp at low and high
throttle and strike each new structure. The structure guide adapts to the larger
list and short frames. NAPs, persistence, required domains and fallbacks are as
specified above; these additions use only bundled geometry and local simulation.

Three.js renders a procedural industrial test yard with an orange hatchback,
wooden crates, masonry blocks, barrel pyramids, and a ramp. cannon-es handles
gravity, mass, friction, contact impulses, angular momentum and a raycast vehicle
with four spring/damper suspension units. Individual loose blocks fall and scatter
through contact forces. Fixed 1/120-second physics steps reduce fast-impact
penetration. This is a rigid-body approximation, not finite-element material
fracture or vehicle body deformation. No scripted explosions or impact teleports.

WASD / arrow keys work only on the focused game canvas. Pointer buttons provide
the same controls, including on touch devices; there is no global key capture.
Space brakes; R recovers the car; C cycles chase, orbit and overhead cameras.
Toolbar actions pause, select half-speed, recover, and rebuild the yard.
Blur, lost pointer capture and hidden documents release driving controls.

Dependencies are bundled; there are no remote models, textures, fonts or network
requests. Existing boilerplate build and conformance wiring is retained.

API references: [cannon-es vehicle example](https://github.com/pmndrs/cannon-es/blob/master/examples/raycast_vehicle.html),
[Three.js WebGLRenderer](https://threejs.org/docs/pages/WebGLRenderer.html).