Mechanic · resources & economy · flight simulation
Fuel gauge
A supply a vehicle's engine uses up, which ends powered flight or driving when it runs out.
On this page
A fuel gauge limits how long an engine can run. The Pilotwings 64 gyrocopter burns fuel only while its engine is on, at a rate set by the throttle1. Star Control II charges its flagship’s fuel by distance flown in HyperSpace, where Pilotwings 64 charges by time with the engine on2,1. Each 162 logical units flown cost one charge, and 1002 charges make one unit on the gauge.
- By distanceStar Control II (1992). 1/100 of a fuel unit for each 16 logical units flown in HyperSpace.2
- By throttlePilotwings 64 (1996). The gyrocopter's tank drains while the engine runs, from 0.001 a second at no power to 0.005 at full.1
Games
| Game | Year | How | Note |
|---|---|---|---|
| Star Control II | 1992 | By distance | 1/100 of a fuel unit for each 16 logical units flown in HyperSpace |
| Pilotwings 64 | 1996 | By throttle | the gyrocopter's tank drains while the engine runs, from 0.001 a second at no power to 0.005 at full |
| Factorio | 2016 | By throttle | locomotives, cars, and tanks burn chemical fuel; better fuel makes a train accelerate harder and run faster |
Every claim about this mechanic, by game (4)
References
- ^ abcIn the US version of Pilotwings 64, the gyrocopter's fuel is a number from 0 to 1, starting at the value the task's first start pad holds, or 0 if the task has no start pad (
db_getstart). WhileusingFuelis set,func_80307EA8takes off each update the frame time times a rate read from a curve of the power (unkB4, the throttle that A raises and B lowers, which the HUD shows as power; in the throttle's case 0 A setsusingFuel, and in cases 1 and 2 A sets it only with fuel above 0): 0.001 at 0, 0.002 at 0.5, and 0.005 at full, linear between. The frame time (D_8034F854) is the time since the last frame held between 0.01 and 0.1, so the rate is per second, and a full tank lasts 200 s at full power and 1,000 s at none (computed). At 0 it clearsusingFuel. In a Class B task, each update thatfunc_802E08F4returns nonzero for the craft's position sets the fuel to 1, andSFX_UI_FUEL_ADDEDplays on the first.func_80307EA8does none of this, refill or drain, whileunkC1is set or in state 2 (unkC0). Separately, the HUD update in code_7CF30.c warns below 0.15 (TEXT_FUEL_WAR) and at 0 (TEXT_FUEL_OUT).Coden64decomp/pw64revisedHow we know
85 D_803694D0.count = 3; 86 D_803694D0.unk4[0].x = 0.0f, D_803694D0.unk4[0].y = 0.001f; 87 D_803694D0.unk4[1].x = 0.5f, D_803694D0.unk4[1].y = 0.002f; 88 D_803694D0.unk4[2].x = 1.f, D_803694D0.unk4[2].y = 0.005f;
src/app/gyrocopter.c lines 84–88 at cb66cb2 · upstream ↗ 1454void func_80307EA8(GyrocopterData* gcData) { ⋮ 1460 if ((gcData->unkC1 != 0) || (gcData->unkC0 == 2)) { ⋮ 1462 return; ⋮ 1464 if (D_8036957E == CLASS_B) { 1465 if (func_802E08F4(gcData->unk10.m[3][0], gcData->unk10.m[3][1], gcData->unk10.m[3][2]) != 0) { 1466 if (gcData->unk67E == 0) { 1467 gcData->unk67E = 1; 1468 sndPlaySfx(SFX_UI_FUEL_ADDED); ⋮ 1473 gcData->fuel = 1.0f; ⋮ 1478 if ((gcData->fuel > 0.0f) && gcData->usingFuel) { 1479 gcData->fuel -= func_80313F08(&D_803694D0, gcData->unkB4) * D_8034F854; 1480 if (gcData->fuel <= 0.0f) { ⋮
src/app/gyrocopter.c lines 1454–1488 at cb66cb2 · upstream ↗ 257f32 func_80313F08(Unk803599D0* arg0, f32 arg1) { ⋮ 278 temp_fv1 = (arg1 - prev->f[0]) / (cur->f[0] - prev->f[0]); 279 return (cur->f[1] * temp_fv1) + (prev->f[1] * (1.0f - temp_fv1));
src/app/code_9A960.c lines 257–280 at cb66cb2 · upstream ↗ 9f32 D_8034F854 = 0.1000000015f; // actual time since last framesrc/app/code_9A960.c line 9 at cb66cb2 · upstream ↗ 213 temp_fv0 = uvGfxGetFrameTime(); 214 if (temp_fv0 < 0.01f) { 215 D_8034F854 = 0.01f; 216 } else if (temp_fv0 > 0.1f) { 217 D_8034F854 = 0.1f; 218 } else { 219 D_8034F854 = temp_fv0;
src/app/code_9A960.c lines 210–220 at cb66cb2 · upstream ↗ 95 db_getstart(&gcData->unk10, &gcData->unk190, &sp5F, &gcData->fuel);src/app/code_7CF30.c line 95 at cb66cb2 · upstream ↗ 260 temp_v1 = taskGetTPAD(&sp44); 261 if (temp_v1 == 0) { ⋮ 271 if (fuel != NULL) { 272 *fuel = 0.0f; ⋮ 274 } else { ⋮ 278 first = &sp44[0]; ⋮ 292 if (fuel != NULL) { 293 *fuel = first->unk2C;
src/app/code_66F70.c lines 260–294 at cb66cb2 · upstream ↗ 248 switch (gcData->unk5F) { 249 case 0: 250 if (buttons & A_BUTTON) { 251 gcData->unkB0 += gcData->unk654 * D_8034F854; 252 if (!gcData->usingFuel) { 253 gcData->usingFuel = TRUE; ⋮ 256 if (buttons & B_BUTTON) { 257 gcData->unkB0 -= gcData->unk658 * D_8034F854; ⋮ 274 case 2: ⋮ 279 if (buttons & A_BUTTON) { 280 gcData->unkB0 += gcData->unk648 * D_8034F854; 281 if (!gcData->usingFuel && (gcData->fuel > 0.0f)) { ⋮
src/app/code_7CF30.c lines 248–309 at cb66cb2 · upstream ↗ 473 if (hud->fuel > 0.0f) { 474 hud->power = gcData->unkB4;
src/app/code_7CF30.c lines 473–474 at cb66cb2 · upstream ↗ 494 if ((gcData->fuel <= 0.0f) && !gcData->fuelEmpty) { 495 hudWarningText(TEXT_FUEL_OUT, 1.5f, 8.0f); ⋮ 497 } else if ((gcData->fuel < 0.15f) && !gcData->hasLowFuel) { 498 hudWarningText(TEXT_FUEL_WAR, 1.5f, 8.0f);
src/app/code_7CF30.c lines 494–499 at cb66cb2 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Revised after a check by a second AI model, 2026-10-22.
- ^ abcdWhile the flagship moves in HyperSpace,
MoveSISadds up how far the flagship moves on each axis (as absolute values) since it entered (LoadHyperspacezeroes the sums), takes the square root of the sum of their squares, and charges 1 unit ofFuelOnBoardfor each 16 logical units of that distance; the first charge comes at 32, since the count starts at 1 (computed). The fuel gauge showsFuelOnBoarddivided by 100 (FUEL_TANK_SCALE), so each charge is 1/100 of a shown unit. Nothing is charged with an empty tank or while theARILOU_SPACE_SIDEgame state is above 1. The atlas reads those values as QuasiSpace: hyper.c loads theARISPACEgraphics intohyperstars[2], picks the stars ashyperstars[1 + (ARILOU_SPACE_SIDE >> 1)], and from 2 upAddEncounterElementreturns at once, adding no encounter.CodeThe Ur-Quan Masters (2002 import)revisedHow we know
91 if (GLOBAL_SIS (FuelOnBoard) 92 && GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1) ⋮ 99 hyper_dx += new_dx; ⋮ 102 hyper_dy += new_dy; ⋮ 104 hyper_dist = square_root ( 105 (DWORD)hyper_dx * hyper_dx 106 + (DWORD)hyper_dy * hyper_dy ⋮ 108 cur_fuel_ticks = hyper_dist >> 4; 109 if (cur_fuel_ticks > (COUNT)fuel_ticks) ⋮ 112 DeltaSISGauges (0, fuel_ticks - cur_fuel_ticks, 0); ⋮ 121 fuel_ticks = (BYTE)cur_fuel_ticks;
sc2/src/sc2code/hyper.c lines 91–122 at 2f5b2c3 · upstream ↗ 296 if ((dx || dy) && LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) 297 MoveSIS (&dx, &dy);
sc2/src/sc2code/process.c lines 296–297 at 2f5b2c3 · upstream ↗ 298 hyper_dx = hyper_dy = 0; 299 fuel_ticks = 1;
sc2/src/sc2code/hyper.c lines 298–299 at 2f5b2c3 · upstream ↗ 645 if (fuel_delta != 0) ⋮ 651 else ⋮ 656 GLOBAL_SIS (FuelOnBoard) / FUEL_TANK_SCALE ⋮ 661 else if ((GLOBAL_SIS (FuelOnBoard) += fuel_delta) > ⋮ 667 GLOBAL_SIS (FuelOnBoard) / FUEL_TANK_SCALE ⋮ 671 wsprintf (buf, "%u", new_coarse_fuel);
sc2/src/sc2code/sis.c lines 645–671 at 2f5b2c3 · upstream ↗ 75#define FUEL_TANK_SCALE 100sc2/src/sc2code/sis.h line 75 at 2f5b2c3 · upstream ↗ 288 hyperstars[2] = CaptureDrawable ( 289 LoadGraphic (ARISPACE_MASK_PMAP_ANIM)
sc2/src/sc2code/hyper.c lines 288–289 at 2f5b2c3 · upstream ↗ 764 HyperSpaceElementPtr->current.image.farray = 765 &hyperstars[1 + (GET_GAME_STATE (ARILOU_SPACE_SIDE) >> 1)];
sc2/src/sc2code/hyper.c lines 764–765 at 2f5b2c3 · upstream ↗ 893AddEncounterElement (ENCOUNTERPTR EncounterPtr, ⋮ 901 if (GET_GAME_STATE (ARILOU_SPACE_SIDE) >= 2) 902 return (0);
sc2/src/sc2code/hyper.c lines 893–902 at 2f5b2c3 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Revised after a check by a second AI model, 2026-10-22.
Sources
Code
- Smith, Garrett and pw64 contributors. 2026. “pw64: a decompilation of Pilotwings 64 (n64decomp/pw64).” Commit cb66cb2. n64decomp/pw64 @ cb66cb2 · licence, all uses
- Reiche, Paul, Fred Ford, and The Ur-Quan Masters project. 2002. “The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import.” Commit 2f5b2c3. sc2/uqm @ 2f5b2c3 · licence, all uses