Post on 18-May-2015
description
P2P Multiplayer GamingDan Byers
Manic Networks Inc.
September 29th, 2009
Introduction
• Manic?
• Startup
• Solutions for Game Developers
Gaming Today
• Single player
• Multiplayer
• real-time
• non real-time
• Real-time and game play
Mobile Multiplayer
• Picking up steam
• Wireless networks are improving
• Smartphones: faster, feature rich
• Social aspects, interactivity
App Store games
• Play ‘n forget
• Need to improve ‘stickiness’
• Make the user feel that they can’t stop playing
Social Factors
• More apt to join if you have friends also playing the game
• The out-of-game experience
• Communities can build upon themselves
Architectures
• Client-server
• Peer-to-peer
A B
C D
Server
A B Cclients
clients
Client-Server
• Persistent connections
• Game management in server
• Loads increase ... scaling issues
Server
A B Cclients
Peer-to-Peer
• Direct communication between clients
• Server still required for player matching
• Reduces load off of a central server
• Be careful with game state
• “Local” peer to peer with Gamekit
A B
C D
clients
Multiplayer Gaming - No Small Task
• For small teams, multiplayer can lead to months of added development & test effort
• Where do the difficulties lie?
Hurdles
• Player synchronization, game state
• Network latency
• Server infrastructure - costly
• Connectivity - firewalls
Firewalls Shmirewalls
• The main issue: NAT
Player A Player B
firewall firewall
Internet
Firewalls & NAT
• Multiple devices share one public IP
• Devices are assigned private IP’s
• Firewall blocks inbound traffic by default
iPod/iPhone,or PC
Private IP and port: 192.168.1.10:2000
Public IP and port: 64.26.92.166:653
Firewallwith NAT Internet
Firewall Hole Punching(NAT Traversal)
• External mediator assistance required
• Mediator helps each peer punch through to other peers
• Not always sucessful - need to be able to fallback to server-based traffic relays
Working on a multiplayer game?
• Back-end servers for player matching, hole punching and traffic relay fallback
• Player database and player profiles
• Scores, ranks, achievements - submission and storing
• Game invites, challenges, game profiles
• Notifications, alerts, messaging, chat
Requirements
The Solution
• Nothing that really fit the bill previously
• Until now...
The Solution
• Nothing that really fit the bill previously
• Until now...
The Manic Gaming Network
The Manic Gaming Network
• Currently in beta
• A community for both developers and gamers
• Services available for single player and multiplayer games
Service Features
• Robust API for peer-to-peer player matching
• Multiple player matching options - random matches, friend matches, rank-based matches, game lobbies
• Firewall hole punching & traffic relaying
• Game profiles - global high score lists, player rankings, achievements
• In-game match invites / challenges
Service Features (cont’d)
• Support for turn based games with storage of game states and turn notifications
• Notification sending (APNS, SMS, email, RSS)
• Private Developer Sandbox
• Marketing and promotion of your games
• API is Objective C
Player Features
• Friend lists and Ignore lists
• Compare scores with friends
• Friend messaging
• Gaming notifications
• One profile to play any Manic-enabled game
• Personal profile for sharing
• View and share scores, ranks, achievement history
Development Roadmap
• Manic Dashboard for service management
• Tournament support
• Chat rooms
• Internationalization
• Other client platforms
Sample Code
• Demo game - Finger Wars!
• 2-4 player - random & friend matches
• results submission
• in-game account registration
Thank you!
• dan.byers@manicgaming.com
• twitter.com/coffeedan
• randy.byers@manicgaming.com
www.manicgaming.com