Log inGet started
World

Hullbreaker

Branchmain
Branchesmain
Commitcdbe4bf730

README.md

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

ControlKeyboardGamepadTouch
Move (thrust in the helmet's plane)WASDleft stickleft stick
Lookmouseright stickdrag, right of screen
Thrust upSpaceright shoulderThrust Up
Thrust downCtrl / Cleft shoulderThrust Down
Burn (hard acceleration)Shiftright triggerBurn
RCS brakeQleft triggerRCS Brake
Magclamp (grab / release)Fwest face buttonMagclamp

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.