#145 (Redesign network model... again) – HoverRace

Ticket #145 (assigned defect)

Opened 15 months ago

Last modified 7 months ago

Redesign network model... again

Reported by: ryan Owned by: ryan
Priority: critical Milestone: HoverRace 1.24
Component: Client Version: 1.23
Keywords: network tcp udp client server model Cc:
Blocking: Blocked By: 165

Description

Asking users to forward a TCP and UDP port is still a bit of a hassle for players who just want to get going. Therefore a new model is required so that players can "just play" from anywhere, anytime.

This model should be based loosely on other contemporary client-server models, using direct connections when possible (if the user has forwarded ports).

A possible idea is as follows:

  • If a user has not forwarded any ports, all of their data is relayed through the game server
  • If a user has forwarded ports, each player should be able to directly connect to that player
  • If no users in a game have forwarded ports, central servers that can host a game and pass packets back and forth must be available and online, and the IMR must be able to select the best available server for the players for a game under these conditions

This will be a fairly extensive rewrite involving the client, the IMR, and a standalone game server will need to be created also.

Attachments

dscf0688.jpg Download (251.8 KB) - added by ryan 7 months ago.

Change History

Changed 15 months ago by ryan

  • status changed from new to assigned

Actually, I was unaware of the reliability of this method, but UDP hole punching seems to be an adequate solution for approximately 80% of NAT setups [1]. While that's not good enough for a solution on its own, a good approach may be to have an available server to work as a relay for hosts that are unable to hole punch. As a result lag for those clients will be increased significantly, but it will work.

[1]  http://www.brynosaurus.com/pub/net/p2pnat/

Changed 7 months ago by ryan

Ok, I found my clipboard and sketched out what I want to do. File is attached.

Changed 7 months ago by ryan

Changed 7 months ago by ryan

  • blockedby 165 added

(In #165) Use new Dedicated Server component, and new version, and update tickets that this is blocking.

Changed 7 months ago by ryan

This should use boost::asio, like the dedicated server (#165).

Note: See TracTickets for help on using tickets.