Jump to content

Distance

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

Distance

The distance between two coordinates determines flight time and fuel consumption (see Flight Time, Fuel Consumption). Calculated from src/Core/FleetFunctions.php (getTargetDistance()), factors come from the universe settings.

Different Galaxy

Galaxy Type Formula
Circular (uni_type 2) galaxy_distance_factor
Linear (uni_type 1) min(|Galaxy1-Galaxy2|, max_galaxy - |Galaxy1-Galaxy2|) * galaxy_distance_factor
Standard |Galaxy1-Galaxy2| * galaxy_distance_factor

Same Galaxy, Different System

Galaxy Type Formula
Circular (galaxy_type 2) system_distance_factor + system_distance
Linear (galaxy_type 1) min(|System1-System2|, max_system - |System1-System2|) * system_distance_factor + system_distance
Standard |System1-System2| * system_distance_factor + system_distance

Same System, Different Planet

|Position1-Position2| * planet_distance_factor + planet_distance

Same Planet (e.g. planet↔moon)

Fixed distance: 5

All factors (galaxy_distance_factor, system_distance_factor, system_distance, planet_distance_factor, planet_distance, max_galaxy, max_system, uni_type, galaxy_type) are configurable per universe — see the respective universe page under "Additional Settings".