0
Reliving the history of
multi player games
@phuesler @rirei
At Wooga
Evolution
is driven by teams
Technologies
Architecture
Platforms
User interaction
Level 1:
Read-only
interaction
High score
Pacman
read-only access
Client
Score
DB
Client
Level 2:
Inbox
interaction
Turn based
Empire Civilization
inbox
Client
Inbox
Client
DB
Inbox interaction
Client
Inbox
App
Client
woo.ga/backend
Level 3:
Real
interaction
Real interaction
MUD World of Warcraft
Real interaction
Client
Usr Usr
Loc
App
Client
Handling conflicts
Client
Usr Usr
Loc
App
Log Log
Client
woo.ga/backend
Level 4:
Real time
interaction
Real time interaction
Super Mario Kart Starcraft
Player 1 Player 2
Server
Player 1 Player 2
Server
Player 1 Player 2
Server
Sources of inspiration
• good throughput
• low latency
• low packet loss
• no jitter
We depend on
Level 4:
Real time
interaction on mobile
3G
Internet
Bandwidth
0.73 Mbps
1.2 Mbps3G
https://de.wikipedia.org/wiki/High_Speed_Uplink_Packet_Access
https://de.wikipedia.org/wiki...
Added Latency (RTT) *
3G 70 - 180 ms
http://202.194.20.8/proc/VTC09Spring/DATA/09-18-19.PDF
* HSDPA/HSUPA
Packet loss
Latency Jitter
0
75
150
225
300
RTT ms
Let’s do
Bomberman
Client Prediction
Extrapolation
Interpolation
Lag Compensation
Latency Object Replication
Quality of Service
Physics
Colli...
1
Architecture
C1 C2Server
move :up c1 moved :up
place bombc2 placed bomb
bomb exploded bomb exploded
game over game over
TCP
JSON
EASY!!!
Works on
Wifi:)
game doesn’t
work on 3G
:(
Jitter
Dropped packets
TCP Packet Ordering and
Resend
TCP Flow and Congestion
Control
Warping
noupdate
noupdate
noupdate
4 updates
at once
or
WORSE
:(
2
Architecture
move :up
C1 C2Server
c1 moved :up
place bombc2 placed bomb
bomb exploded bomb exploded
game over game over
UDP 3G
Will it work?
Poor man’s TCP
User Id Local Seq No Remote Seq No Ack bitfield
JSON PayloadJSON PayloadJSON PayloadJSON Payload
• http://ga...
Poor man’s TCP
Ordering
Acknowledge Packets
Resending Packets
Flow Control
Congestion Control
✔
✔
X
X
X
UDP 3G
✔Tested with a few providers in Germany, Switzerland and Netherlands
game barely
works on Wifi
:|
game doesn’t
work at all on
3G!!!
:(
Packet Loss
No synchronization
3
UDP
JSON
State updates
Send full state
Full State
Full State
Full State
Full State
MTU
Ethernet 1500 bytes
PPPoE 1492 bytes
Edge 1440 bytes
https://en.wikipedia.org/wiki/Maximum_transmission_unit
http://ip...
Architecture
C1 C2Server
move :up
state update state update
state update state update
game over game over
move :down
10 msg/second
100 ms walking speed
Game
works on
3G:)
Highscores and
Matchmaking are
BROKEN!:(
4
Architecture
C1 C2Server
move :up
state update state update
state update state update
game over game over
move :down
Different Concerns
Game
Play
Matchmaking
Highscores
Login/Logout
User Data
Reliable Unreliable
Different Concerns
Game
Play
Matchmaking
Highscores
Login/Logout
User Data
HTTP UDP
Server architecture
Lobby Server
HTTP Service
User Registry
Matchmaking
Logic
Game Server
UDP Service
User Registry
Game L...
UDP
Binary
Binary protocol
64 bit 32bit 32bit 8bit 8bit Rest
User Id SeqNr Ack Bitfield Command Payload
144 bits 944 bits
118 bytes18 ...
2 Player State update
~
136 bytes
56K Modem
7 KBps
10 msg/second
1.420 KBps
✔
Improved
Gameplay
:)
5
FIFO with timers
Casual Matchmaking
Skill Time
4 Players
Match
Hierarchical Clustering
Better Matchmaking
1
2
3
4
5
6
7
Queueing
=10
10
10
10
Start Game
1
2
3
4
5
6
7
Find Matches
=1
Reschedule
2
3
4
6
10
10
1...
Better
Matchmaking:)
Geo Matching
Play
Locally:)
Debugging
Terminal Client
Bots
Network Link Conditioner
Erlang tools
erlscript
WX
Widgets
Remote Shell
Hot Code
Reload
Level 4:
Finished
mobile multi player
User interaction
Questions?
@phuesler @jrirei
http://wooga.com/jobs
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Reliving the history of multiplayer games
Upcoming SlideShare
Loading in...5
×

Reliving the history of multiplayer games

2,506

Published on

At Wooga we are creating the next generation of social games. To be truly social, a game needs to offer real interaction between players in various forms. What started with simple, asynchronous gift requests is evolving into real time interactions between players. We are experiencing a renaissance of multiplayer games, giving us the opportunity to look into problems that have been solved over a decade ago, such as network architectures, communication protocols, latency and connection loss. And we now leverage that knowledge to bring multiplayer games to the mobile world.

