Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Need tutorials about multiplayer game with players statistics.

Discussion in 'Multiplayer' started by OdIUm, Feb 24, 2020.

  1. OdIUm

    OdIUm

    Joined:
    Mar 6, 2017
    Posts:
    18
    Good day!

    I want try to create some simple game with multiplayer.
    The problem is that I do not know where to start in the network part.

    The game, i want to create, is a session game for several players (2-15) whith saving progression of each player (like xp, lvl, score etc).
    Is anyone knows some good tutorials, that can answer to the following questions:
    1. What network engine to use? Photon?
    2. Where calculate match sessions: locally on one of the clients or a separate server? Are there any free or cheap servers for indie developers?
    3. Where to keep players progress? locally or on a dedicated server? Are there free or cheap servers for indie developers?
     
  2. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Typically you would want to use a client-server model so you can run a centralized game logic that controls all games and players. With this approach you avoid cheating and you can access local or database storage.

    Maybe not the best choice, unless you're happy to run the game logic on client side with the side effects it entails.

    Typically it's the central server that hosts all the clients and allows to matchmake players using different rules.

    A database is usually the first choice. But it also could be a third party dedicated service. For example GameSparks and the like offer web-based API to store data in the their cloud. If you're entirely new to databases I would go this route otherwise keeping your data local to the game server has great advantages (such as read/write latency)

    I usually recommend to take a look SmartFoxServer. It offers everything you're looking for and then some. Price-wise, you can get started with the free edition or take a look at their "elastic" licenses.

    Edit: forgot link -> www.smartfoxserver.com
     
    Last edited: Feb 24, 2020
    Joe-Censored and g_a_p like this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Usually for persistent character data you'll want to prevent cheating. To minimize cheating with that data you'll usually want a dedicated server approach. Photon is usually a cloud implementation connecting clients, so probably not the ideal solution in this case.

    When you calculate on the server, you inherently reduce the opportunity for players to cheat. When you control all the servers yourself you minimize the opportunity to cheat even further.

    Go back a couple decades to a little game called Diablo. The first Diablo I'm talking about. It was a hit, and implemented local player progress saves. The game started out going great, but with popularity comes added attention on how the game works. It wasn't long before it was realized all progress was saved to your own computer, so you could simply backup your character file to prevent losing anything. Not long later someone came out with an editor for the file, so you could just give yourself any amount of items or gold. This effectively killed the multiplayer aspect of the game as people knew it. If the game remained relatively obscure, this probably wouldn't have become a problem, but it got really popular.

    So I'd suggest that you have a server which holds the player progress. As far as free or cheap, the various cloud providers have low end free or near free offerings. During development though I'd suggest you set up your own server locally and test against that. The best deal in price to performance I've found is renting somewhat outdated dedicated servers with the specs you actually need. Dedicated servers are less flexible, but usually better priced than cloud, and older servers are usually priced accordingly. What you choose really depends on your requirements though. I use these guys:
    https://joesdatacenter.com/dedicated-servers/
     
    g_a_p likes this.