NF
FAHAD.SYSTEMS
Game Development
Project #01

Aetherfall: High-Performance Flight Physics & Atmospheric Engine

Delivered 120 FPS deterministic aerodynamics and custom volumetric cloud shading on PC & console.

NDA & Confidentiality Notice:Proprietary aerodynamic coefficient lookup tables have been redacted under NDA.
Specification & Technical Metadata
Topic / DomainGame Development
RoleLead Systems & Graphics Architect
Duration14 months
Year2024
StatusProduction
Stack5 Core Techs
Tech Stack:Unity 6C#HLSLDirectX 12FMOD Studio
Aetherfall fighter aircraft cruising through procedural volumetric cloudscape
EXPAND

Aetherfall fighter aircraft cruising through procedural volumetric cloudscape

01 / The Challenge & Constraints

Modern flight simulators often sacrifice deterministic multiplayer synchronization for aerodynamic complexity. In Aetherfall, the requirement was uncompromised: simulate real-time lift, drag polar equations, and supersonic shockwave displacement for up to 32 players in a 64km³ volume—all while sustaining a rock-solid 120 FPS framerate with zero garbage collection allocations in the hot loop.

Standard Unity Rigidbody physics could not sustain 32 concurrent aerodynamic aircraft with multi-wing chord calculations without dropping below 45 FPS on base hardware.

Production Metrics & Constraints

120 FPS
Target Framerate
Locked on 99.8% frames
0 B/frame
Hot-Loop Allocations
Pure unmanaged memory
64 km³
World Dimensions
Origin-shifting coordinates
60 Hz
Multiplayer Tick Rate
Deterministic client rollback

02 / Custom Aerodynamic Solver Architecture

We completely bypassed the default PhysX pipeline and built a native unmanaged aerodynamic solver utilizing the Unity Job System and Burst Compiler. Each aircraft is modeled as an interconnected tree of aerodynamic lifting surfaces (wings, canards, elevators, vertical stabilizers, and fuselage camber).

By transforming aerodynamic coefficients into SIMD-friendly vector structs (using Unity.Mathematics.float4 and float8), the solver calculates Reynolds numbers, angle-of-attack induced drag, and ground effect cushions in under 0.32 milliseconds per tick across all 32 aircraft combined.

Simulation & Rollback Architecture

SYSTEM TOPOLOGY
Rendering architectural SVG topology...

Entity Component & Memory Layout

DATABASE ER SCHEMA
Rendering architectural SVG topology...

Burst-Compiled Lifting Line Calculation

csharp
[BurstCompile(FloatMode = FloatMode.Fast, FloatPrecision = FloatPrecision.Standard, OptimizeFor = OptimizeFor.Performance)]
public struct LiftDragEvaluationJob : IJobParallelFor
{
    [ReadOnly] public NativeArray<WingSurfaceData> Surfaces;
    [ReadOnly] public NativeArray<AircraftKinematics> Kinematics;
    [WriteOnly] public NativeArray<AerodynamicForceOutput> Forces;

    public void Execute(int index)
    {
        var surface = Surfaces[index];
        var state = Kinematics[surface.AircraftIndex];
        
        // Relative airspeed in chord local space
        float3 localAirVelocity = state.Velocity - state.WindVector;
        float speedSq = math.lengthsq(localAirVelocity);
        if (speedSq < 0.001f) return;

        float dynamicPressure = 0.5f * state.AirDensity * speedSq;
        float alpha = math.atan2(-localAirVelocity.y, localAirVelocity.z); // Angle of Attack

        // Non-linear stall curve interpolation
        float cl = math.sin(2f * alpha) * surface.LiftSlopeFactor;
        float cd = surface.ZeroLiftDrag + (cl * cl) / (math.PI * surface.AspectRatio * surface.OswaldEfficiency);

        float3 liftDir = math.normalize(math.cross(math.cross(localAirVelocity, surface.SpanAxis), localAirVelocity));
        float3 dragDir = -math.normalize(localAirVelocity);

        Forces[index] = new AerodynamicForceOutput {
            ForceVector = (liftDir * cl + dragDir * cd) * dynamicPressure * surface.Area,
            ApplicationPoint = surface.CenterOfPressureWorld
        };
    }
}

03 / Volumetric Raymarched Atmospheric Shading

To deliver visceral immersion without killing the GPU budget, we implemented a custom single-pass raymarching compute shader running at half-resolution with temporal reprojection. Optical depth is sampled through a 3D Perlin-Worley noise texture, with Henyey-Greenstein phase scattering providing blinding forward silver-lining highlights when banking towards the sun.

"The flight dynamics in Aetherfall feel razor sharp. You feel the bite of the air as you pull high-G turns above the cloud deck."

— Technical Director, Polygon Arcade

04 / Hard Problems: Large-Scale Coordinate Drift

When navigating across a 64 kilometer boundary, 32-bit single-precision floating point numbers begin losing sub-millimeter precision, causing micro-jitter in camera position and cockpit instrument dials. We solved this with a hierarchical Floating Origin System: whenever the camera strays more than 2,000 meters from world (0,0,0), the entire scene graph performs a seamless world-space translation. Rigidbodies, particle origins, and physics colliders update in a single sync barrier with zero visible hitching.

05 / Key Takeaways & What I'd Do Differently

While the Burst-compiled physics solver yielded astonishing performance, developing custom spatial debugging visualizers early in the prototyping phase would have saved at least three weeks of tuning. For future projects, I would integrate continuous automated physics telemetry in CI to catch regression in aerodynamic lift curves before commits merge.