miuradio
How It SpawnsThe tricks inside famous games, shown running.›

How It Spawns

How do you hit a ball that's on a server?

Story

Online, the real Rocket League match runs on the server, 120 ticks a second, and your buttons take time to get there. Most games draw your own car ahead, where you steer, but the ball where the server last said. That's old information, so you see a hit the server never saw. In Psyonix's own GDC talk (2018), Jared Cone calls it two different timelines. Rocket League's answer: your game predicts everything, "their own vehicle every other vehicle and the ball". Every frame it records your input and where everything ended up, with a frame number. When the server's state for an old frame disagrees, it moves everything back to that frame and runs the frames since again. Same inputs, same physics, same result. Now the ball is ahead too, on your car's timeline, and your hit counts. At a 200 millisecond ping, that's 24 physics frames run at once.

Your screen plays the ball a little in the future.

The stadium, the cars, the lag and the slow motion in this film are our own simplified version, built in code.

Which game's netcode should we cut open next?

Sources: Jared Cone (Psyonix), "It IS Rocket Science! The Physics of Rocket League Detailed", GDC 2018.
Unofficial. Not affiliated with or endorsed by Psyonix or Epic Games.
Sounds and music: our own, made in code.

Follow

TikTok@howitspawns›Instagram@howitspawns›YouTube@howitspawns›X@howitspawns›
Link copied