What it is

Zero-gravity space drift. Hold thrust and the ship accelerates along its facing angle, builds heat, and trails out at a tunable top speed; release thrust and drag pulls it back down. Slam into asteroids and you bounce a sliver and lose almost all your speed; slam into an enemy above the ram threshold and you punch through, dealing damage scaled to how fast you were going.

Thrust, drag, and speed cap

VariableBaseline valueMeaning
thrust130Acceleration applied per second along facing (or input direction for hovercraft).
maxSpeed95Top-speed ceiling (units/sec).
drag0.26Per-ship drag coefficient.
DRAG_BASE0.095Global drag scalar.
Drag step (exponential)speed multiplied by max(0.001, 1 - drag × DRAG_BASE) per sim frameDefault coast behavior.
Speed-cap lerp rate10Rate at which over-cap speed is pulled back to the effective ceiling.
Absolute speed cap5000 units/secHard ceiling no buff stack can exceed.
turnRate (baseline)0.14 rad/frame at 60 HzMax angular delta per sim frame; shortest-arc lerp toward input direction.
Stop speed threshold15 units/secBelow this, stop-shake fires and stopSpringAmt relaxes drag.

Acceleration curves

accelCurveMultiplier vs current speed fractionFeel
linear1.0 flatPredictable, racy.
ease_in0.4 at rest to 1.6 at topSlow off the line, builds.
ease_out1.6 at rest to 0.4 at topPunchy launch, plateaus.
instantVelocity snaps directly to effective maxArcade snap.

Drag curves

dragCurveBehaviorFeel
linearConstant brake rate per frame, independent of current speedBoat-like slow coast.
exponentialBase multiplicative dragSpace drag (default).
front_loadedDrag exponent 0.6 + 1.0 × speedFractionStrong brake at high speed, eases at low; arcade car.
back_loadedDrag exponent 0.6 + 1.0 × (1 - speedFraction)Weak at high speed, strong at low; heavy cargo.
overshootBelow 25% of max speed, drag is multiplied by 0.4 + 2.4 × speedFractionHovercraft glide, slips past zero.

Heat

VariableBaseline valueMeaning
Heat range0 to 100Bar fills while thrusting, drains while coasting.
heatBuildup (heatBurnRate)12Per-ship gain multiplier.
heatCooldown (heatCoolRate)40Per-ship cool multiplier.
Accumulation curve(0.10 + 0.55 × (1 - ln(1 + heatFrac × 12) / ln(13))) × 1.5Logarithmic; fast initial gain, slows as bar fills.
Asymptote dampener above 95%Gain multiplied by (1 - dampT)², where dampT = (heat - 95) / 5Last 5% feels like pushing through molasses.
Floor gain past 95%0.3 heat/secBar always creeps forward, eventually overheats.
Cooling acceleration ramp+2.5/sec while not thrusting, cap 4×Cooling ramps up the longer you coast.
Heat thrust boost1.0× at 0% heat to 1.35× at 99% heat (linear)Same +35% applies to effective max speed cap.
Burnout triggerheat reaches 100Stall begins.
Burnout HP damage16 × burnoutSeverity (baseline burnoutSeverity 0.35 → 5.6 HP)Shield drops to 0 simultaneously.
Stall spin12 to 18 rad/sec, decays exponentially by factor 0.18^dtShip spins out.
Stall drag (per sim frame)velocity × 0.88Hard deceleration during burnout.
Stall heat drainheatCoolRate × 0.9 per secStall ends when heat reaches 0.
heatShakeThreshold (baseline)0.85 (85% heat)Above this, continuous camera shake.
heatShakeIntensity (baseline)0Per-ship amplitude; shake scales with over-threshold fraction.
stopShakeIntensity (baseline)0Camera shake when speed crosses down through stop threshold while not thrusting.
stopSpringAmt (baseline)0Below stop threshold, drag is weakened by stopSpringAmt × (1 - speed/threshold).

External thrust boosts

SourceThrust + max-speed multiplier
Shooting-star trail buff1.30
Star Power1.20
Phoenix legendary aura1.20
All boosts stackMultiplicatively.

Ramming

VariableBaseline valueMeaning
ramThreshold150 units/secBelow this speed, contact is a push-apart bump (no ram damage).
ramDamageLo40Damage at ramThreshold.
ramDamageHi1000Damage at the high-speed end.
Ram damage interp end speed5000 units/secTop of the lerp; damage clamps here.
Ram damage formularound((40 + t × 960) × meleeMult), t = clamp((speed - 150) / (5000 - 150), 0, 1)Linear lerp scaled by meleeMult.
Speed bleed on ram1 - clamp(enemyMass / (shipMass + enemyMass), 0.15, 0.85)Always lose at least 15%, keep at least 15%.
Ship class mass — light1.0Light ships bounce.
Ship class mass — medium2.0Default mass.
Ship class mass — heavy3.0Heavy ships plow.
Mass scalingclassMass × shipScalePer-ship final mass.
Enemy mass scalecollision radius × 0.07Radius-30 enemy is mass ≈ 2.1.
Enemy knockback200 × (shipMass / totalMass) × min(2.0, shipSpeed/200) × dt × 60Mass-weighted, speed-scaled push.
T-bone forward arc±0.7 rad (≈ ±40°) from velocity headingRam inside this arc earns the T-BONED label.

