Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Looking for the right network solution for my game!

Discussion in 'Multiplayer' started by MichaelScheske, Jun 15, 2022.

  1. MichaelScheske

    MichaelScheske

    Joined:
    Mar 1, 2022
    Posts:
    1
    Hello all,

    I've been using Unity to create my own games as a hobby for about a year now. This is also going quite well. However, I have a game idea that I would like to implement. I think I can handle the gameplay, but there is a problem:

    It should be an online multiplayer game!

    I've been reading up on the internet for months, but I've come across more questions that I haven't been able to answer yet. Therefore I wanted to ask you professionals! ;)

    Ok, first about my game idea:
    The game is supposed to be a city building/economic simulation. There are several cities, in which several players build a city together (not Simcity, more like The Guild).
    Within a city and also with other cities there should be a trading system.
    So much for the game principle.

    Now the all-important question: In what kind of network structure can I best realize this?

    I have tried Photon PUN, but this is rather something for smaller matches (matchmaking, lobbies etc.). There are no constantly running backend servers here.
    Mirror offers almost identical features. So that would be nothing either.
    I have also read up on Playfab. This already offers me the possibility to store the players in a database and I could use a VM for my Unity server build. In addition, it is free of charge in the development phase of my project, which is of course not insignificant for a hobby.
    Unfortunately, the problem I have here is that I don't know how to store all the data for the cities, or trade. There is no suitable database in Playfab.
    So do I need another server now, on which a reasonable database runs?

    So my current idea would be:

    Unity client on Android. This can authenticate to Playfab and then connects to the server build in Playfab.

    The server build is responsible for all the data management (reading and writing values in the player database and the city/trade database and then passing them back to the client). Likewise, I think simulations for build or transport times should be done here.

    So in the server build, all communication now takes place with a database. To the player database in Playfab and to an external database (just don't know where to find a suitable one yet).

    Am I on the right track with my idea? Do you have any other suggestions on how I could best realize my game idea online?

    Thanks a lot for your answers. If you have any questions, just let me know ;)
     
  2. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    258
    I'm not much of a backend person so I'll refrain from answering those in too much detail. But I do know you can get your project into testing even with those features for free. Most services offer free tiers that are upgrade-able when you're ready to publish.

    My specialty is networking solutions. If you are looking for a free networking solution that does a lot, and I do mean a lot, check out Fish-Networking. I am the author of Fish-Networking(FishNet), but I strongly believe it's the most advanced, feature rich, and efficient free solution available. We also have a large, incredibly helpful community that is growing very rapidly.

    To save us both time check out the documentation ( https://fish-networking.gitbook.io/docs/ ) where I have benchmarks, features, a roadmap, showcase, ect. There's also a Discord link if you want to visit our server. The only solution that really compares is Fusion, which is paid.
     
  3. haoshangce

    haoshangce

    Joined:
    Jun 13, 2018
    Posts:
    12
    MongoDB or Redis+mysql ? i am not a perfessional game developer , but i think this answer may be can help you.
     
  4. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    455
    For the database and authentication, try with firebase