SlideShare a Scribd company logo
Networking Architecture of Warframe
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
Networking Architecture of Warframe
Ball throw – predict throw animation
Networking Architecture of Warframe
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
Networking Architecture of Warframe
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
Networking Architecture of Warframe
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
Networking Architecture of Warframe
Networking Architecture of Warframe
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

PPTX
PPTX
ECS: Streaming and Serialization - Unite LA
PPTX
Hable John Uncharted2 Hdr Lighting
PPTX
Lighting the City of Glass
PDF
The Guerrilla Guide to Game Code
PPTX
Moving Frostbite to Physically Based Rendering
PDF
ゲームアプリの数学@GREE GameDevelopers' Meetup
PPTX
Stochastic Screen-Space Reflections
ECS: Streaming and Serialization - Unite LA
Hable John Uncharted2 Hdr Lighting
Lighting the City of Glass
The Guerrilla Guide to Game Code
Moving Frostbite to Physically Based Rendering
ゲームアプリの数学@GREE GameDevelopers' Meetup
Stochastic Screen-Space Reflections

What's hot (15)

PPTX
UNREAL ENGINE.pptx
PPTX
Parallel Futures of a Game Engine (v2.0)
PPTX
CLOUD GAMING.pptx
PPTX
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
PDF
Deferred rendering using compute shader
PDF
The joy of computer graphics programming
PPT
BitSquid Tech: Benefits of a data-driven renderer
PPTX
Past, Present and Future Challenges of Global Illumination in Games
PPTX
Level design and devlopment part 2 stories and narrative
PPTX
Implementing a modern, RenderMan compliant, REYES renderer
PPTX
Relic's FX System
PDF
Lighting Shading by John Hable
PPTX
Game design at Playrix
PPTX
クロムハウンズにおける 人工知能開発から見るゲームAIの展望 (CEDEC2006)
PPTX
Physically Based and Unified Volumetric Rendering in Frostbite
UNREAL ENGINE.pptx
Parallel Futures of a Game Engine (v2.0)
CLOUD GAMING.pptx
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Deferred rendering using compute shader
The joy of computer graphics programming
BitSquid Tech: Benefits of a data-driven renderer
Past, Present and Future Challenges of Global Illumination in Games
Level design and devlopment part 2 stories and narrative
Implementing a modern, RenderMan compliant, REYES renderer
Relic's FX System
Lighting Shading by John Hable
Game design at Playrix
クロムハウンズにおける 人工知能開発から見るゲームAIの展望 (CEDEC2006)
Physically Based and Unified Volumetric Rendering in Frostbite
Ad

Similar to Networking Architecture of Warframe (20)

PPTX
Debugging multiplayer games
PPTX
Decima Engine: Visibility in Horizon Zero Dawn
PPTX
Unity - Internals: memory and performance
PDF
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
PDF
STORMPresentation and all about storm_FINAL.pdf
ODP
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
PPTX
PPTX
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
PPTX
Distributed monitoring
PPSX
LMAX Disruptor - High Performance Inter-Thread Messaging Library
PDF
John adams talk cloudy
PDF
Fixing twitter
PDF
Fixing_Twitter
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PDF
Supersize Your Production Pipe
PDF
Ceph in the GRNET cloud stack
PPS
Storm presentation
ZIP
How we use Twisted in Launchpad
PPTX
Maximize Your Production Effort (English)
Debugging multiplayer games
Decima Engine: Visibility in Horizon Zero Dawn
Unity - Internals: memory and performance
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
STORMPresentation and all about storm_FINAL.pdf
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay - M...
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
Distributed monitoring
LMAX Disruptor - High Performance Inter-Thread Messaging Library
John adams talk cloudy
Fixing 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 ...
Supersize Your Production Pipe
Ceph in the GRNET cloud stack
Storm presentation
How we use Twisted in Launchpad
Maximize Your Production Effort (English)
Ad

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Nekopoi APK 2025 free lastest update
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Digital Strategies for Manufacturing Companies
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Nekopoi APK 2025 free lastest update
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Odoo Companies in India – Driving Business Transformation.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Odoo POS Development Services by CandidRoot Solutions
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Navsoft: AI-Powered Business Solutions & Custom Software Development
VVF-Customer-Presentation2025-Ver1.9.pptx
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Operating system designcfffgfgggggggvggggggggg
Digital Strategies for Manufacturing Companies

Networking Architecture of Warframe

  • 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
  • 15. Ball throw – predict throw animation
  • 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
  • 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
  • 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
  • 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

  • #6: High-level overview Layers that typically build a game networking system
  • #8: 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
  • #9: Events, not state, typically reliable & ordered
  • #11: If throttled – frequencies scaled down by s=bw_av/bw_needed
  • #12: 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.
  • #13: Master object: current frame dirty mask Bits corresponding to suppressed properties left enabled Combined with mask for each client = final mask for this frame
  • #14: 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]
  • #15: 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)
  • #16: Sequence diagram – a nice way to visualize message flow, makes it immediately obvious where the lag is. Vertical line = time
  • #17: 200ms lag +/- 20ms jitter Subtle artifacts, more obvious if watching frame-by-frame (e.g. AvsPmod)
  • #18: Inconsistencies, warp, etc Reconciliation – what’s the worst case scenario?
  • #19: Gameplay consequences for input (two diff buttons)
  • #21: Questions: where/how do we hide the lag, how do we cheat.
  • #22: Originally single threaded, but less objects/4p PS4, 2013, had to be quick (launch title). 8p, thousands of objects, single thread no longer acceptable
  • #23: Only one shot, could not afford going up a blind alley Seems ‘embarrassingly parallel’ at a first glance Cache coherence
  • #25: 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)
  • #26: 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)
  • #27: 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)
  • #28: No manpower for #ifdefs, DS team=1 programmer) DS validation excludes local player/avatar (do not exist on DS, would invalidate prediction)