Tier 2 Series 104

104F: The Time Step

Pilot Record
Student Profile
"Graphics update as fast as possible (60-144hz). Physics updates at a fixed rate (50hz). An Engineer NEVER applies physics forces inside `Update()`, or the simulation will fluctuate based on frame rate."

The Concept: FixedUpdate

The clock-accurate loop for physics calculations.

* **Update:** Input, Graphics, Timers. (Variable DeltaTime).
* **FixedUpdate:** Rigidbody, Forces. (Fixed DeltaTime).
* **Rule:** Physics code lives in FixedUpdate.
Red Flag Detected

The AI Trap: "The Jitterbug"

You ask the AI: "Push the car forward."

// AI-Generated Code: Unstable Simulation
void Update() {
    // Audit Fail: Applying force in Update means fast PCs push harder
    // than slow PCs.
    rb.AddForce(transform.forward * 10);
}

This is "Frame-Rate Dependency." The game physics behave differently on a 30FPS laptop vs a 120FPS gaming rig.

Elite Telemetry

Research shows "Elite" teams achieve 15% faster lead times by keeping AI on a "very tight leash."

  • Small Batches Solving one problem at a time prevents logic drift.
  • Modular Design Localizing the "blast radius" of AI changes.
  • Tight Loops Rapid iteration with constant code review.

The Engineer's Correction

Corrective Protocol
// Corrected: Stable Simulation
void Update() { input = Input.GetAxis("Vertical"); }
void FixedUpdate() { rb.AddForce(fwd * input); }
Your Pilot Command
> Capstone Mission: Audit the audio system for performance and spatial accuracy.
Next Mission
The Physics Exam