I am planning to develop client-server RPG, but I get stuck in accurate attack. Think about under situation:
1. Player1 at position A in server.
2. After 100ms, Player2 see Player1 at position A, but Player1 moved to position B in server side.
3. Player2 attacks Palyer1 at position A.
4. After 100ms again. Server receives attack packet, But Player2 moved to position C, if Player2 attacks Player1 at current position C, the hit will always miss.
I need estimate attack time:
Command Execution Time = Current Server Time - Packet Latency - Client View Interpolation
This formula from:
But how can I get Packet Latency and Client View Interpolation?
I read the unity network demo of TPS-Auth. I think Client View Interpolation should be equal to fixed time + Client Latency.( GraduallyUpdateState.cs m_InterpolationBackTime property)
jxwnhj0717Member Since 22 Aug 2012
Offline Last Active Nov 03 2012 08:17 PM