Testing the Netcode
You do not need two machines to test the netcode: AFT can run the full rollback path inside one editor.
Sync Test (determinism)
Click the Sync Test preset of the Match Tester and play normally. Every frame is rolled back
SyncTestFrames frames (7 by default, FAFTMatchConfig.Net) and simulated again, and the checksums of both runs are compared. Any
non deterministic code (a float, an uninitialized field, an unstable iteration order, a world query) is reported in the log on
the frame it happens.
Run a Sync Test match after every gameplay change, and after adding a frame event, a state condition or a fighter.
Rollback Loopback (netcode)
Click the Rollback Loopback preset: two rollback peers run in the same process, connected by a virtual network with simulated conditions. You play one side, the second peer plays the other side.
Setting (FAFTMatchConfig.Net) | Preset value | Description |
|---|---|---|
SimulatedLatencyMs | 50 | Latency |
SimulatedJitterMs | 10 | Jitter (±) |
SimulatedPacketLossPercent | 2 | Packet loss |
FrameDelay | 1 | Input delay frames |
Watch the log and the network stats (GetNetworkStats, GetLastRollbackFrames): rollbacks happen, the match must stay smooth and
the checksums must match.
The training mode works in both modes, so you can check combos and frame data under rollback.
Two clients in the editor
The Local backend runs the lobby in process: play in the editor with 2 players (Play > Number of Players = 2), open the
Online mode in both windows, choose DEV: Local Test Host in one and DEV: Local Test Search in the other (or set
Lobby Backend to Local and use Host Match / Find Match).
Two machines on a LAN
- Keep AFT Game > Online > Lobby Backend on LAN (the default) and
DefaultPlatformService=Nullin[OnlineSubsystem]. - Package or launch the game on both machines.
- Main menu > Online: one player chooses Host Match, the other Find Match and joins the lobby. In development builds, DEV: Direct Connect joins the host address directly.
The rollback sessions use the UDP port AFT Game > Online > Game Port (7000, with up to 16 retries on the next ports): allow it in the firewall.
Automation tests
Tools > Session Frontend > Automation, filter on AFT:
| Test | Checks |
|---|---|
AFT.Rollback.MessageRoundTrip | Every protocol message serializes and parses back identically. |
AFT.Rollback.SyncTestDeterministic | A sync test session runs without checksum mismatch. |
AFT.Rollback.P2PLoopbackConverges | Two peers with loss and jitter end on identical checksums. |
AFT.Core.Simulation.Determinism | Same inputs, same state, frame after frame. |
See Debugging and Tests for the whole list.