Multiplayer Gaming Features
|
|
Peer-to-Peer Multiplayer |
Once players have been matched together into a real-time game, the Manic API will proceed to join the matched players together in a peer-to-peer fashion. Each player will be linked with every other player.
If one or more of the players are located behind a firewall, the Manic API will use firewall hole punching to connect those players to the other players.
The peer to peer connections are setup using the UDP protocol. It usually takes only a few seconds (or less) to match players together.
Once all players are matched together, the Manic API will return a list of the matched players. This list will include the player usernames, IP addresses, and remote UDP port to communicate with.
Using peer-to-peer connections for multiplayer gaming provides developers with a number of benefits including:
- no bandwidth costs for the developer as all game traffic is sent between players
- no game server infrastructure for the developer to maintain
- performance - traffic is sent directly between players so delays are minimal
For various technical reasons, firewall hole punching may not work 100% of the time to connect players who are located behind some firewalls. In these situations, the Manic API will automatically fall-back to using a traffic-relay server.