Terrain interactions

VariableBaseline valueMeaning
terrainRestitution (legacy bounce)1.09~9% of incoming normal velocity reflected.
terrainFriction (tangential)0.01Minimal tangential drag on contact.
Rapier ship restitution0.09Bounce coefficient handed to Rapier collider.
Rapier ship friction0.01Surface friction handed to Rapier collider.
Sealed-arena walls — restitution0Walls absorb velocity, no bounce.
Sealed-arena walls — friction0No tangential drag.
Asteroid collision shapePixel-traced polygon from the baked visualCollision matches the rendered outline.
Asteroid fallback shapeBounding circleUsed only on the first frame before tracing.
BroadphaseCircle-circle on bounding radiusCheap reject.
NarrowphaseSAT polygon vs ship hull polygon, or SAT polygon vs circleExact push-out.

Rotation and fixed-facing ships

VariableBaseline valueBehavior
rotatestrueShip angle lerps toward input angle at max turnRate per frame; thrust applies along ship.angle.
rotatesfalseShip angle stays fixed at fixedAngleDeg; thrust applies along the input direction (omnidirectional hovercraft).
fixedAngleDeg (baseline)0 (up)Only used when rotates is false.
Turn squashUp to 10% horizontal squash, mapped from smoothed angular velocity × 0.025Visual; fast attack, slow release.

Physics tick

VariableValueMeaning
Rapier fixed timestep1/60 secPhysics steps at 60 Hz regardless of render rate.
Max accumulated time per frame0.1 sec (6 steps)Cap prevents spiral-of-death on long frames.
Gravity(0, 0)Zero gravity world.
Ship body typeDynamic, rotations locked, CCD enabledGame sets velocity, Rapier solves collisions and position.
Terrain body typeStatic (fixed)Asteroids and floaters never move.
Enemy body typeKinematic sensor, ball colliderEnemies report overlap but do not push the ship via Rapier.
Enemy sensor activation delay0.15 sec after spawnNewly spawned enemies cannot collide with the ship for the first 0.15 sec.

How it works (gameplay flow)

  • Read input: thrust on or off, joystick angle becomes targetAngle.
  • Rotate (if the ship rotates) toward targetAngle by up to turnRate × dt × 60 per frame, shortest-arc.
  • If thrusting, add velocity along ship angle (or input angle for hovercraft) equal to thrust × heatBoost × trailBuff × starPower × phoenixBuff × accelCurveMultiplier × dt.
  • Apply drag once per frame using the active drag curve.
  • Clamp speed toward the effective max (maxSpeed × the same boost stack) via the speed-lerp; clamp absolutely at 5000 units/sec.
  • Accumulate or drain heat depending on whether thrust is held; trigger burnout if heat reaches 100.
  • Push final velocity to the Rapier body, step physics at fixed 1/60 sec, read corrected position back interpolated by the accumulator alpha.
  • Resolve ship vs enemy contact: push apart by mass ratio, deal ram damage if speed is at or above ramThreshold, bleed ship speed, fire T-BONED label if the enemy was in the forward ±40° arc.

Interactions

  • Ships: thrust, maxSpeed, drag, turnRate, dragCurve, accelCurve, heatBuildup, heatCooldown, burnoutSeverity, stopShakeIntensity, heatShakeIntensity, stopSpringAmt, terrainRestitution, terrainFriction, ramThreshold, ramDamageLo, ramDamageHi all come from the ship definition.
  • Combat/ram: speed-scaled ram damage, mass-weighted knockback and bleed, T-bone bonus arc, meleeMult multiplier on ram damage.
  • World/terrain: pixel-traced asteroid polygons, low-bounce surface response, sealed-arena walls absorb velocity completely.
  • Weapons aim: rotation locked to input direction; angle is what weapons fire along on rotating ships.
  • Buffs: Star Power boosts thrust and top speed and locks heat at 0; Shooting-star trail and Phoenix aura boost thrust and top speed while their timers are alive.
  • Shield/invulnerability: tick alongside physics; shield regen has a delay phase and a background-fill phase; burnout zeroes shield and slams HP.

What it does NOT do

  • Gravity. No wells, no falling, no orbital pull.
  • Continuous angular velocity. Turning is a per-frame lerp toward targetAngle, not a torque-driven simulation.
  • Bullet physics. Projectiles live on a separate spatial grid, not in the Rapier world.
  • Enemy-on-enemy collision via Rapier. Enemy bodies are sensors against the ship only.
  • Elastic bounces off terrain. Surface restitution is intentionally tiny (~9% reflected).
  • Per-star stat scaling. A star-5 hull shares the same thrust, drag, heat, and ram numbers as star-1; differences come from installed mods.
  • Drift on burnout. Stall uses a hard-coded 0.88 per-frame velocity multiplier rather than the per-ship drag curve.
  • Friction on Star Power heat. Heat is forced to 0 for the entire duration; the bar does not accumulate or cool.