SOURCE / PINNED RELEASE
Made of little things.
Poly Dogfight
- Release
- b8511ee374e3…
- Author-recorded commit
- 5579434b9d8b…
- License
- LICENSE
- Author’s source reference
- nostr://npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr/wss%3A%2F%2Fgit.napplet.soy%2F/n-44f63e5422b
Archive hash verified: bcadd2430d8ea2bc…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
/** World scale and flight tuning. Units are metres/seconds (gamified scale). */
export const WORLD_SEED = 7331;
/** Sea-level radius. At ~40 m altitude, full-throttle cruise circles the planet in about a minute. */
export const PLANET_RADIUS = 560;
export const GRAVITY = 9.8;
/** Fixed simulation step. */
export const SIM_HZ = 120;
export const FLIGHT = {
/** Lift/drag scale: ½ρS/m. */
aeroK: 0.01107,
liftSlope: 9.0,
/** Critical angle of attack (rad), ~15°. */
stallAoA: 0.262,
cd0: 0.06,
inducedK: 0.045,
sideForce: 0.6,
/** Propeller: thrust fades as airspeed approaches propMaxSpeed. */
staticThrust: 6.37,
propMaxSpeed: 110,
boostThrust: 6.5,
boostDrain: 0.28,
boostRecharge: 0.07,
/** Seconds to wait after the meter empties before boost can be used again. */
boostCooldown: 1.2,
throttleRate: 0.7,
/** Max commanded body rates (rad/s). */
maxPitchRate: 1.7,
maxRollRate: 2.8,
maxYawRate: 0.55,
/** Airspeed at which control surfaces reach full authority. */
authoritySpeed: 46,
/** Weathervane stability: nose rotates toward the relative wind. */
pitchStability: 5,
/** Hands-off vertical-speed damping (1/s). */
climbDamping: 0.35,
yawStability: 4,
/** Density scale height: air thins with altitude, giving a soft ceiling. */
densityScale: 220,
thinAirAltitude: 160,
cruiseSpeed: 62,
stallSpeed: 26,
/** Clearance from ground/water before a crash. */
crashClearance: 0.9,
respawnDelay: 5,
spawnAltitude: 95,
} as const;
/** Fixed forward guns. Unlimited ammunition; tracers are simulated as fast segments. */
export const GUNS = {
/** Seconds between rounds (the two guns alternate). */
interval: 0.09,
/** Maximum shot-time correction: five degrees, shared by every pilot. */
aimAssistAngle: 5 * Math.PI / 180,
muzzleSpeed: 300,
/** Seconds before a round falls away (~420 m range). */
life: 1.4,
} as const;
/**
* Battle damage, 0 (intact) to 1 (destroyed) per part. Wing damage rolls the
* plane toward the damaged side; tail damage trims the nose down. Any part at 1
* cripples the plane so it falls out of the sky instead of exploding.
*/
export const DAMAGE = {
perHitWing: 0.07,
perHitTail: 0.08,
/** Roll rate (rad/s) toward a fully damaged wing before it breaks. */
wingRoll: 1.3,
/** Lift lost per unit of wing damage. */
wingLift: 0.15,
/** Nose-down pitch rate (rad/s) at full tail damage before it breaks. */
tailPitch: 0.12,
/** Elevator authority lost at full tail damage. */
tailAuthority: 0.45,
extraDrag: 0.03,
/** Crippled: what's left of control and lift. */
crippledAuthority: 0.12,
crippledLift: 0.35,
crippledRoll: 2.4,
crippledPitch: 0.7,
} as const;
/**
* Heat-seeking rockets carried under the lower wings. They chase with a limited
* turn rate, so a hard bank-and-pull can shake one fired from behind; one that
* loses its target coasts round the planet at its altitude until it finds
* another, including the pilot who launched it.
*/
export const ROCKETS = {
capacity: 2,
/** Seconds to reload one rocket (one at a time). */
rechargeTime: 8,
/** Seconds between launches. */
launchCooldown: 2,
/** Damage dealt to the part struck: two hits on a part destroy it. */
damage: 0.5,
/** Extra speed over the launching plane's. */
launchKick: 15,
accel: 60,
speed: 120,
/** Maximum turn rate (rad/s). */
turnRate: 0.9,
/** Half-angle of the cone a target must be inside to gain a lock. */
seekerAngle: 25 * Math.PI / 180,
/** Half-angle of the cone that keeps an existing lock. */
trackAngle: 40 * Math.PI / 180,
lockRange: 320,
/** Seconds before a rocket can lock onto or hit its own launcher. */
ownerGrace: 4,
/** Seconds of flight, about one and a half laps of the planet. */
life: 45,
/** Added to every hit box (proximity of the rocket's body). */
radius: 0.5,
maxInFlight: 16,
} as const;
