Search Unity

Discussion How to make a Multiplayer like Genshin Impact?

Discussion in 'Multiplayer' started by PalitoDev, Nov 11, 2022.

  1. PalitoDev

    PalitoDev

    Joined:
    Dec 7, 2021
    Posts:
    1
    I'm new to the nets, but together with a group we are starting a multiplayer gacha video game project like Genshin Impact (but without an open world, it would be maps in different scenes like Star Rail or Persona)

    I have researched and asked a lot but I still don't have a clear answer.

    Correct me if I'm wrong about something:

    For now I need a relay server for the game, but at the same time I need a client-server model with persistent data.

    Can you explain me in more detail about all this? How could I get multiplayer like genshin (considering it will also be gacha, have exploration, and people can join friends via the friends list)?

    If you can tell me what services to use I would really appreciate it.

    Although we know that this is difficult for newbies in networks, we are trying very hard and we have no problem studying how it works for many hours, but we need more information since we are somewhat stuck, thank you very much <3
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,988
    Relay is just helping to get players connect to a server that would otherwise be unreachable to them due to network settings (NAT, firewall).

    Client-Server are all currently available (and recommendable) networking solutions for Unity: Netcode for GameObjects, Fish-Networking, Mirror and Photon.

    Persistant data is something you won‘t get a ready-made framework for. Usually you just have to be able to identify players (account management) and store their data. Most commonly you would use a database for this, but even json or custom formats would do. Just keep the data separate from the server.

    Friends list is something you get by implementing one or several of the services where gamers make „friends“. That means Steam and Epic, and possibly others. Of course you can also write your own friends list that works solely within the game, and where players first have to make such friends on your service.

    I‘m glad to hear you accept that it will be difficult. However I cannot stress enough that you‘re most likely still seriously underestimating just HOW difficult it will be based only on the question you ask. Because there really isn‘t much help in the form of ready-made, generally applicable solutions/frameworks available. You get the networking library for communication, you can pay for matchmaking, lobby and relay, and that‘s about it. Gameplay and storage is entirely up to you to implement, and possibly all of the account management if you do not use a service where players already have an account (Steam, Epic).
     
  3. forprojim

    forprojim

    Joined:
    Nov 24, 2020
    Posts:
    1
    I would like to join the question. I'm quite new to game development and realize that maybe it's too early for me to jump into multiplayer. But it's interesting to me. In Genshin Impact, each player has their own world. But there is also a multiplayer mode, when another player can enter your world. At the same time, in multiplayer mode, players can be on different scenes. My question is: is it possible, for example, with Mirror (with modifications), or Mirror is too restrictive and is it better to write a server from scratch? I just want to know which way to go.
     
  4. CanYourGameGoViral

    CanYourGameGoViral

    Joined:
    Apr 15, 2023
    Posts:
    9
    Genshin Impact can support 4 players. Mirror can support way more. How is it restrictive? It's very easy and versatile networking solution.

    Mirror supports multiple scenes and scene switching, as well as physics isolation for all these scenes. It's up to you what you do with these scenes. But if you want each player to have his own scene, that other players can enter, and additionally to that, you want a global game world where everyone exists, then that's possible.
     
  5. Eigulite

    Eigulite

    Joined:
    May 13, 2022
    Posts:
    60
    Joining this question. How can I make a "Global game world where everyone exists"? I want to make an open world game where everyone can play in the same world. What do I have to use?
     
  6. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,988
    That‘s basically THE main feature of every realtime networking library, be it Netcode, Fishnet, Mirror, Photon, … so the answer is: any. ;)
     
  7. Eigulite

    Eigulite

    Joined:
    May 13, 2022
    Posts:
    60
    What is the best choice? I heard netcode is good but server/clientrpc replaced it as better. What is the best to use for an mmo open world game where everyone can play on the same world?