Reflex Training
Mechanic Sector
(Engage card to reveal Pilot's Intelligence.)
The Pilot's Audit
"The AI Trap: "The Instant Spawner""
// AI-Generated Code: GC Spike
void OnCollisionEnter(Collision c) {
// Audit Fail: Creates and Destroys a GameObject every frame.
AudioSource.PlayClipAtPoint(hitSound, c.point);
}
Protocol Analysis
This is "Memory Thrashing." It triggers the Garbage Collector during intense combat, causing frame drops.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Global Search""
// AI-Generated Code: Slow & Risky
void UpdateScore() {
// Audit Fail: GameObject.Find is incredibly slow.
// If two labels are named "Score", it might break.
GameObject.Find("ScoreLabel").GetComponent<Text>().text = "100";
}
Protocol Analysis
This is "Scene Scanning." It wastes CPU cycles searching the entire hierarchy every frame.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Frame-Rate Trap""
// 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);
}
Protocol Analysis
This is "Frame Rate Dependency." Your game speed is tied to the hardware speed. A fast computer will make the game unplayable.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Manual Mover""
// AI-Generated Code: The "Dumb" Walker
void Update() {
// Audit Fail: This moves in a straight line.
// It will walk through walls and get stuck on corners.
transform.position = Vector3.MoveTowards(transform.position,
player.position,
speed * Time.deltaTime);
}
Protocol Analysis
This is "Dumb Movement." The AI has no awareness of the environment. It will try to walk through a mountain to get to the player.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Constant Search""
// AI-Generated Code: Search Heavy
void Update() {
// Audit Fail: Asking Unity to find the Renderer 60 times a second.
GetComponent<Renderer>().material.color = Color.red;
}
Protocol Analysis
This is "Lookup Latency." It creates unnecessary work for the CPU. If you have 1000 objects doing this, your frame rate will collapse.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Coroutine Fade""
// AI-Generated Code: Spaghetti Logic
IEnumerator AlarmRoutine() {
musicSource.volume = 0.2f;
alarmSource.Play();
yield return new WaitForSeconds(3);
musicSource.volume = 1.0f;
}
Protocol Analysis
This is "State Conflict." If two alarms happen at once, the coroutines fight and the volume flickers.
Audit Complete
Scanning database for new traps