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
Secret Lab
September 01, 2015
Programming
0
58
FSCKING LAG
A lightning talk on multiplayer networking that we gave at /dev/world/2015.
Secret Lab
September 01, 2015
Tweet
Share
More Decks by Secret Lab
See All by Secret Lab
Yarn Spinner - Write the Docs Portland 2016 Lightning Talk
thesecretlab
0
110
How Do I Game Design?
thesecretlab
0
290
Swift Functional Programming
thesecretlab
0
2.5k
Open Data + Video Games = Win
thesecretlab
0
330
Watch This Face
thesecretlab
1
2.6k
The Mün and back - a Kerbal tale
thesecretlab
0
580
How Do I Game Design? (OSCON 2015)
thesecretlab
0
400
Cross-device, Cross-platform: Mobile Design Tutorial
thesecretlab
0
370
Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud
thesecretlab
0
330
Other Decks in Programming
See All in Programming
機能追加とリーダー業務の類似性
rinchoku
2
1.2k
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.3k
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
210
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
280
複雑なドメインに挑む.pdf
yukisakai1225
5
1.1k
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
220
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
120
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
230
Improving my own Ruby thereafter
sisshiki1969
1
160
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
19
11k
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
旅行プランAIエージェント開発の裏側
ippo012
2
890
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Navigating Team Friction
lara
189
15k
Scaling GitHub
holman
463
140k
Visualization
eitanlees
148
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
520
Bash Introduction
62gerente
615
210k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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