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.

Mirror dedicated server many rooms

Discussion in 'Multiplayer' started by xdeployer, Oct 4, 2022.

  1. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    9
    Hi. I'm setting up Mirror with the goal of having a dedicated server with many rooms. The rooms will only hold one player. It's a single player experience but I want to use mirror for server authority.

    I'm using Mirror rooms. Can anyone point me in the right direction?
     
  2. thethanksforthegod

    thethanksforthegod

    Joined:
    Feb 18, 2020
    Posts:
    18
    you can use one server instance for each room with different ports .
    you can for example auth and backend using any network solution like socket io , darknet or litenetlib then the server can start headless unity server with random port sending to the client so they can connect to it I already used that and I think Microsoft Azure has the same solution but automated . (sorry for short describe just got little time)
     
  3. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    282
    Do you mean a server per game, or one server for many games like this?
     
  4. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    458
    Why do you want server auth for a single player game?
     
  5. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    9
    I have made progress on this.

    I'm using additive scenes and Mirror scene interest manager to load the same scene for many clients (dungeons). But now I am running into another issue. I've got a data store game object for each scene. The client is aware of its own data store but the server is not. The server is aware of all data stores. Anyone know how can I find the correct data store component to interact with on the server ?
     
  6. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    9
    You get gold and other potentially valuable items for killing mobs.
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    18,376
    Okay, but why would you need a server for this? Are you planning on having a leaderboard or some other way for players to interact or compete?
     
    r31o likes this.
  8. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    9
    Yep, leaderboard as well. Why wouldn't I need a server for valuable items? They are tradable on a secondary market.
     
  9. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    458
    Hving a server would:
    -Make development MUCH harder.
    -Cost you at least 100$/month (probably much more)
    -Add LAG, which would make the experience in general much worse.

    And all of that for trading items? Can you please elaborate a bit on that?
     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    18,376
    I don't think you've thought this through. Valuables are only tradeable if you make it possible to trade them. If a server were a way to prevent people from trading valuable items we wouldn't have secondary markets, and companies like Blizzard wouldn't have to continually crack down on gold selling for World of Warcraft.
     
    Last edited: Oct 10, 2022