Shady Shipping Wiki Underdog Studios
Under the hood

Networking

For the team, networking decides three things: whether a player's own car feels instant, whether a ram or a net catch looks the same on every screen, and whether a session can be hosted at all from a university lab. This chapter covers the model chosen, the settings that make it work, exactly what is sent, and what real online tests found.

Choosing the network model

Shady Shipping is a physics-driven car chase for up to five players. Contact between cars decides the match, so every screen must agree on it. Four established models were compared.

ModelStrengthWeaknessVerdict
Deterministic lockstepOnly inputs sent; tiny bandwidthNeeds identical physics on every PC; Chaos is notRejected
Server authority with snapshot interpolationSmooth, consistent remote carsRemote cars shown slightly in the past, so rams missKept for traffic only
Server authority with prediction and resimulationOwn car instant; server decides outcomesCorrections can show as a small hopChosen
Client-authoritative movementSimple and responsiveCheating; each side believes its own crashRejected

The chosen model works like this. Each player's game runs the car physics slightly ahead of the server, so their own car reacts the moment they press a key. Other players' cars are moved forward from the last input received for them, easing off towards no input. When the server's version of a car disagrees with the client's, the client rewinds to that physics frame and replays every frame since with the corrected data. That replay is called resimulation. Chaos, Unreal's physics engine, supports this natively in UE 5.8.

Because remote cars are predicted forward instead of shown in the past, a cop and the van meet at roughly the same moment on every screen. That suits the net and the arrest ring. The cost is that a sudden brake or swerve by a remote player makes the prediction briefly wrong, and the correction can show as a small hop that grows with latency (the delay for a message to reach the server). Server-side rewind, as used for instant-hit shots in shooters, was rejected because it is far more complex for vehicle physics.

Engine settings

These settings are part of the architecture, not preferences. Each one is in the project's config files and fixed a real failure.

SettingValueWhy
Physics predictionOn, with history capture, up to 1,000 msTurns on resimulation; covers the worst latency tested
Async physicsOn, fixed step 0.016667 s (60 Hz), no substeppingResimulation needs a fixed step
Player car replication modeResimulationOwn and remote cars predicted
p.Vehicle.DisableConstraintSuspension1Constraint suspension crashed online in the prototype
Net.IsPushModelEnabled1Only values marked as changed are sent
NetServerMaxTickRate60Server sends at the physics rate
Client rate and connection speeds60,000 bytes a secondRoom for the per-player budget plus headroom
Connection timeouts while joining600 sPlayers wait while the server loads the city
LocalPlayerClassNameUSSLocalPlayerEvery join carries the player's profile id
Player car update rate30 a second, always relevantCars must never pop in at chase speed

The fixed physics step matters beyond networking. Anything that pushes a car (nitro, the net's rope, burst tyres, a garage driving the van) runs inside FSSArcadeVehicleSimulation on the physics thread. A force added from ordinary game code would not be replayed during resimulation, so the car would fight its own corrections.

Replication rules

Every replicated value follows these rules.

RuleHow it is applied
The server owns outcomesPickups, cash, damage, wrecks, catches, arrests and strikes are decided only on the server
Clients predict their own carInput is applied at once, recorded and replayed if the server disagrees
Send state, not ticksClocks and timers are sent once as a server end time; every PC counts down itself
Send a plan, not a streamDrives, the name wheel and cutscenes send a start time and a seed; each PC plays them
Reliable for rules, unreliable for flavourGame-changing messages are reliable; cash pops and pedal effects are not
Private data goes to its owner onlyThe courier's job and each player's ability picks are owner-only

Effect windows

Police tools change how a car drives, so they must land on the same physics frame everywhere. The server stores each effect on the car as an effect window: which effect, its strength and the server physics frames it covers. Every machine applies it on those frames, and a machine that receives it late rewinds to its first frame.

EffectCaused by
Snare and RopeThe bumper net
TyresA spike strip
SlowLights Out
WreckThe van or a cop reaching 0 HP
DriveA repair garage or the round's drive-in
DragTesting

Engine physics actions were tried first. At 150 ms latency only 1 of 7, then 8 of 13, applied, because an action arriving after its frame was stored was never used. Effect windows started on the server's frame on every machine at 0 to 200 ms with up to 5% packet loss, with the largest correction 15 cm. Nitro rides inside the car's own recorded input, in its unused yaw channel, so it replays with everything else.

What is replicated

WhatHow it travelsWho receives it
Match phase, strikes, starsProperties on ASSGameState, push modelEveryone
Round cash and walletProperties on ASSPlayerStateEveryone
Courier's jobProperty on USSParcelComponentCourier only
Cargo shown on the vanLoaded and doors-open flags only, never the tierEveryone
Heat (pings, sightings, last seen)Properties on USSHeatComponentEveryone; drawn only on police radars
Arrest progressStart value, time and rate on USSArrestComponentEveryone
Drop-in stage and zonesProperties on USSDropInComponentEveryone
Ability picksOwner-only property on USSAbilityComponentThat player
Ability timers (cloak, smoke, drone, EMP)End times on each ability's componentEveryone
Car hit points and recent hitsProperty on USSHealthComponentEveryone
Fitted garage itemsProperty on USSVehicleLookComponentEveryone
Tuning tablesCSV text on ASSTuningReplicatorEveryone

Not replicated at all

Car sounds, skid marks, smoke, damage looks, cameras, the radar, route arrows, ability shakes and rumble, and the drive-in film are all worked out on each PC. The driver sends throttle, brake and boost state at most 15 times a second so other PCs can draw lights and flames; everything else comes from replicated movement.

RPCs

An RPC (remote procedure call) is a one-off message asking another machine to do something (Epic Games, n.d.d). Every server RPC is checked before the server acts on it.

RPCDirectionReliableServer checks
ServerPutNetOut and other ability pressesClient to serverYesRight side; caller picked that ability; it is ready
ServerSetDitchHeldCourier to serverYesOnly counts while a parcel is on board
ServerPick (drop zone)Courier to serverYesChoosing stage, and a real zone
ServerLoadedInClient to serverYesSent once the PC runs smoothly after loading
ServerSetReady, ServerBuyOrFit, ServerSetAbilitiesClient to serverYesLobby phase, side, ownership and wallet
ServerSetHorn, ServerSetLampsClient to serverYesCosmetic state for that car only
ServerSetDriverFXClient to serverNoPedal state for effects only
ClientLoaded, ClientDelivered, ClientDitched, ClientMadeHotServer to courierYesFeedback; state already replicated
ClientRoundResultsServer to each playerYesSent once at round end
ClientCashPopupServer to one playerNoCosmetic
ClientRefused, ClientRepairRefusedServer to one playerYesFeedback only

Round start and loading

The round start follows the same rule as everything else: the server decides, each screen shows it. Two problems found in testing shaped it.

ProblemFix
A slow PC stalls for seconds after loading and missed the drive-inEach PC sends ServerLoadedIn after 15 smooth frames; the server waits for all, up to 90 s
A late phase update left a screen stuck on the countdownEach screen ends the countdown from its own synced clock; measured within 0.25 s of the server

Information the police must not have

The design hides the van from the police except through their radar. In the code, the courier's job and cargo tier never reach a police PC, and the police radar only draws what USSHeatComponent sends. However, every player car is always relevant (sent to every player whatever the distance; Epic Games, n.d.e), so the van's exact position does reach police PCs, and a modified client could read it. The original design limited the van to cops within 150 m. That was dropped because cars past the engine's 150 m cut-off vanished from other players' screens, and with at most five cars the cost of sending all of them is small. The team accepts the cheating risk for a university prototype.