SlideShare a Scribd company logo
1 of 33
Outline
• Replication system overview
• Case study: Lunaro ball throw
• Replication: going wide
• Congestion control
• Dedicated servers
References/thanks
• David Aldridge, I Shot You First! (Gameplay Networking in
Halo: Reach) [GDC2011]
• Timothy Ford, Overwatch Gameplay Architecture and
Netcode [GDC2017]
• Philip Orwig, Replay Technology in Overwatch [GDC2017]
Warframe
• A cooperative third person online action game
• 3 platforms (PC, PS4 (launch title), XB1)
• ~32 millions accounts
• Own technology stack (everything from low-level socket code to
matchmaking, all 3 platforms)
• Mostly P2P, but we support “volunteer PVP servers”
Layers
Layers
Replication models in games
• Deterministic Lockstep (input only)
• Snapshot Interpolation (complete world state for all clients)
• State Replication (individual, prioritized chunks for every client)
Replication (host to client)
• Properties per object,
not reliable, unordered,
objects sorted by priority
(different for every client)
• Events – optionally reliable,
optionally ordered
Properties
• (Network) property: a network relevant data field of a replicated
object
• Two ends of the spectrum: single group of properties per object
(better perf) vs N individual properties (better for bandwidth)
• Our version: somewhere in-between, dirty bit + value. Implemented
as a template: TNet<T>. If a group of properties changes together
– encapsulate and associate with a single bit
• Dynamic arrays (replicated): convenient, but can of worms (bit
record structure no longer static, so merge/mask operations get
more complicated)
Property priorities
• Property priority = replication frequency
• More important properties (position, health) replicated more frequently
• Perfect conditions, no throttling: exactly as frequently as defined (data-driven)
• Part of the congestion control system – if throttled – all properties replicated
less frequent
Object prioritization
• Motivation: in case we can’t send all the objects this frame, sort them by a
perceived importance
• Per replicated object and per client (so 2 clients can end up with a very
different set of priorities)
• Broad per-type priorities + custom code logic for special types (like avatars)
• Supports inter-object dependencies (A needs to be replicated before B, mostly
for creation messages, e.g. avatar and his weapons)
Replication flow
High/low frequency lists
• Problem: thousands of object to update, only fraction
actually important. Created a system to split into two lists
(high and low frequency) automatically
• Objects start on high frequency list by default
(+associated with a timer)
• High frequency objects tested ever frame. If not dirty for X
seconds – moved to a low frequency list. If dirty – timer
bumped slightly.
• Low frequency list traversed over the course of multiple
frames, round-robin style. If dirty – moved to a high
frequency list and grace period extended
Ball throw – predict throw animation
Ball throw – full prediction
Ball throw – hybrid solution
• Request ball throw in advance,
at our future hand position
• No visible lag as long as ping
less than time to release event
(~160ms in Lunaro)
• Perfect for instigator, a little off
for others
Takeaways
• No silver bullet (perfect prediction would be the closest), every solution comes
with a different set of problems
• Human players much more concerned with themselves - “favor the shooter”
• NPCs don’t complain (“favor the human” in PVE)
• Choose wisely depending on situation (responsiveness vs ‘correctness’)
• Not so hard to predict the future if your horizon is 100-200ms
Replication jobs - “traditional” approach
• Work item: N objects (any client)
• The most natural approach, tempting to try it first
• Good load balancing
• Lock hell, prone to races (any job can read/write to from
client’s internal structures)
Replication jobs – our approach
• Work item: all objects for single client
• 100% lock and wait-free, only touching
own structures
• Pre-allocated buffers to avoid contention
on memory manager
• A little bit worse load-balancing, but
we try to fill the bubbles with other jobs
Big picture
Congestion control
• UDP has no congestion control (unlike TCP)
• Existing approaches- first idea – “let’s do what TCP is doing!”
• Bad: not just 1 approach, dozens, good: well documented, source codes exist
(e.g. Linux kernel),
• Not directly applicable – takes too much time to converge, tries to maximize
bandwidth in the long run (steady transfer), has to be very generic (as opposed
to fine-tuned for just 1 game), transport layer only
Congestion control – our version
• Quickly realized a “TCP approach” not going to cut it (limited to transport
layer, very generic), still got/validated some ideas (e.g. BIC)
• Very small search space (~10-80kbytes/s), majority of logic in the replication
layer (as it has more information). Very application specific, controlled by ~30-
40 parameters. Uses both RTT & packet loss as connection quality metrics
• Start reasonably high, decrease if can’t handle, only try to increase if definitely
necessary (probing). Distinguish between upstream/downstream limitations
• Track both current and allowed maximum, rebalance periodically
• Two-tier throttling: a) sending properties less frequently, b) limiting # of
updated objects (sorted by priority)
Dedicated servers
• Decent starting point – game/engine code split into server and client layers.
P2P host/single player: running both layers, P2P client: only client
• Dedicated server – running only server layer, no need for custom
binaries/removing code (game process with extra arguments)
• Problem: version not used/maintained (P2P only for the last few years), easy to
introduce non-obvious bugs (changing net properties from client code, works
OK in P2P (both layers), breaks for the DS (no client layer, code doesn’t run))
• Added “DS validation” mode: TNet triggers an error if modified from the client
code. Catches majority of mistakes, works even in single-player
Extra slides
Compression
• Network compression - a very special case (tiny packets, performance very
important)
• We’ve tried LZF and different Huffman variants (N trees, ‘best’ tree chosen
based on data characteristics)
• Couldn’t justify spending too much time here versus buying Oodle
• Oodle worked out of the box, gave us very good results (1.4:1 or better), the
only time consuming part is training, but can be automated to some extent
Multithreading – pushing it further
• Handling packet delivery information from clients (acks/nacks)
• Not very expensive (< 1ms), but was trivial to offload, so why not
• Job per-client again, less urgent, can span frame boundaries
• For complex types (avatars) visiting all the individual properties can get
expensive
• Solution: split into groups (components), skip entire groups if empty
• Component/controller split not always ideal for dirty masks, so had to split it
based on how frequently they change rather than gameplay structure.

