/* ShipWars Reality Constants & Defaults Notation legend: ms = milliseconds us = microseconds ru = real units -or- ShipWars units su = screen units (client-dependent, often in pixels) Unit conversion legend: 1.0 real unit = 1000 screen units The conversion of real units to known units is mediated by the ru_to_au (real units to astronomical units) coefficient. */ #ifndef REALITY_H #define REALITY_H /* * Cycle Lapse (in ms and us): * * Specifies the sleep time for the main loop. * * All velocity, speed, and other timmed calculations are based * on this value. * * Catchup time (time compensation) for speed should be multiplied * by the differance of this value, for example: * * time_compensation_coeff = cycle_delta_ms / SW_CYCLE_LAPSE_MS. */ #define SW_CYCLE_LAPSE_MS 16 #define SW_CYCLE_LAPSE_US 16000 /* * Sector Sizes (in real units): */ #define SW_SECTOR_SIZE_X_MIN -1024 #define SW_SECTOR_SIZE_X_MAX 1024 #define SW_SECTOR_SIZE_Y_MIN -1024 #define SW_SECTOR_SIZE_Y_MAX 1024 #define SW_SECTOR_SIZE_Z_MIN -1024 #define SW_SECTOR_SIZE_Z_MAX 1024 /* * Frequency ranges (in kHz): * * (Note: Frequency compare resolution is 2 decimal places). */ #define SW_FREQ_MIN 1.00 #define SW_FREQ_MAX 900.00 /* * Default Antimatter Low Warning: */ #define SW_DEF_ANTIMATTER_LOW_WARNING 20 /* * Default Asteroid Field Damage Interval (in ms): */ #define SW_DEF_ASTEROID_FIELD_DAMAGE_INT 3500 /* * Default Asteroid Field Damage Rate: * * hp -= asteroid_field_damage_rate * size_ru * * velocity_coeff / cycle */ #define SW_DEF_ASTEROID_FIELD_DAMAGE_RATE 25.0 /* * Default Auto Destruct Damage Range (in real units): */ #define SW_DEF_AUTO_DESTRUCT_DAMAGE_RANGE 2.25 /* * Default Cloak Antimatter Consumption Rate: * * antimatter -= size_ru * cloak_antimatter_rate / cycle */ #define SW_DEF_CLOAK_ANTIMATTER_RATE 0.2 /* * Default Com Message & Hail Range (in real units): */ #define SW_DEF_COM_RANGE 100.0 /* * Default Damage Control Repair Rate: * * hp += damage_control_rate * power * power_purity / * cycle */ #define SW_DEF_DAMAGE_CONTROL_RATE 0.00003 /* * Default Disarmed Weapon Life Span (in ms): * * This value can also be: * * 0 = infinate * 1 = no change (use weapon's current life span) */ #define SW_DEF_DISARMED_WEAPON_LIFESPAN 300000 /* * Default Engine Antimatter Consumption Rate: * * antimatter -= engine_antimatter_rate * throttle / cycle */ #define SW_DEF_ENGINE_ANTIMATTER_RATE 0.001 /* * Default No Antimatter Thrust Coeff: */ #define SW_DEF_NO_ANTIMATTER_THRUST_COEFF 0.05f /* * Default On Fire Hit Points Coefficient (0.0 to 1.0): */ #define SW_DEF_ON_FIRE_HP_COEFF 0.3 /* * Default Tractor Beam Antimatter Consumption Rate: * * antimatter -= size_ru * tractor_beam_antimatter_rate / cycle */ #define SW_DEF_TRACTOR_BEAM_ANTIMATTER_RATE 0.3 /* * Default Tractor Beam Range (in real units): */ #define SW_DEF_TRACTOR_BEAM_RANGE 1.75 /* * Default Transporter Range (in real units): */ #define SW_DEF_TRANSPORTER_RANGE 1.0 /* * Shield Visibility Interval (in ms): * * The interval in which the shield is visible when it is raised, * frequency changes, or when it is hit by weapons fire. */ #define SW_SHIELD_VISIBILITY_INTERVAL 3000 /* * Nebula Visibility Coefficient: */ #define SW_VISIBILITY_NEBULA 0.15 /* * Asteroid Field Visibility Coefficient: */ #define SW_VISIBILITY_ASTEROID_FIELD 0.60 /* * Wormhole Enter Delay (in ms): * * The delay before you can enter another wormhole again. */ #define SW_WORMHOLE_ENTER_DELAY 5000 /* * Maximum switchable throttle power: * * Cannot switch throttle to reverse if throttle setting is * greater than this value. */ #define THROTTLE_MAX_SWITCH 0.3 /* * PI Constants: */ #ifndef PI # define PI 3.141592654 #endif #ifndef TWOPI # define TWOPI 6.283185307 #endif #ifndef HALFPI # define HALFPI 1.570796327 #endif /* * Default real units to astronomical units coeff: * * Must be greater than 0! * * 1 AU = 149,600,000 km */ #define SW_DEF_RU_TO_AU 0.1 #endif /* REALITY_H */