Skip to main content

Tether System

Tethers are protective lines connecting orbs to boundary anchor points. Breaking all of a player's tethers eliminates them.

Configuration Parameters

ParameterDescriptionEffect
hitDampingSpeed reduction when breakingHigher = more slowdown
springRestRest length for elastic tethers0 = point attachment
springKSpring stiffnessHigher = tighter response
springDampingVelocity damping on springPrevents oscillation
breakSpeedMinMinimum speed to break tethersProtects slow orbs
immunityFramesProtection period after creationPrevents instant break

Current Configuration

Hit Damping:         0.125 (12.5% speed reduction)
Spring: Disabled (K=0)
Break Speed Minimum: 7.5
Immunity: 200 frames (~1.67 seconds)

Tether Mechanics

Creation

Each orb spawns with tethers connecting to anchor points on the boundary:

Orb spawns → Tethers created → Immunity timer starts

Immunity Period

New tethers can't be broken for immunityFrames:

fn can_break_tether(tether: &Tether, current_frame: usize) -> bool {
current_frame > tether.created_frame + immunity_frames
}

Breaking Conditions

A tether breaks when:

  1. Immunity has expired
  2. Colliding orb speed ≥ breakSpeedMin
  3. Orb intersects the tether line

Breaking Effects

When a tether breaks:

1. Speed Reduction

orb.velocity *= (1.0 - hit_damping);
// Example: 1.0 - 0.125 = 0.875 → 87.5% speed retained

2. Kill Credit

The breaking orb's owner gets credit for the kill (when all tethers broken).

Elimination

When all of a player's tethers are broken:

All tethers broken → Player eliminated → Kill credited → Orb removed

Shockwave Interaction

Shockwaves can cut tethers based on configuration:

ParameterDescription
respectProtectHonor immunity period
cutModeanchor or segment intersection
impactCutsTethersAllow impact shockwaves to cut

Next Steps