More Related Content

What's hot

Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Unity Technologies
 
NoSQL 위에서 MMORPG 개발하기
NoSQL 위에서 MMORPG 개발하기NoSQL 위에서 MMORPG 개발하기
NoSQL 위에서 MMORPG 개발하기Hoyoung Choi
 
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들MinGeun Park
 
Optimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on IntelOptimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on IntelIntel® Software
 
ECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAUnity Technologies
 
Screen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarineScreen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarinePope Kim
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorStefano Stabellini
 
장재화, Replay system, NDC2011
장재화, Replay system, NDC2011장재화, Replay system, NDC2011
장재화, Replay system, NDC2011재화 장
 
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리강 민우
 
NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀승명 양
 
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lightsPrecomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lightsSeongdae Kim
 
State-Based Scripting in Uncharted 2: Among Thieves
State-Based Scripting in Uncharted 2: Among ThievesState-Based Scripting in Uncharted 2: Among Thieves
State-Based Scripting in Uncharted 2: Among ThievesNaughty Dog
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012Esun Kim
 
인디 게임을 개발하는 여러 가지 방법들
인디 게임을 개발하는 여러 가지 방법들인디 게임을 개발하는 여러 가지 방법들
인디 게임을 개발하는 여러 가지 방법들springgames
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesEpic Games China
 
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceKGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceXionglong Jin
 

What's hot (20)

Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
 
NoSQL 위에서 MMORPG 개발하기
NoSQL 위에서 MMORPG 개발하기NoSQL 위에서 MMORPG 개발하기
NoSQL 위에서 MMORPG 개발하기
 
BSS COMPANY
BSS COMPANYBSS COMPANY
BSS COMPANY
 
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들
[KGC2011_박민근] 신입 게임 개발자가 알아야 할 것들
 
Optimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on IntelOptimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on Intel
 
ECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LA
 
Relic's FX System
Relic's FX SystemRelic's FX System
Relic's FX System
 
Screen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarineScreen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space Marine
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
 
장재화, Replay system, NDC2011
장재화, Replay system, NDC2011장재화, Replay system, NDC2011
장재화, Replay system, NDC2011
 
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀
 
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lightsPrecomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
 
State-Based Scripting in Uncharted 2: Among Thieves
State-Based Scripting in Uncharted 2: Among ThievesState-Based Scripting in Uncharted 2: Among Thieves
State-Based Scripting in Uncharted 2: Among Thieves
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
 
인디 게임을 개발하는 여러 가지 방법들
인디 게임을 개발하는 여러 가지 방법들인디 게임을 개발하는 여러 가지 방법들
인디 게임을 개발하는 여러 가지 방법들
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
 
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games ConferenceKGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
KGC 2016: HTTPS 로 모바일 게임 서버 구축한다는 것 - Korea Games Conference
 

Similar to Networking Architecture of Warframe

Debugging multiplayer games
Debugging multiplayer gamesDebugging multiplayer games
Debugging multiplayer gamesMaciej Siniło
 
Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnGuerrilla
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performanceCodemotion
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInJay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInLinkedIn
 
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...Terrance Cohen
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environmentEuropean Collaboration Summit
 
Distributed monitoring
Distributed monitoringDistributed monitoring
Distributed monitoringLeon Torres
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibrarySebastian Andrasoni
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitterRoger Xia
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...smallerror
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...xlight
 
Supersize Your Production Pipe
Supersize Your Production PipeSupersize Your Production Pipe
Supersize Your Production Pipeslantsixgames
 
Ceph in the GRNET cloud stack
Ceph in the GRNET cloud stackCeph in the GRNET cloud stack
Ceph in the GRNET cloud stackNikos Kormpakis
 
Storm presentation
Storm presentationStorm presentation
Storm presentationShyam Raj
 
Maximize Your Production Effort (English)
Maximize Your Production Effort (English)Maximize Your Production Effort (English)
Maximize Your Production Effort (English)slantsixgames
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_monTomas Doran
 

Similar to Networking Architecture of Warframe (20)

Debugging multiplayer games
Debugging multiplayer gamesDebugging multiplayer games
Debugging multiplayer games
 
Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero Dawn
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInJay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
 
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
 
Thread
ThreadThread
Thread
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
 
Distributed monitoring
Distributed monitoringDistributed monitoring
Distributed monitoring
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging Library
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Supersize Your Production Pipe
Supersize Your Production PipeSupersize Your Production Pipe
Supersize Your Production Pipe
 
Ceph in the GRNET cloud stack
Ceph in the GRNET cloud stackCeph in the GRNET cloud stack
Ceph in the GRNET cloud stack
 
Storm presentation
Storm presentationStorm presentation
Storm presentation
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Maximize Your Production Effort (English)
Maximize Your Production Effort (English)Maximize Your Production Effort (English)
Maximize Your Production Effort (English)
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
 

