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 Client DB Score
Level 2: Inbox interaction
Turn based Empire Civilization
inbox Client Client DB Inbox
Inbox interaction Client Client App Inbox
woo.ga/backend
Level 3: Real interaction
Real interaction MUD World of Warcraft
Real interaction Client Client Usr Usr App Loc
Handling conflicts Client Client Usr Usr Log Log App Loc
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
We depend on • good throughput • low latency • low packet loss • no jitter
Level 4: Real time interaction on mobile
3G Internet
Bandwidth 0.73 Mbps 3G 1.2 Mbps https://de.wikipedia.org/wiki/High_Speed_Uplink_Packet_Access https://de.wikipedia.org/wiki/High_Speed_Downlink_Packet_Access
Added Latency (RTT) * 3G 70 - 180 ms * HSDPA/HSUPA http://202.194.20.8/proc/VTC09Spring/DATA/09-18-19.PDF
Packet loss
Latency Jitter 300 225 150 75 0 RTT ms
Let’s do Bomberman
Real Time Interpolation Lag Compensation Lockstep Packet Loss Quality of Service TCP UDP Client Prediction Peer-To-Peer Latency Object Replication Synchronization Protocol Physics Extrapolation Match Making Collision Detection
1
Architecture C1 Server C2 move :up c1 moved :up c2 placed bomb place bomb bomb exploded bomb exploded game over game over
TCP JSON EASY!!!
Works on Wi fi : )
game doesn’t work on 3G : (
Jitter
Dropped packets
TCP Packet Ordering and Resend
TCP Flow and Congestion Control
no update no update Warping no update 4 updates at once
or WORSE : (
2
Architecture C1 Server C2 move :up c1 moved :up c2 placed bomb place bomb bomb exploded bomb exploded game over game over
3G UDP Will it work?
Poor man’s TCP User Id Local Seq No Remote Seq No Ack bit fi eld JSON P N Payload ad • http://ga ff erongames.com/networking-for-game-programmers/reliability-and- fl ow-control/
Poor man’s TCP Ordering ✔ Acknowledge Packets ✔ X Resending Packets X Flow Control X Congestion Control
3G UDP ✔ Tested with a few providers in Germany, Switzerland and Netherlands
game barely works on Wi fi : |
game doesn’t work at all on 3G!!! : (
Packet Loss
No synchronization
3
UDP JSON State updates
Full State Full State Full State Full State Send full state
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
Architecture C1 Server C2 move :up move :down state update state update state update state update game over game over
10 msg/second
100 ms walking speed
Game works on 3G : )
Highscores and Matchmaking are BROKEN! : (
4
Architecture C1 Server C2 move :up move :down state update state update state update state update game over game over
Different Concerns Matchmaking Highscores Game Play Login/Logout User Data Reliable Unreliable
Different Concerns Matchmaking Highscores Game Play Login/Logout User Data HTTP UDP
Server architecture Game Server Lobby Server UDP Service HTTP Service RPC Matchmaking Game Logic Logic User Registry User Registry Database
UDP Binary
Binary protocol 64 bit 32bit 32bit 8bit 8bit Rest User Id SeqNr Ack Bit fi eld Command Payload 144 bits 944 bits 18 bytes 118 bytes
2 Player State update ~ 136 bytes
1.420 KBps ✔ 10 msg/second 56K Modem 7 KBps
Improved Gameplay : )
5
FIFO with timers
Casual Matchmaking 4 Players Match Skill Time
Hierarchical Clustering
Better Matchmaking = 10 =1 =1 1 1 2 10 2 2 3 10 3 3 4 10 4 4 6 10 5 5 10 6 6 10 7 7 Queueing Find Matches Reschedule Start Game
Better Matchmaking : )
Geo Matching
Play Locally : )
Debugging
Terminal Client
Bots
Network Link Conditioner
Recommend
More recommend