Peer-to-peer multiplayer sample with simple masterserver

Discussion of proposed new features.

Peer-to-peer multiplayer sample with simple masterserver

PostPosted by EricDeflandres » 11 Aug 2016, 16:55

IMHO, an important missing sample would be a small peer-to-peer multiplayer game based on CharacterDemo, including a simple C++ or Node.js lobby masterserver with built-in NAT-punchthrough.

That could be a simple game allowing players to choose the blue or red team, and then control walking characters throwing balls at the other players. The last player alive wins the game for his team. Nothing more.

When a player starts the application, he waits to be connected to a lobby. The masterserver decides if he connects him to an incomplete lobby, or creates a new lobby.

The player joins that lobby, and when the lobby is full enough (for instance at least two players in each team), the masterserver decides which player will be the server for the other players, and the game starts.

If the player which is currently the server for the other players suddenly disconnects during the game, another player in the lobby (i.e. the next in the lobby player list, or the one with the fastest upload speed) transparently becomes the new server for the other players of the lobby, so that the game can go on until one of the teams wins.

The NAT-punchtrough feature could be based on libjingle, or on Keith Johnston's code in Atomic Game Engine.

As simple as this sample game seems, I find very hard to implement it myself, and this sample alone would probably be enough to make Urho3d the best available engine for indie developers like me who want to implement a peer-to-peer multiplayer game...
User avatar
EricDeflandres
New user
New user
 
Posts: 2
Joined: 11 Aug 2016, 16:15

Re: Peer-to-peer multiplayer sample with simple masterserver

PostPosted by rku » 12 Aug 2016, 14:27

That sounds like a great idea. Contributions are welcome.
User avatar
rku
Active user
Active user
 
Posts: 103
Joined: 06 May 2015, 08:24


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 0 guests

cron