Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
FSCKING LAG
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Secret Lab
September 01, 2015
Programming
82
0
Share
FSCKING LAG
A lightning talk on multiplayer networking that we gave at /dev/world/2015.
Secret Lab
September 01, 2015
More Decks by Secret Lab
See All by Secret Lab
Yarn Spinner - Write the Docs Portland 2016 Lightning Talk
thesecretlab
0
130
How Do I Game Design?
thesecretlab
0
320
Swift Functional Programming
thesecretlab
0
2.8k
Open Data + Video Games = Win
thesecretlab
0
360
Watch This Face
thesecretlab
1
2.8k
The Mün and back - a Kerbal tale
thesecretlab
0
650
How Do I Game Design? (OSCON 2015)
thesecretlab
0
440
Cross-device, Cross-platform: Mobile Design Tutorial
thesecretlab
0
400
Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud
thesecretlab
0
370
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
Vibe NLP for Applied NLP
inesmontani
PRO
0
470
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
実用!Hono RPC2026
yodaka
2
270
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
4
1.1k
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
170
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
790
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
160
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
290
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
350
Kingdom of the Machine
yui_knk
2
880
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
340
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
Are puppies a ranking factor?
jonoalderson
1
3.3k
Technical Leadership for Architectural Decision Making
baasie
3
340
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Unsuck your backbone
ammeep
672
58k
Typedesign – Prime Four
hannesfritz
42
3k
Transcript
None
FSCKING LAG
Video Games!
Multi-player video games!
Server
Server Client Client Client
Server Client Client Client
Server Client
Server Client “I just killed player 1”
Server Client “I just killed player 1” “ok”
Server Client “I just killed player 1” “ok” BAD
Server Client “I pressed these buttons” “This is where things
are”
Server Client “I pressed these buttons” “This is where things
are” BETTER
PROBLEM
1 2 Lag = 1 second Lag = 0.1 seconds
1 2 Shoots! Runs! FROM PLAYER 1’S PERSPECTIVE:
Server Player 1 Player 2
Server Player 1 Player 2 “I’m shooting!” (1 second ago)
Server Player 1 Player 2 “I’m shooting!” (1 second ago)
“I’m running around the corner!” (0.1 second ago)
Server Player 1 has shot, and Player 2 is around
the corner. Player 1’s shot missed.
Server Player 1 Player 2 “Player 2 is now around
the corner. Player 1 shot, but missed.”
Counter-Strike
Server Player 1 shot, and at the time, they were
aiming at Player 2. Their should would have hit.
Server Player 1 Player 2 “Player 1 shot Player 2.”
Server Player 1 Player 2 “Player 1 shot Player 2.”
“Oh, and Player 2 still ran around the corner. lol.”
Server Player 1 Player 2 “Player 1 shot Player 2.”
“Oh, and Player 2 still ran around the corner. lol.” wtf
Age of Empires
1500 Archers on a 28.8: Network Programming in Age of
Empires and Beyond Mark Terrano, Paul Bettner
PROBLEM: 1500 archers Each one has a position Each one
is moving
Each position is about 4 bytes each
4 bytes ✕ 1500 = 6000 bytes
6000 bytes ✕ 30 frames/sec = 175 kB/s
SOLUTION:
DON’T SYNC STATE
SYNC PLAYER INTENT
Client Client Client
Client Client Client “I told my archers to move.”
Client Client Client “I told my archers to move.” “I
told a villager to gather wood.”
Client Client Client Wait for everyone to finish this frame….
Client Client Client Archers are moving, and the villager is
gathering wood.
NOT PERFECT
RUNS AT THE SLOWEST PLAYER
DESYNCS
@thesecretlab rocketboxgame.tumblr.com