This document provides recommended test scenarios to evaluate the impact of different network conditions and features on movement accuracy.
Each test should run for at least 1-2 minutes to collect meaningful statistics (~6-12 metric logs at 10-second intervals).
The position error metric measures distance in game units between:
- Ideal position: Where player would be with instant local input
- Actual position: Where player is with networked updates
python main.pyExpected result: Very low errors (avg < 0.1)
- Shows effectiveness of prediction+reconciliation+interpolation
- Baseline for all other comparisons
python main.py --no-reconciliation --no-self-interpolation --no-other-interpolationExpected result: Low errors with smooth movement
- Demonstrates prediction effectiveness
- Shows why reconciliation is important
python main.py --no-prediction --no-reconciliationExpected result: Errors increase significantly
- Shows impact of prediction on local feedback
- Most conservative approach
python main.py --no-prediction --no-self-interpolation --no-other-interpolationExpected result: Delayed but accurate movement
- Server corrections applied
- No client prediction
python main.py --input-delay 50Expected result: avg error ~0.2-0.4
- Noticeable but playable
- Still relatively smooth with interpolation
python main.py --input-delay 100Expected result: avg error ~0.4-0.8
- More noticeable drift
- Interpolation becomes important
- Movement feels slightly sluggish
python main.py --input-delay 200Expected result: avg error ~0.8-1.5
- Significant position drift
- Prediction helps but not perfect
- Noticeable gameplay impact
python main.py --input-delay 500Expected result: avg error ~2.0-4.0+
- Extreme drift visible in position
- Movement feels very delayed
- This is typical of intercontinental play without optimization
python main.py --input-delay 100 --no-predictionExpected result: avg error increases by ~2-3x compared to test 6
- Shows prediction is crucial for latency mitigation
- Movement appears delayed/laggy
python main.py --input-delay 100 --no-reconciliationExpected result: Similar to test 6
- Reconciliation has less immediate impact than prediction
- May see position "snaps" less frequently
python main.py --packet-loss 5Expected result: avg error ~0.1-0.3
- Minimal impact with redundancy
- Occasional small jumps
- Mostly imperceptible
python main.py --packet-loss 10Expected result: avg error ~0.3-0.6
- More frequent small corrections
- Visible but not game-breaking
python main.py --packet-loss 20Expected result: avg error ~0.8-1.5+
- Frequent corrections visible
- Movement becomes unreliable
- Significant gameplay impact
python main.py --packet-loss 10 --no-predictionExpected result: avg error increases significantly
- Every lost packet causes visible jump
- Movement very jerky
python main.py --input-delay 100 --packet-loss 5Expected result: avg error ~0.4-0.8
- Typical mobile network scenario
- Prediction+reconciliation both important
python main.py --input-delay 200 --packet-loss 10Expected result: avg error ~1.2-2.0
- Poor WiFi conditions
- Notable gameplay impact
- Shows need for optimization
python main.py --input-delay 300 --packet-loss 3Expected result: avg error ~1.5-2.5
- Intercontinental play
- High latency dominant factor
- Shows why regional servers help
python main.py --input-delay 500 --packet-loss 10Expected result: avg error 3.0+
- Unplayable scenario
- Shows limits of client prediction
- Would require different architecture
Compare:
# With interpolation
python main.py --input-delay 100
# Without interpolation
python main.py --input-delay 100 --no-self-interpolationObservation: Interpolation makes movement smoother, reduces perception of discrete ticks
Compare:
# With prediction
python main.py --input-delay 100
# Without prediction
python main.py --input-delay 100 --no-predictionObservation: Prediction eliminates perceptible latency in movement
Compare:
# With reconciliation
python main.py --input-delay 100
# Without reconciliation
python main.py --input-delay 100 --no-reconciliationObservation: Reconciliation handles position corrections from server
| Avg Error | P95 | Playability | Notes |
|---|---|---|---|
| < 0.1 | < 0.2 | Excellent | Imperceptible latency |
| 0.1-0.3 | 0.3-0.6 | Very Good | Smooth, responsive |
| 0.3-0.5 | 0.6-1.0 | Good | Noticeable but playable |
| 0.5-1.0 | 1.0-1.5 | Fair | Noticeable drift |
| 1.0-2.0 | 1.5-3.0 | Poor | Significant drift |
| > 2.0 | > 3.0 | Unplayable | Major issues |
-
Average Error: Overall accuracy
- Lower is better
- Increases with latency
- Reduced by prediction/reconciliation
-
Standard Deviation: Consistency
- Lower = more consistent behavior
- Packet loss causes spikes (higher stddev)
- Good interpolation reduces stddev
-
P95/P99: Worst-case accuracy
- Shows impact of network variability
- High values = occasional large jumps
- Important for consistency perception
-
Max Error: Peak drift
- Shows worst frame
- Can indicate lost packet effects
- Prediction prevents extreme peaks
Use this table to track results across different conditions:
Condition | Avg Error | StdDev | P95 | Max | Notes
-----------------------------------|-----------|--------|-----|-----|-------
No simulation (baseline) | | | | |
Pred only | | | | |
No prediction | | | | |
100ms delay | | | | |
100ms delay, no prediction | | | | |
200ms delay | | | | |
5% packet loss | | | | |
10% packet loss | | | | |
100ms delay + 5% loss | | | | |
- Minimal: ~0.1% CPU for position tracking
- Memory: ~800 bytes per logging interval (cleared after log)
- No FPS impact: Background thread handles networking
- No server changes: Metrics collected only on client
- No bandwidth increase: Just stores position error locally
-
Compare UDP vs WebSocket mode:
# UDP (default) python main.py --input-delay 100 # WebSocket python main.py --protocol websocket --input-delay 100
-
Compare with other players nearby:
- Run multiple clients
- See if network congestion affects accuracy
- More players = more updates = more network traffic
-
Test with different server locations:
# Local server (fast) python main.py --server localhost # Remote server (slow) python main.py --server distant-server.com
For each test scenario:
-
Note the configuration:
- Feature flags enabled/disabled
- Network simulation parameters
- Protocol (UDP/WebSocket)
-
Observe the metrics output:
- Average error
- All percentiles
- Standard deviation
-
Subjective observation:
- Does movement feel responsive?
- Visible stutters or jumps?
- Can you play effectively?
-
Document patterns:
- Which features have most impact?
- Where is the playability threshold?
- What's your "good enough" error level?
After gathering baseline metrics:
- Identify critical thresholds: At what error does gameplay suffer?
- Test optimization ideas: Experiment with different parameters
- Compare with remote play: See real network impact
- Export for analysis: Consider CSV export for detailed comparison
See IDEAL_POSITION_TRACKER.md for data analysis tools and future enhancements.