Tier 4
Series 305
305C: The RPC Radio
"A client cannot just reach into the Server and change things. That is cheating. Instead, the client must use the radio to ask permission. "Tower, requesting permission to fire." This is a Remote Procedure Call (RPC)."
The Concept: ServerRpc & ClientRpc
Functions that run on a different computer than the one calling them.
* **[ServerRpc]:** Client calls it -> Runs on Server ("I shot the gun").
* **[ClientRpc]:** Server calls it -> Runs on all Clients ("Play the gunshot sound").
* **[ServerRpc]:** Client calls it -> Runs on Server ("I shot the gun").
* **[ClientRpc]:** Server calls it -> Runs on all Clients ("Play the gunshot sound").
Red Flag Detected
The AI Trap: "The Silent Shot"
You ask the AI: "Fire the weapon when I click."
// AI-Generated Code: Local Only
void Fire() {
// Audit Fail: The bullet spawns on my screen.
// Nobody else sees the bullet.
Instantiate(bullet);
}
This is "Phantom Logic." Actions taken locally have no effect on the shared world.
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 Navigator's Correction
Corrective Protocol
// Corrected: Radio Request
[ServerRpc]
void RequestFireServerRpc() {
// This runs on the Server!
SpawnBullet();
}
Your Pilot Command
> A skilled Navigator directs the AI to use RPCs.