Jump to content

Flight Time

From pr0game Wiki
This is the approved revision of this page, as well as being the most recent.

Flight Time

The flight duration of a fleet depends on the distance, the speed of the slowest ship in the fleet (see the respective unit page under "Speed & Fuel Consumption"), and the game speed of the universe. Calculated from src/Core/FleetFunctions.php (getMissionDuration()), constant MIN_FLEET_TIME from includes/constants.php (value: 5 seconds).

Formula

Factor = (3500 / (speed factor * 0.1)) * (distance * 10 / slowest ship speed)^0.5 + 10 Flight time = max(factor / game speed, 5)

Parameters in Detail

Parameter Source Influence
Distance Distance (galaxy/system/planet formula) Largest lever — enters via square root, double distance ≈ 1.41× flight time, not double
Slowest ship speed Drive level of the slowest ship in the fleet (see respective unit page) A single slow ship (e.g. colony ship) slows down the entire fleet
Speed factor Selectable when sending a fleet, 10–100% Lower value = slower, but also lower fuel consumption
Game speed fleet_speed / 2500 (getGameSpeedFactor()), configured per universe in the universe settings Direct divisor of the total flight time
FlyTime bonus Player-specific multiplier (e.g. from achievements), USER['factor']['FlyTime'] Further shortens flight time, if present
Minimum flight time Fixed constant MIN_FLEET_TIME = 5 seconds Lower bound, independent of all other factors (e.g. for very short distances)

Universe-Specific Peculiarities

The distance calculation itself depends on system_distance, system_distance_factor, galaxy_distance_factor and max_system/ max_galaxy — these values are **not** uniform across all universes, but part of the respective universe configuration (verified live from the DB):

Universe max_system system_distance system_distance_factor galaxy_distance_factor
Universe 1 / 2 / 3 / 4 / 5 / 6 400 2,700 95 20,000
Universe 7 200 1,350 47 20,000

Universe 7 has noticeably shortened systems: both the number of systems per galaxy (max_system: 200 instead of 400) and the distance constants (system_distance/system_distance_factor: each almost exactly halved) are reduced compared to all other universes. As a result, in-system distances in Universe 7 are structurally shorter than elsewhere — for the same system difference, flight time in Universe 7 is noticeably lower. For all other universe settings (fleet_speed, uni_type, galaxy_type), all universes are currently configured identically (as of the live DB).

See also Missile Flight Time for the separate, simpler formula for interceptor/interplanetary missiles, and Fuel Consumption for the fuel usage coupled with flight time.