Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
FSCKING LAG
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Secret Lab
September 01, 2015
Programming
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
340
Swift Functional Programming
thesecretlab
0
3k
Open Data + Video Games = Win
thesecretlab
0
380
Watch This Face
thesecretlab
1
3.2k
The Mün and back - a Kerbal tale
thesecretlab
0
700
How Do I Game Design? (OSCON 2015)
thesecretlab
0
460
Cross-device, Cross-platform: Mobile Design Tutorial
thesecretlab
0
430
Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud
thesecretlab
0
400
Other Decks in Programming
See All in Programming
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
210
気持ちぃ〜角丸 Squircle
ryu1013
0
350
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
980
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
130
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
600
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
270
AI-Powered Domain-Driven Design
ziobrando
0
330
sbt 2.0: takeoff
eed3si9n
0
170
Railsバージョンを4倍にした話
optim
0
780
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
850
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
160
Featured
See All Featured
Speed Design
sergeychernyshev
33
2.2k
Bash Introduction
62gerente
615
220k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
650
Practical Orchestrator
shlominoach
192
12k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
How to build a perfect <img>
jonoalderson
1
6.2k
Believing is Seeing
oripsolob
1
250
Code Review Best Practice
trishagee
74
20k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.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