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
310
Swift Functional Programming
thesecretlab
0
2.7k
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
430
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
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
230
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
KagglerがMixSeekを触ってみた
morim
0
370
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
140
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
170
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
130
存在論的プログラミング: 時間と存在を記述する
koriym
5
770
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.4k
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
140
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
200
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
240
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
How to Talk to Developers About Accessibility
jct
2
170
Paper Plane (Part 1)
katiecoart
PRO
0
6.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
97
A better future with KSS
kneath
240
18k
Balancing Empowerment & Direction
lara
5
1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
280
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Facilitating Awesome Meetings
lara
57
6.8k
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