Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question Best Networking Solution for a Survival Game?

Discussion in 'Multiplayer' started by marccalafell, Nov 21, 2021.

  1. marccalafell

    marccalafell

    Joined:
    Aug 21, 2019
    Posts:
    6
    I need your advice guys, I'm new to networking and my goal is to make a type of survival game, I was wondering if you can show me in which networking solution I should focus my effort. Considering that I need to have the option to save data from players on my game servers
     
  2. Johan_Liebert123

    Johan_Liebert123

    Joined:
    Apr 15, 2021
    Posts:
    474
    Well, there are a couple, PUN2 is a great place to start in my opinion, it's free on the asset store
    docs:
    https://doc-api.photonengine.com/en/pun/v2/index.html
    Check it out, there are also many tutorials on how to make a game using PUN2, just use some keywords, search it up and kaboom
    I'd also recommend Mirror, another free networking solution for your game on the asset store.
    docs:
    https://mirror-networking.gitbook.io/
    To do something like this I personally used PUN2, and something called playfab, there are A LOT of tutorials on how to interegate PUN2 and Playfab in unity for your game, Playfab is something where you can register users and store data, such as statistics, like level, xp etc, Virtual currencies, friends and much more!
    docs:
    https://docs.microsoft.com/en-us/gaming/playfab/
    Hope this helps
     
    toddkc likes this.
  3. marccalafell

    marccalafell

    Joined:
    Aug 21, 2019
    Posts:
    6
    Thank you for the feedback!
    Just one question, the playfab data is saved in the client pc or in the server?
     
  4. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    207
    Generally when I am trying to determine what mp framework to use I ask myself this:

    Will my game be created, have a few players for a short time, then be destroyed?
    Or will my game be created, run 24/7, and allow players to come and go?
    So, basically, is it like Minecraft/Ark or CoD/Halo?

    For the smaller, shorter lifespan room-style games you would usually use PUN2, although now I'd suggest moving to Photon Fusion. For the larger server-style games you would want to use Mirror. Based on what you describe I would suggest Mirror.

    Of course none of these are rules, just suggestions. You can make any game with any framework if you put in the time and effort. Good luck!
     
    mischa2k and Johan_Liebert123 like this.
  5. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    207
    PlayFab would be storing the data on their servers.