AI Command Lab // Flight Simulator
201A: The Autopilot
Initial AI Output (Fragile)
// AI-Generated Code: Unstable Speed
void Update() {
// Audit Fail: If the game runs at 100 FPS,
// this moves the drone 500 meters per second!
transform.Translate(Vector3.forward * 5);
}
Initial AI Prompt
"You ask the AI: "Move the drone forward by 5 meters per second.""
Pilot Comm Link
Mission Objective: A skilled Architect directs the AI to Normalize Time. You command: "Multiply the movement vector by Time.deltaTime to ensure consistent speed across all devices."
Optimized Protocol
// Corrected: Smooth and Consistent
void Update() {
// Now moves exactly 5 meters per second, regardless of FPS.
transform.Translate(Vector3.forward * 5 * Time.deltaTime);
}