Scrapper
The suit. Everything that moves the player in HULLBREAKER happens in this component and nowhere else.
Scrapper
The suit. Everything that moves the player in HULLBREAKER happens in this component and nowhere else.
Vacuum has no drag, so Scrapper integrates a velocity that nothing ever
takes away. Thrust adds to it, the RCS brake subtracts from it and charges
propellant for the privilege, and letting go of the controls changes
nothing at all. Clamp a plate and its mass folds into every one of those
numbers: you start slower, you stop far slower, and the shaft is narrower
than you remember.
Put it on the player's body. The scene's PlayerPrototype clones one per joining scrapper, and each instance answers only to the client that owns its body.
Controls
| Control | Keyboard | Gamepad | Touch |
|---|---|---|---|
| Move (thrust in the helmet's plane) | WASD | left stick | left stick |
| Look | mouse | right stick | drag, right of screen |
| Thrust up | Space | right shoulder | Thrust Up |
| Thrust down | Ctrl / C | left shoulder | Thrust Down |
| Burn (hard acceleration) | Shift | right trigger | Burn |
| RCS brake | Q | left trigger | RCS Brake |
| Magclamp (grab / release) | F | west face button | Magclamp |
Move and look come from @builtin::inputMaps.default; the other five are
game.scrapper, which composes beside it.
What other systems call
local suit = entity(bodyId).component.get("Scrapper")
suit:applyImpulse(dx, dy, dz) -- world-space delta-v, m/s
suit:applyForce(dx, dy, dz, dt) -- the same, held for dt seconds
suit:velocityAt() -> vx, vy, vz
suit:isCarrying() -> carrying, tonnes, pieceId
suit:halt() -- bring the suit to rest, spending no propellant
applyImpulse is the only sanctioned way to move the scrapper from
outside this slice — a pressure vent, a collapsing beam, a piece of debris
all push the player through it. The shove is scaled by whatever is on the
clamp, so a loaded scrapper is harder to knock off line, and the plate is
carried through the shove with them.
What it reports
speed, carrying, carriedPiece and clampReady are live public
fields a HUD can read every frame. carrying is also mirrored onto
game.rules' run state, and the clamp announces itself on the event bus
as clamped, released and deposited.
Scoped to this part · feeds back into the world's score.