Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved server only supports one single match

Discussion in 'Multiplayer' started by mohammadhborhani, Oct 24, 2023.

  1. mohammadhborhani

    mohammadhborhani

    Joined:
    Mar 16, 2023
    Posts:
    10
    i got 2D multiplayer project. when i was want to establish the game server i have realized that server build only supports one single match and basically i have to run a new server (.exe file) for each new match.

    how can i make a server build that supports multiple matches with multiple rooms?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,078
    What networking technology?

    Generally speaking, most of them work on the "one game session per server" concept.
    If you want your server to run multiple matches, such as 1:1, then it's up to you to program that. This approach is often incompatible with other services though, such as matchmaking and lobby, which assume the single-server principle.

    In reality it's far easier to just have separate servers for each match. You can run multiple instances of a dedicated server on the same server hardware, as long as each uses a different port. Most games that aren't computationally expensive (on the server side) do it this way.
     
    mohammadhborhani likes this.
  3. mohammadhborhani

    mohammadhborhani

    Joined:
    Mar 16, 2023
    Posts:
    10
    Thanks for your Assist
     
  4. Welfarecheck

    Welfarecheck

    Joined:
    Jun 14, 2020
    Posts:
    115
    Fishnet has scene stacking that allows you to run Nth instances of a game per server. Lowering costs and need to run additional server instances. Each scene has their own physics and whatnot as well.

    https://fish-networking.gitbook.io/docs/manual/guides/scene-management/scene-stacking

    FishMMO is also a community driven framework for Fishnet that allows you to create master server and Nth connected servers to host games. The master server can control all your matchmaking. Scalable.

    https://github.com/jimdroberts/FishMMO

    Be sure to check out the Fish Discord if you have questions. Lots of help there and it's busy 24/7.