1
\$\begingroup\$

I'm a newbie indie, so I don't have a budget for a game. But I'm making a 3rd person shooter and I need multiplayer for it.
It's a mech shooter, so it won't have very fast movements, meaning I don't need fast sync between participants.

I've thought about peer-to-peer, it seems good, but what if the host's PC crashes or they just kill the game? It would be the end of the whole match! So it seems like I need to have some sort of centralised server, but do I really need a dedicated server, and even a number of servers to be able to host thousands of matches? Or can I sync it through database services like playfab somehow?

\$\endgroup\$
  • \$\begingroup\$ how you will connect two computer each other on different LAN. Its complicated. how u did it? \$\endgroup\$ – Muhammad Faizan Khan Jan 24 '17 at 10:23
4
\$\begingroup\$

You could make the dedicated server software an executable and distribute it with the game, probably have a host&play option in the game itself which would launch this server in the background and connect to it.

Some games that do this are minecraft and terraria.

\$\endgroup\$
  • \$\begingroup\$ Its actually a really good system to use, you can even create the application to launch in the background when a user clicks a button on the UI that has a hosting option. \$\endgroup\$ – Ryan white Sep 7 '16 at 8:21
  • \$\begingroup\$ yeah, sounds good, but it does not solve the problem of host disconnection.. there could be a solution that everyone launches such servers, but only one acts as a real server, but wouldn't it create a high load on user system? \$\endgroup\$ – curly brace Sep 7 '16 at 9:37
  • \$\begingroup\$ yes it does, if you give out the software, actual dedicated servers wil most likely be made, and if you don't want to pay for "oficial" servers running this software there's nothing you can ever do about the server shutting down. EDIT: if you don't give the host&play option, hosts will actually have the server running separately from their game instance, meaning that if they leave the game, the server will keep running \$\endgroup\$ – Brian H. Sep 7 '16 at 10:35
  • \$\begingroup\$ on another note, what type of multiplayer is this? this is not mentioned in the question, are the games small sessions, like CS:GO, or is it a persistent world with saved data? \$\endgroup\$ – Brian H. Sep 7 '16 at 10:37
  • \$\begingroup\$ @curlybrace When the host disconnects then you could perform a "host migration": Determine a new client to become the host and have everyone connect to them. \$\endgroup\$ – Philipp Sep 7 '16 at 13:59
1
\$\begingroup\$

You could make rooms where each room picks the first joined user as the host and makes him run the server, and when he logs off the server can pick a new host either randomly (if net speed doesn't count) or the user with the fastest connection.

By putting the majority of the calculations to the users you can avoid the need of buying a strong server, you will only need a weaker one to make the users able to join to the rooms.

\$\endgroup\$
  • \$\begingroup\$ You'll allow cheating this way. It's not great for shooters imho. \$\endgroup\$ – Sergey.quixoticaxis.Ivanov Sep 14 '16 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.