P2P network games/apps: Good choice for a “battle.net”-like matching server

前端 未结 6 1350
暖寄归人
暖寄归人 2021-02-06 10:56

I\'m making a network game (1v1) where in-game its p2p - no need for a game server.

However, for players to be able to \"find each other\", without the need to coordinat

6条回答
  •  一生所求
    2021-02-06 11:29

    how about you break the problem into two parts - make a game matcher client (that is distinct from the game), which can communicate via http to your cheap/shared webhost. All gamers who wants to use the game matching function use this. THe game matcher client then launches the actual game with the correct parameters (IP, etc etc) after obtaining the info from your server.

    The game will then use the standard way to UDP punch thru NAT, etc etc, as per your network code. The game dont actually need to know anything about the matcher client or matcher server - in the true sense of p2p (like torrents, once you can obtain your peer's IPs, you can even disconnect from the tracker).

    That way, your problems become smaller.

提交回复
热议问题