In our talk we’ll cover this evolution of user interaction in our games, what technical problems they posed and how we solved them.

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,506
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
26
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Reliving the history of multiplayer games"

  1. 1. Reliving the history of multi player games @phuesler @rirei
  2. 2. At Wooga Evolution is driven by teams
  3. 3. Technologies
  4. 4. Architecture
  5. 5. Platforms
  6. 6. User interaction
  7. 7. Level 1: Read-only interaction
  8. 8. High score Pacman
  9. 9. read-only access Client Score DB Client
  10. 10. Level 2: Inbox interaction
  11. 11. Turn based Empire Civilization
  12. 12. inbox Client Inbox Client DB
  13. 13. Inbox interaction Client Inbox App Client
  14. 14. woo.ga/backend
  15. 15. Level 3: Real interaction
  16. 16. Real interaction MUD World of Warcraft
  17. 17. Real interaction Client Usr Usr Loc App Client
  18. 18. Handling conflicts Client Usr Usr Loc App Log Log Client
  19. 19. woo.ga/backend
  20. 20. Level 4: Real time interaction
  21. 21. Real time interaction Super Mario Kart Starcraft
  22. 22. Player 1 Player 2 Server
  23. 23. Player 1 Player 2 Server
  24. 24. Player 1 Player 2 Server
  25. 25. Sources of inspiration
  26. 26. • good throughput • low latency • low packet loss • no jitter We depend on
  27. 27. Level 4: Real time interaction on mobile
  28. 28. 3G Internet
  29. 29. Bandwidth 0.73 Mbps 1.2 Mbps3G https://de.wikipedia.org/wiki/High_Speed_Uplink_Packet_Access https://de.wikipedia.org/wiki/High_Speed_Downlink_Packet_Access
  30. 30. Added Latency (RTT) * 3G 70 - 180 ms http://202.194.20.8/proc/VTC09Spring/DATA/09-18-19.PDF * HSDPA/HSUPA
  31. 31. Packet loss
  32. 32. Latency Jitter 0 75 150 225 300 RTT ms
  33. 33. Let’s do Bomberman
  34. 34. Client Prediction Extrapolation Interpolation Lag Compensation Latency Object Replication Quality of Service Physics Collision Detection TCP UDP Real Time Match Making Packet Loss Synchronization Peer-To-Peer Lockstep Protocol
  35. 35. 1
  36. 36. Architecture C1 C2Server move :up c1 moved :up place bombc2 placed bomb bomb exploded bomb exploded game over game over
  37. 37. TCP JSON EASY!!!
  38. 38. Works on Wifi:)
  39. 39. game doesn’t work on 3G :(
  40. 40. Jitter
  41. 41. Dropped packets
  42. 42. TCP Packet Ordering and Resend
  43. 43. TCP Flow and Congestion Control
  44. 44. Warping noupdate noupdate noupdate 4 updates at once
  45. 45. or WORSE :(
  46. 46. 2
  47. 47. Architecture move :up C1 C2Server c1 moved :up place bombc2 placed bomb bomb exploded bomb exploded game over game over
  48. 48. UDP 3G Will it work?
  49. 49. Poor man’s TCP User Id Local Seq No Remote Seq No Ack bitfield JSON PayloadJSON PayloadJSON PayloadJSON Payload • http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/
  50. 50. Poor man’s TCP Ordering Acknowledge Packets Resending Packets Flow Control Congestion Control ✔ ✔ X X X
  51. 51. UDP 3G ✔Tested with a few providers in Germany, Switzerland and Netherlands
  52. 52. game barely works on Wifi :|
  53. 53. game doesn’t work at all on 3G!!! :(
  54. 54. Packet Loss
  55. 55. No synchronization
  56. 56. 3
  57. 57. UDP JSON State updates
  58. 58. Send full state Full State Full State Full State Full State
  59. 59. MTU Ethernet 1500 bytes PPPoE 1492 bytes Edge 1440 bytes https://en.wikipedia.org/wiki/Maximum_transmission_unit http://ipixcel.org/EDGE_Capabilities,_Technology,_and_Applications_PDF.pdf
  60. 60. Architecture C1 C2Server move :up state update state update state update state update game over game over move :down
  61. 61. 10 msg/second
  62. 62. 100 ms walking speed
  63. 63. Game works on 3G:)
  64. 64. Highscores and Matchmaking are BROKEN!:(
  65. 65. 4
  66. 66. Architecture C1 C2Server move :up state update state update state update state update game over game over move :down
  67. 67. Different Concerns Game Play Matchmaking Highscores Login/Logout User Data Reliable Unreliable
  68. 68. Different Concerns Game Play Matchmaking Highscores Login/Logout User Data HTTP UDP
  69. 69. Server architecture Lobby Server HTTP Service User Registry Matchmaking Logic Game Server UDP Service User Registry Game Logic RPC Database
  70. 70. UDP Binary
  71. 71. Binary protocol 64 bit 32bit 32bit 8bit 8bit Rest User Id SeqNr Ack Bitfield Command Payload 144 bits 944 bits 118 bytes18 bytes
  72. 72. 2 Player State update ~ 136 bytes
  73. 73. 56K Modem 7 KBps 10 msg/second 1.420 KBps ✔
  74. 74. Improved Gameplay :)
  75. 75. 5
  76. 76. FIFO with timers
  77. 77. Casual Matchmaking Skill Time 4 Players Match
  78. 78. Hierarchical Clustering
  79. 79. Better Matchmaking 1 2 3 4 5 6 7 Queueing =10 10 10 10 Start Game 1 2 3 4 5 6 7 Find Matches =1 Reschedule 2 3 4 6 10 10 10 =1
  80. 80. Better Matchmaking:)
  81. 81. Geo Matching
  82. 82. Play Locally:)
  83. 83. Debugging
  84. 84. Terminal Client
  85. 85. Bots
  86. 86. Network Link Conditioner
  87. 87. Erlang tools erlscript WX Widgets Remote Shell Hot Code Reload
  88. 88. Level 4: Finished mobile multi player
  89. 89. User interaction
  90. 90. Questions? @phuesler @jrirei http://wooga.com/jobs
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×