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
76
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.7k
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
640
How Do I Game Design? (OSCON 2015)
thesecretlab
0
430
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時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
580
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
浮動小数の比較について
kishikawakatsumi
0
370
CSC307 Lecture 11
javiergs
PRO
0
580
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
430
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
180
CSC307 Lecture 12
javiergs
PRO
0
450
CSC307 Lecture 13
javiergs
PRO
0
310
ぼくの開発環境2026
yuzneri
1
290
AHC061解説
shun_pi
0
290
並行開発のためのコードレビュー
miyukiw
2
2.2k
Oxlint JS plugins
kazupon
1
1.2k
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
The Mindset for Success: Future Career Progression
greggifford
PRO
0
270
AI: The stuff that nobody shows you
jnunemaker
PRO
3
340
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.3k
Odyssey Design
rkendrick25
PRO
2
530
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
Music & Morning Musume
bryan
47
7.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
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