Recently uploaded

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Networking Architecture of Warframe

  • 1.
  • 2. Outline • Replication system overview • Case study: Lunaro ball throw • Replication: going wide • Congestion control • Dedicated servers
  • 3. References/thanks • David Aldridge, I Shot You First! (Gameplay Networking in Halo: Reach) [GDC2011] • Timothy Ford, Overwatch Gameplay Architecture and Netcode [GDC2017] • Philip Orwig, Replay Technology in Overwatch [GDC2017]
  • 4. Warframe • A cooperative third person online action game • 3 platforms (PC, PS4 (launch title), XB1) • ~32 millions accounts • Own technology stack (everything from low-level socket code to matchmaking, all 3 platforms) • Mostly P2P, but we support “volunteer PVP servers”
  • 7. Replication models in games • Deterministic Lockstep (input only) • Snapshot Interpolation (complete world state for all clients) • State Replication (individual, prioritized chunks for every client)
  • 8. Replication (host to client) • Properties per object, not reliable, unordered, objects sorted by priority (different for every client) • Events – optionally reliable, optionally ordered
  • 9. Properties • (Network) property: a network relevant data field of a replicated object • Two ends of the spectrum: single group of properties per object (better perf) vs N individual properties (better for bandwidth) • Our version: somewhere in-between, dirty bit + value. Implemented as a template: TNet<T>. If a group of properties changes together – encapsulate and associate with a single bit • Dynamic arrays (replicated): convenient, but can of worms (bit record structure no longer static, so merge/mask operations get more complicated)
  • 10. Property priorities • Property priority = replication frequency • More important properties (position, health) replicated more frequently • Perfect conditions, no throttling: exactly as frequently as defined (data-driven) • Part of the congestion control system – if throttled – all properties replicated less frequent
  • 11. Object prioritization • Motivation: in case we can’t send all the objects this frame, sort them by a perceived importance • Per replicated object and per client (so 2 clients can end up with a very different set of priorities) • Broad per-type priorities + custom code logic for special types (like avatars) • Supports inter-object dependencies (A needs to be replicated before B, mostly for creation messages, e.g. avatar and his weapons)
  • 13. High/low frequency lists • Problem: thousands of object to update, only fraction actually important. Created a system to split into two lists (high and low frequency) automatically • Objects start on high frequency list by default (+associated with a timer) • High frequency objects tested ever frame. If not dirty for X seconds – moved to a low frequency list. If dirty – timer bumped slightly. • Low frequency list traversed over the course of multiple frames, round-robin style. If dirty – moved to a high frequency list and grace period extended
  • 14.
  • 15. Ball throw – predict throw animation
  • 16.
  • 17. Ball throw – full prediction
  • 18. Ball throw – hybrid solution • Request ball throw in advance, at our future hand position • No visible lag as long as ping less than time to release event (~160ms in Lunaro) • Perfect for instigator, a little off for others
  • 19.
  • 20. Takeaways • No silver bullet (perfect prediction would be the closest), every solution comes with a different set of problems • Human players much more concerned with themselves - “favor the shooter” • NPCs don’t complain (“favor the human” in PVE) • Choose wisely depending on situation (responsiveness vs ‘correctness’) • Not so hard to predict the future if your horizon is 100-200ms
  • 21.
  • 22. Replication jobs - “traditional” approach • Work item: N objects (any client) • The most natural approach, tempting to try it first • Good load balancing • Lock hell, prone to races (any job can read/write to from client’s internal structures)
  • 23. Replication jobs – our approach • Work item: all objects for single client • 100% lock and wait-free, only touching own structures • Pre-allocated buffers to avoid contention on memory manager • A little bit worse load-balancing, but we try to fill the bubbles with other jobs
  • 25. Congestion control • UDP has no congestion control (unlike TCP) • Existing approaches- first idea – “let’s do what TCP is doing!” • Bad: not just 1 approach, dozens, good: well documented, source codes exist (e.g. Linux kernel), • Not directly applicable – takes too much time to converge, tries to maximize bandwidth in the long run (steady transfer), has to be very generic (as opposed to fine-tuned for just 1 game), transport layer only
  • 26. Congestion control – our version • Quickly realized a “TCP approach” not going to cut it (limited to transport layer, very generic), still got/validated some ideas (e.g. BIC) • Very small search space (~10-80kbytes/s), majority of logic in the replication layer (as it has more information). Very application specific, controlled by ~30- 40 parameters. Uses both RTT & packet loss as connection quality metrics • Start reasonably high, decrease if can’t handle, only try to increase if definitely necessary (probing). Distinguish between upstream/downstream limitations • Track both current and allowed maximum, rebalance periodically • Two-tier throttling: a) sending properties less frequently, b) limiting # of updated objects (sorted by priority)
  • 27. Dedicated servers • Decent starting point – game/engine code split into server and client layers. P2P host/single player: running both layers, P2P client: only client • Dedicated server – running only server layer, no need for custom binaries/removing code (game process with extra arguments) • Problem: version not used/maintained (P2P only for the last few years), easy to introduce non-obvious bugs (changing net properties from client code, works OK in P2P (both layers), breaks for the DS (no client layer, code doesn’t run)) • Added “DS validation” mode: TNet triggers an error if modified from the client code. Catches majority of mistakes, works even in single-player
  • 28.
  • 29.
  • 31. Compression • Network compression - a very special case (tiny packets, performance very important) • We’ve tried LZF and different Huffman variants (N trees, ‘best’ tree chosen based on data characteristics) • Couldn’t justify spending too much time here versus buying Oodle • Oodle worked out of the box, gave us very good results (1.4:1 or better), the only time consuming part is training, but can be automated to some extent
  • 32. Multithreading – pushing it further • Handling packet delivery information from clients (acks/nacks) • Not very expensive (< 1ms), but was trivial to offload, so why not • Job per-client again, less urgent, can span frame boundaries
  • 33. • For complex types (avatars) visiting all the individual properties can get expensive • Solution: split into groups (components), skip entire groups if empty • Component/controller split not always ideal for dirty masks, so had to split it based on how frequently they change rather than gameplay structure.

