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
0
74
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
120
How Do I Game Design?
thesecretlab
0
310
Swift Functional Programming
thesecretlab
0
2.6k
Open Data + Video Games = Win
thesecretlab
0
350
Watch This Face
thesecretlab
1
2.7k
The Mün and back - a Kerbal tale
thesecretlab
0
630
How Do I Game Design? (OSCON 2015)
thesecretlab
0
420
Cross-device, Cross-platform: Mobile Design Tutorial
thesecretlab
0
390
Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud
thesecretlab
0
360
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
210
Apache Iceberg V3 and migration to V3
tomtanaka
0
120
組織で育むオブザーバビリティ
ryota_hnk
0
160
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
530
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
Grafana:建立系統全知視角的捷徑
blueswen
0
320
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
Package Management Learnings from Homebrew
mikemcquaid
0
170
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
370
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
200
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Faster Mobile Websites
deanohume
310
31k
Visualization
eitanlees
150
17k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
150
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
51
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
54
Building the Perfect Custom Keyboard
takai
2
680
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
130
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
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