Claim set · data/claims/star-control-ii.yaml

Star Control II (the 2002 release of the 3DO port's code, SDL port included, as The Ur-Quan Masters first imported it)

Game: Star Control II.

In the 3DO source as The Ur-Quan Masters first imported it (2002), each pass of the battle loop sleeps until 5 ticks (BATTLE_FRAME_RATE) after the previous pass woke, on a clock of 120 ticks a second (ONE_SECOND), so battle runs at most 24 frames a second (computed: 120 / 5). The sleep is the port's SleepTask, in its SDL wrapper. When nth_frame is set, which encount.c does only while the cyborg option flies the player's ships in an encounter, the loop only yields (TaskSwitch) and does not wait. The atlas calls one pass a frame. star-control-ii/frame

About: Star Control II Inertia

Value: 24 battle frames per second, at most (computed)

CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/element.h#L22#define BATTLE_FRAME_RATE 5The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/libs/timlib.h#L24#define ONE_SECOND 120The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/battle.c#L229-L232if (nth_frame) TaskSwitch (); else NextTime = SleepTask (NextTime + BATTLE_FRAME_RATE);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/SDL_wrapper.c#L1315-L1325SleepTask (DWORD wake_time) … if (wake_time <= t) SDL_Delay (0); else SDL_Delay ((wake_time - t) * 1000 / ONE_SECOND); … return (GetTimeCounter ());The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/encount.c#L745-L758if (GLOBAL (glob_flags) & CYBORG_ENABLED) … nth_frame = MAKE_WORD (1, cur_speed); PlayerControl[0] = CYBORG_CONTROL | AWESOME_RATING;Checked by claude, 2026-10-22 — read the battle loop at battle.c 229-232, BATTLE_FRAME_RATE in element.h, ONE_SECOND in libs/timlib.h, SleepTask in SDL_wrapper.c (it delays to the wake time and returns the current count, which the loop keeps as the next base), and the two assignments of nth_frame in encount.c (745-757 sets it with CYBORG_ENABLED, 774-776 clears it)

The 3DO and DOS builds' own timing isn't in this code: the sleep is the port's SDL_wrapper.c.

Cited by: Hit points, Star Control II

The Earthling Cruiser's stats set MAX_THRUST 24, THRUST_INCREMENT 3, TURN_WAIT 1, and THRUST_WAIT 4. Speeds are in world units per frame; DISPLAY_TO_WORLD makes one display unit 4 world units. Each frame, ship_preprocess counts a ship's turn wait down, or, when it is 0 and a turn is held, steps the ship one of its 16 facings and sets the wait to TURN_WAIT. Thrust works the same way with its own wait: when the wait is 0 and thrust is held, ship_preprocess calls inertial_thrust once and sets the wait to THRUST_WAIT. Each such call is one thrust step, which adds THRUST_INCREMENT to the velocity along the facing, up to MAX_THRUST (sc2/speed-cap). So the Cruiser turns a facing every 2 frames and takes a thrust step every 5 frames. Each step raises its speed by 3 world units per frame (3/4 of a display unit per frame), to a top speed of 24 world units (6 display units) per frame, which it reaches from rest after 8 steps along an axis (computed). Comments beside the two thrust values read DISPLAY_TO_WORLD (6), which is 24 and agrees with the code, and DISPLAY_TO_WORLD (2), which is 8 and disagrees with the code's 3. star-control-ii/cruiser-thrust

About: Star Control II Inertia

Value
{
 "maxThrust": 24,
 "thrustIncrement": 3,
 "turnWait": 1,
 "thrustWait": 4,
 "facings": 16
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L29-L32#define MAX_THRUST /* DISPLAY_TO_WORLD (6) */ 24 #define THRUST_INCREMENT /* DISPLAY_TO_WORLD (2) */ 3 #define TURN_WAIT 1 #define THRUST_WAIT 4The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L56-L67MAX_THRUST, THRUST_INCREMENT, … TURN_WAIT, THRUST_WAIT,The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/races.h#L74-L84COUNT max_thrust, thrust_increment; … turn_wait, thrust_wait,The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/units.h#L30-L33#define ONE_SHIFT 2 … #define DISPLAY_TO_WORLD(x) ((x)<<ONE_SHIFT)The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/units.h#L105-L112#define FACING_SHIFT 4 … #define NORMALIZE_FACING(f) ((COUNT)(f)&((1 << FACING_SHIFT)-1))The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L223-L254if (ElementPtr->turn_wait) --ElementPtr->turn_wait; else if (cur_status_flags & (LEFT | RIGHT)) … NORMALIZE_FACING (StarShipPtr->ShipFacing - 1); … ElementPtr->turn_wait = RDPtr->characteristics.turn_wait; … if (ElementPtr->thrust_wait) --ElementPtr->thrust_wait; else if (cur_status_flags & THRUST) … …The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L69-L80thrust_increment = WORLD_TO_VELOCITY (thrust_increment); GetCurrentVelocityComponents (VelocityPtr, &cur_delta_x, &cur_delta_y); delta_x = cur_delta_x + COSINE (CurrentAngle, thrust_increment); delta_y = cur_delta_y + SINE (CurrentAngle, thrust_increment); … if (desired_speed <= max_speed) SetVelocityComponents (VelocityPtr, delta_x, delta_y);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/velocity.h#L49-L53#define VELOCITY_SHIFT 5 … #define WORLD_TO_VELOCITY(l) ((l)<<VELOCITY_SHIFT)The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/process.c#L141-L151if (!(state_flags & IGNORE_VELOCITY)) … GetNextVelocityComponents (&ElementPtr->velocity, &delta_x, &delta_y, 1); … ElementPtr->next.location.x += delta_x; ElementPtr->next.location.y += delta_y;Checked by claude, 2026-10-22 — read human.c's defines and its RACE_DESC, whose characteristics block lists the values in the order of races.h's CHARACTERISTIC_STUFF; ship_preprocess 223-254 for the waits; inertial_thrust 69-80, where velocity carries 5 fraction bits (velocity.h) and the move step (process.c 141-151) adds one frame's velocity to the position in world units. 16 facings from FACING_SHIFT 4; 8 thrusts from 8 x 3 = 24

With a wait of N, the action repeats every N + 1 frames while held. The Cruiser's first turn or thrust comes on the frame the button is pressed if its wait has run down.

Cited by: Star Control II

inertial_thrust caps the speed itself, not each axis: after adding a thrust step it compares the sum of the squared components with MAX_THRUST squared, so a ship is no faster on a diagonal. Asteroids clamps each axis of its ship's velocity apart, so its diagonal is faster (asteroids/top-speed). A step that would pass the cap still applies if the result is slower than the current speed. At the cap, a step along the line of travel sets the velocity to exactly MAX_THRUST along the facing (if the ship isn't above the cap); a step off the line instead adds half a thrust step along the facing and takes a whole step off along the line of travel, kept if that ends within the cap or slower than before, so the course swings toward the facing. While the ship is flagged in a gravity well, a thrust step may take it past the cap up to MAX_ALLOWED_SPEED, 18 display units per frame. star-control-ii/speed-cap

About: Star Control II Inertia

Value
{
 "maxAllowedInWell": 72
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L75-L128desired_speed = (DWORD)((long)delta_x * delta_x) + (DWORD)((long)delta_y * delta_y); max_speed = (DWORD)WORLD_TO_VELOCITY (max_thrust) * WORLD_TO_VELOCITY (max_thrust); if (desired_speed <= max_speed) SetVelocityComponents (VelocityPtr, delta_x, delta_y); else { #define MAX_ALLOWED_SPEED WORLD_TO_VELOCITY (DISPLAY_TO_WORLD (18)) … if (((StarShipPtr->cur_status_flags & SHIP_IN_GRAVITY_WELL) && desired_speed <= …The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L56-L62else if ((TravelAngle = GetVelocityTravelAngle (VelocityPtr)) == CurrentAngle && (StarShipPtr->cur_status_flags & (SHIP_AT_MAX_SPEED | SHIP_BEYOND_MAX_SPEED)) && !(StarShipPtr->cur_status_flags & SHIP_IN_GRAVITY_WELL))Computer Archeology: Asteroids · content/Arcade/Asteroids/Code.md#L1135-L1145BMI $7130 ; {} CMP #$40 BCC $7138 ; {} LDX #$FF LDA #$3F RTS CMP #$C0 BCS $7138 ; {} LDX #$01 LDA #$C0Checked by claude, 2026-10-22 — read inertial_thrust 56-128 through each branch: the early return when already at the cap on the line of travel outside a well, the length test, the gravity-well and slowing exception, the snap to MAX_THRUST along the line, and the off-line half-step; and Asteroids' clamp at 7125-7138, called for each axis after a thrust step

gravity.c sets SHIP_IN_GRAVITY_WELL (sc2/gravity-well); ship_preprocess clears it with each thrust step and sets it again from the step's result.

Cited by: Gravity well, Inertia, Star Control II

A ship that stops thrusting keeps its velocity: the frame's move step (process.c) adds the velocity to the position without changing it, and ship_preprocess changes it only through inertial_thrust, called while thrust is held. The Earthling Cruiser's own code (human.c) sets a velocity only for its missile. Other code can still change a ship's velocity, such as a planet's pull (sc2/gravity-well) and the Arilou Skiff's own routine (sc2/arilou). star-control-ii/coasting

About: Star Control II Inertia

CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/process.c#L141-L151if (!(state_flags & IGNORE_VELOCITY)) … GetNextVelocityComponents (&ElementPtr->velocity, &delta_x, &delta_y, 1); … ElementPtr->next.location.x += delta_x;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L241-L254if (ElementPtr->thrust_wait) --ElementPtr->thrust_wait; else if (cur_status_flags & THRUST) { … thrust_status = inertial_thrust ((ELEMENTPTR)ElementPtr);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L111-L140nuke_preprocess (PELEMENT ElementPtr) … SetVelocityVector (&ElementPtr->velocity,Checked by claude, 2026-10-22 — read ship_preprocess (133-268) and ship_postprocess (271-332) whole: their only velocity change is the inertial_thrust call; GetNextVelocityComponents (velocity.c) reads the velocity and updates only its rounding error; human.c's one velocity call is in nuke_preprocess, the missile's routine

Unlike Asteroids (asteroids/drag) and Defender (defender/thrust), nothing here takes speed away over time.

Cited by: Inertia, Star Control II

The Arilou Skiff's stats set THRUST_INCREMENT equal to MAX_THRUST, 40 world units (10 display units) per frame, with TURN_WAIT and THRUST_WAIT 0. For such a ship inertial_thrust sets the velocity straight to MAX_THRUST along the facing. The Skiff's own preprocess routine, which ship_preprocess runs before turning and thrust, zeroes its velocity whenever its thrust wait is 0, outside its jump (while it isn't NONSOLID). So the Skiff moves at full speed only on frames thrust is held and stops when it is released, with no inertia. star-control-ii/arilou

About: Star Control II Inertia

Value
{
 "maxThrust": 40
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/arilou/arilou.c#L29-L32#define MAX_THRUST /* DISPLAY_TO_WORLD (10) */ 40 #define THRUST_INCREMENT MAX_THRUST #define TURN_WAIT 0 #define THRUST_WAIT 0The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L50-L55if (thrust_increment == max_thrust) { SetVelocityVector (VelocityPtr, max_thrust, StarShipPtr->ShipFacing); return (SHIP_AT_MAX_SPEED); }The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/arilou/arilou.c#L185-L196arilou_preprocess (PELEMENT ElementPtr) … if (!(ElementPtr->state_flags & NONSOLID)) { if (ElementPtr->thrust_wait == 0) { ZeroVelocityComponents (&ElementPtr->velocity);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L217-L247if (RDPtr->preprocess_func) { (*RDPtr->preprocess_func) (ElementPtr); … if (ElementPtr->turn_wait) … thrust_status = inertial_thrust ((ELEMENTPTR)ElementPtr);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/arilou/arilou.c#L280arilou_desc.preprocess_func = arilou_preprocess;Checked by claude, 2026-10-22 — read arilou.c's defines and arilou_preprocess (185-205), its hookup at 280, ship_preprocess's order (the race's preprocess at 217-221, then turn and thrust), and inertial_thrust's first branch at 50-55

The Slyland Probe (slylandr.c) also sets THRUST_INCREMENT to MAX_THRUST; the atlas hasn't read its routine.

Cited by: Inertia, Star Control II

A Melee planet is an element with 200 hit points and a mass of 200, above GRAVITY_MASS's threshold of 100 (10 times MAX_SHIP_MASS), whose per-frame postprocess is CalculateGravity. That routine pulls every other colliding element without such mass that lies within 255 display units of the planet (GRAVITY_THRESHOLD, tested on each axis and then as a radius, measured the short way across the arena's wrapped edges): it adds 1 world unit per frame to the element's velocity, aimed at the planet, whatever the distance, and flags a ship as in a gravity well. A block under #ifdef NEVER, never compiled, works out a pull from the distance, capped at 6, and only prints it. star-control-ii/gravity-well

About: Star Control II Gravity well

Value
{
 "pull": 1,
 "radius": 255
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/misc.c#L22-L54spawn_planet (void) … PlanetElementPtr->hit_points = 200; … PlanetElementPtr->postprocess_func = (void (*) (struct element *ElementPtr))CalculateGravity; … PlanetElementPtr->mass_points = PlanetElementPtr->hit_points;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/element.h#L131-L133#define MAX_SHIP_MASS 10 #define GRAVITY_MASS(m) ((m) > MAX_SHIP_MASS * 10) #define GRAVITY_THRESHOLD (COUNT)255The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/gravity.c#L28-L131HasGravity = (BOOLEAN)(CollidingElement (ElementPtr) && GRAVITY_MASS (ElementPtr->mass_points + 1)); … && CollidingElement (TestElementPtr) && (TestHasGravity = GRAVITY_MASS (TestElementPtr->mass_points + 1)) != HasGravity) … dx = WRAP_DELTA_X (dx); dy = WRAP_DELTA_Y (dy); … abs_dx = WORLD_TO_DISPLAY (abs_dx); abs_dy = WORLD_TO_DISPLAY (abs_dy); …The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/units.h#L131-L136#define WRAP_DELTA_X(dx) ((dx)<0 ? \ ((-(dx)<=LOG_SPACE_WIDTH>>1)?(dx):(LOG_SPACE_WIDTH+(dx))) : \Checked by claude, 2026-10-22 — read spawn_planet (the solid planet element; a second, nonsolid element of mass 1 draws it), CalculateGravity whole: dx and dy run from the other element to the planet, so ARCTAN aims the pull at the planet; an element with the planet's mass returns TRUE instead, which spawn code uses to keep ships and planets apart. The NEVER block computes magnitude and prints it; nothing after it reads magnitude

"Colliding" means not NONSOLID or DISAPPEARING (collide.h), so shots and asteroids are pulled too. gravity.c doesn't cap the speed the pull builds; thrust's own cap is in sc2/speed-cap.

Cited by: Gravity well, Star Control II

A ship's crew is its hit points: element.h defines hit_points as crew_level, and do_damage takes damage to a player's ship from its crew through DeltaCrew, which reports failure when the crew would reach 0 or less; the ship's life span is then set to 0 and it becomes nonsolid. DeltaCrew changes nothing for the enemy in the last battle (its comment: "Samatra can't be crew-modified"). The Earthling Cruiser's table entry gives 18 crew, at its maximum of 18 (MAX_CREW); in encounters and the last battle a ship takes its crew from the fleet instead, up to that maximum. star-control-ii/cruiser-crew

About: Star Control II Hit points

Value
{
 "maxCrew": 18
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/element.h#L127#define hit_points crew_levelThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/misc.c#L195-L203do_damage (ELEMENTPTR ElementPtr, SIZE damage) { if (ElementPtr->state_flags & PLAYER_SHIP) { if (!DeltaCrew (ElementPtr, -damage)) { ElementPtr->life_span = 0; ElementPtr->state_flags |= NONSOLID;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/status.c#L300-L334DeltaCrew (ELEMENTPTR ElementPtr, SIZE crew_delta) … return (TRUE); /* Samatra can't be crew-modified */ … else if (crew_delta < 0) { if (ElementPtr->crew_level > (BYTE)-crew_delta) ElementPtr->crew_level += (BYTE)crew_delta; else { crew_delta = -(SIZE)ElementPtr->crew_level; ElementPtr->crew_level = 0; …The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L23#define MAX_CREW 18The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L47MAX_CREW, MAX_CREW,The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/races.h#L92BYTE crew_level, max_crew;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L380-L385if (LOBYTE (GLOBAL (CurrentActivity)) == IN_ENCOUNTER || LOBYTE (GLOBAL (CurrentActivity)) == IN_LAST_BATTLE) { if ((RDPtr->ship_info.crew_level = StarShipPtr->special_counter) > RDPtr->ship_info.max_crew) RDPtr->ship_info.crew_level = RDPtr->ship_info.max_crew;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L145-L151if (!(ElementPtr->state_flags & APPEARING)) … ElementPtr->crew_level = (BYTE)RDPtr->ship_info.crew_level;Checked by claude, 2026-10-22 — read do_damage (195-216), DeltaCrew (300-338), the hit_points define, human_desc's ship_info (crew_level then max_crew, per races.h), the appearing ship's crew_level copy in ship_preprocess, and spawn_ship's fleet crew at 380-385

The Samatra exception checks IN_LAST_BATTLE and the BAD_GUY flag (status.c 305-307).

Cited by: Hit points, Star Control II

A ship's battery pays for both its weapons and refills by itself. Each frame, ship_preprocess counts the energy counter down, or, when it is 0 and the battery is below full, adds ENERGY_REGENERATION; every successful DeltaEnergy, a refill or a shot's cost, resets the counter to ENERGY_WAIT. A weapon fires only if DeltaEnergy can take its whole cost. The Earthling Cruiser holds 18 (MAX_ENERGY), regains 1 unit every 9 frames (ENERGY_WAIT 8), pays 9 a missile (WEAPON_ENERGY_COST) at most once every 11 frames (WEAPON_WAIT 10), and 4 (SPECIAL_ENERGY_COST) for each use of its point-defense laser, taken only when a colliding, uncloaked object is within 100 display units (LASER_RANGE) to fire at. So a full battery holds two missiles and refills from empty in 162 frames, 6.75 seconds at 24 frames a second (computed). star-control-ii/cruiser-energy

About: Star Control II Weapon energy

Value
{
 "maxEnergy": 18,
 "regen": 1,
 "regenEveryFrames": 9,
 "weaponCost": 9,
 "specialCost": 4,
 "weaponEveryFrames": 11
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L23-L33#define MAX_ENERGY 18 #define ENERGY_REGENERATION 1 #define WEAPON_ENERGY_COST 9 #define SPECIAL_ENERGY_COST 4 #define ENERGY_WAIT 8 … #define WEAPON_WAIT 10The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L48-L66MAX_ENERGY, MAX_ENERGY, … ENERGY_REGENERATION, WEAPON_ENERGY_COST, SPECIAL_ENERGY_COST, ENERGY_WAIT, … WEAPON_WAIT,The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ships/human/human.c#L186-L214if (ObjectPtr != ShipPtr && CollidingElement (ObjectPtr) && !OBJECT_CLOAKED (ObjectPtr)) { #define LASER_RANGE (UWORD)100 … if ((UWORD)delta_x <= LASER_RANGE && … if (!PaidFor) { if (!DeltaEnergy (ShipPtr, -SPECIAL_ENERGY_COST))The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L210-L215if (StarShipPtr->energy_counter) --StarShipPtr->energy_counter; else if (RDPtr->ship_info.energy_level < (BYTE)RDPtr->ship_info.max_energy || (SBYTE)RDPtr->characteristics.energy_regeneration < 0) DeltaEnergy ((ELEMENTPTR)ElementPtr, (SBYTE)RDPtr->characteristics.energy_regeneration);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/status.c#L260-L295DeltaEnergy (ELEMENTPTR ElementPtr, SIZE energy_delta) … if ((BYTE)-energy_delta > ShipInfoPtr->energy_level) { retval = FALSE; … StarShipPtr->energy_counter = StarShipPtr->RaceDescPtr->characteristics.energy_wait;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/ship.c#L284-L322if (StarShipPtr->weapon_counter) --StarShipPtr->weapon_counter; else if ((StarShipPtr->cur_status_flags & WEAPON) && DeltaEnergy ((ELEMENTPTR)ElementPtr, -RDPtr->characteristics.weapon_energy_cost)) … StarShipPtr->weapon_counter = RDPtr->characteristics.weapon_wait;Checked by claude, 2026-10-22 — read the regeneration test in ship_preprocess, DeltaEnergy whole (a gain is cut at the maximum; a cost larger than the battery fails and changes nothing; success resets energy_counter), the weapon branch of ship_postprocess, spawn_point_defense (145-240; it pays once per use and then fires at every object in range), and human.c's defines against races.h's field order. 9 frames is the wait of 8 plus the refill frame; 18 x 9 = 162; 162 / 24 = 6.75

The 24 frames a second is sc2/frame's ceiling in the port.

Cited by: Star Control II, Weapon energy

While the flagship moves in HyperSpace, MoveSIS adds up how far the flagship moves on each axis (as absolute values) since it entered (LoadHyperspace zeroes the sums), takes the square root of the sum of their squares, and charges 1 unit of FuelOnBoard for each 16 logical units of that distance; the first charge comes at 32, since the count starts at 1 (computed). The fuel gauge shows FuelOnBoard divided by 100 (FUEL_TANK_SCALE), so each charge is 1/100 of a shown unit. Nothing is charged with an empty tank or while the ARILOU_SPACE_SIDE game state is above 1. The atlas reads those values as QuasiSpace: hyper.c loads the ARISPACE graphics into hyperstars[2], picks the stars as hyperstars[1 + (ARILOU_SPACE_SIDE >> 1)], and from 2 up AddEncounterElement returns at once, adding no encounter. star-control-ii/hyperspace-fuel

About: Star Control II Fuel gauge

Value
{
 "logicalUnitsPerCharge": 16,
 "chargesPerShownUnit": 100
}
CodeThe Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/hyper.c#L91-L122if (GLOBAL_SIS (FuelOnBoard) && GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1) … hyper_dx += new_dx; … hyper_dy += new_dy; … hyper_dist = square_root ( (DWORD)hyper_dx * hyper_dx + (DWORD)hyper_dy * hyper_dy ); cur_fuel_ticks = hyper_dist >> 4; …The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/process.c#L296-L297if ((dx || dy) && LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) MoveSIS (&dx, &dy);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/hyper.c#L298-L299hyper_dx = hyper_dy = 0; fuel_ticks = 1;The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/sis.c#L645-L671if (fuel_delta != 0) … GLOBAL_SIS (FuelOnBoard) / FUEL_TANK_SCALE … else if ((GLOBAL_SIS (FuelOnBoard) += fuel_delta) > … wsprintf (buf, "%u", new_coarse_fuel);The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/sis.h#L75#define FUEL_TANK_SCALE 100The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/hyper.c#L288-L289hyperstars[2] = CaptureDrawable ( LoadGraphic (ARISPACE_MASK_PMAP_ANIM)The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/hyper.c#L764-L765HyperSpaceElementPtr->current.image.farray = &hyperstars[1 + (GET_GAME_STATE (ARILOU_SPACE_SIDE) >> 1)];The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import · sc2/src/sc2code/hyper.c#L893-L902AddEncounterElement (ENCOUNTERPTR EncounterPtr, … if (GET_GAME_STATE (ARILOU_SPACE_SIDE) >= 2) return (0);Checked by claude, 2026-10-22 — read MoveSIS (36-123): the sums take the absolute value of each move; a charge is the ticks gained since the last one; past 255 ticks the sums restart from the remainder below 16. Read LoadHyperspace's reset (298-299) and DeltaSISGauges' fuel branch (645-675): a cost larger than the tank empties it

How many star-map units a logical unit is depends on the screen size and differs between the axes (LOGX_TO_UNIVERSE and LOGY_TO_UNIVERSE in units.h); the atlas hasn't worked it out.

Cited by: Fuel gauge, Star Control II