Editor's Notes

  1. High-level overview Layers that typically build a game networking system
  2. A little bit of history, a short taxonomy of replication models in games. Lockstep – RTSes, wait for all clients, JIP problems, determinism. Mention For Honor (P2P) “Quake model” – good for perf, bad for BW as games get more complex More details in Philip Orwig’s talk
  3. Events, not state, typically reliable & ordered
  4. If throttled – frequencies scaled down by s=bw_av/bw_needed
  5. If throttled – priority preserved to avoid starvation, if you’ve not been replicated for a long time you’ll eventually bubble up to the top.
  6. Master object: current frame dirty mask Bits corresponding to suppressed properties left enabled Combined with mask for each client = final mask for this frame
  7. Converges fairly quick, typically around 150 objects left on the high frequency list Unexpected benefit: diagnostics (“why is this object hiqh freq?”) [Aim around 14-15m]
  8. Lunaro: elevator pitch – futuristic handball/Speedball Rules (brief) Throw specifically Problem: how to hide throw latency Non-starter: host authoritative anim+throw (send request, start the whole thing on response)
  9. Sequence diagram – a nice way to visualize message flow, makes it immediately obvious where the lag is. Vertical line = time
  10. 200ms lag +/- 20ms jitter Subtle artifacts, more obvious if watching frame-by-frame (e.g. AvsPmod)
  11. Inconsistencies, warp, etc Reconciliation – what’s the worst case scenario?
  12. Gameplay consequences for input (two diff buttons)
  13. Questions: where/how do we hide the lag, how do we cheat.
  14. Originally single threaded, but less objects/4p PS4, 2013, had to be quick (launch title). 8p, thousands of objects, single thread no longer acceptable
  15. Only one shot, could not afford going up a blind alley Seems ‘embarrassingly parallel’ at a first glance Cache coherence
  16. Parent job W1 (setup): dirty masks for master objects (work: X objects), calculate priorities, sort, spawn children jobs Children jobs: replication Tree-structure (root+children)
  17. https://www.cs.helsinki.fi/research/iwtcp/papers/linuxtcp.pdf (Congestion Control in Linux TCP), Some algorithms very dated (pre-Wifi), not dealing with ‘long fat’ networks too good, not taking RTT into account. 1st – Tahoe/Reno (packet loss). Vegas (RTT), Veno (Vegas+Reno, Wifi, random or congestion packet loss?), BIC, BBR (Google)
  18. 80k = way more than needed, but can help with v. good connection+initial spike Transport layer – connection quality queries + per-connection limits Priority preserved between frames to avoid starvation Binary search when growing, rapid drop (to the nearest 16k)
  19. No manpower for #ifdefs, DS team=1 programmer) DS validation excludes local player/avatar (do not exist on DS, would invalidate prediction)