Yağız Selek
All projects

NetAim · Case study

Responsive aim without moving authority.

I extended a two-player Unity course starter so the owning player could see aim feedback immediately and a remote observer could see smoother turns during latency and jitter.

Conceptual diagram of NetAim input and turret response
Conceptual diagram, not gameplay footage.

The baseline

The starter already provided authoritative movement and combat. Owners submitted intent, the server simulated, and clients received replicated state. Turret yaw was applied directly to the display, so the owning client felt delayed aim and remote rotations could arrive in visible jumps.

Separate presentation from simulation

I added an immediate, visual-only turret override for the owning client. For remote views I compared direct application, frame-rate-independent exponential interpolation, and SmoothDampAngle. The server still determines authoritative aim and firing; the smoothed remote angle does not direct projectiles.

Unity host/client test · Remote display

Largest observed yaw change per frame

Direct replication
179.08°
Exponential interpolation
46.96°
SmoothDampAngle
17.52°
One representative 10-second run per mode at 100 ms configured delay and 50 ms jitter. Input trajectories and frame rates varied. This is a comparison of visible angle changes in those runs, not end-to-end latency or bandwidth.

Architecture sketch

One input, two visual paths

  1. Owning clientRender local aim immediately and send intent.
  2. ServerValidate and apply canonical state.
  3. Remote clientSmooth the displayed angle from replicated updates.
Only presentation is predicted or smoothed. The server remains the source of truth for gameplay.

How I tested it

I used a two-instance host/client setup with Unity’s network simulator and compared representative 10-second runs at 100 ms configured delay and 50 ms jitter, with no configured packet loss. I logged absolute frame-to-frame yaw from the remote view. I also compared client-requested and server-observed shot yaw during rapid turns.

Decision and trade-offs

SmoothDampAngle at 0.1 seconds gave the smallest observed peak jump, so I chose it for remote presentation. Manual aim trajectories and frame rates varied. This was an engineering comparison, not a controlled latency or performance benchmark. I left the optional turret replication-rate cap off: the profiler evidence did not establish bandwidth savings, and visible aim and shot direction could diverge more during fast turns.

What I would test next

Replay the same recorded mouse trajectory at a fixed render rate, report both smoothness and catch-up delay, and compare packet captures under matched conditions. Those tests would make the responsiveness trade-off easier to quantify.

References

Implementation evidence