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.

Question How to go about implementing Multiplay into Project?

Discussion in 'Game Server Hosting' started by TheOrDOOR, Feb 17, 2023.

  1. TheOrDOOR

    TheOrDOOR

    Joined:
    Mar 16, 2014
    Posts:
    5
    So I followed the "Get Started" guide, got a test allocation up and running with a Linux build, and now am basically as lost as one can be. I'm sorry for the frustrating post, but I'll try to narrow down my main issues into a few questions.

    How do I even test the build on a Windows machine if I have to build to Linux? Does this mean my game will only be playable on a Linux OS?

    How do I connect a client to the server? Relay was very simple to integrate, just a couple of basic functions, but after looking at the Matchplay sample, I am seriously overwhelmed on where to even start.

    Can I test Multiplay locally? This kind of ties back into question 1, but if I can't test it in the editor, how do I even go about implementing this system?

    Use case: A very simple (miniature-max 100 players) multiplayer online game with Firebase to OpenID Connect Authentication, in which the user logs in and is automatically placed into a server.

    Again, I'm sure for you experts this post looks like a joke, but I am genuinely lost on even the basics of this system. Any help or direction is tremendously appreciated.
     
  2. ysc307055379

    ysc307055379

    Joined:
    Jan 29, 2023
    Posts:
    1
    Hi, I'm also stopped on some point of the system, but still figure out part of it.
    In general, if you want to create a P2S system, you need to seperate the game to a server virson and a client version.
    For the server version, check if graphic enabled, if true, start server (instead of using the button).
    When you create the build config, there are launch parameters for getting the ip and port that you can get in script in order to change the ip and port of networkmanager.
    These are in general how the server version work.
    For the client, use match maker, there is a sample that can learnt how to creare a ticket. Which when a player send request to match with other players with same preference (you can set the rule in match maker). When match maker find a match, it will start the server automatically and send back the ip and port, use these to start the client.

    But for me, I get server run successfully but cant join from client using the ip and port provided by the test allocation, does it need some authentication set up? If someone can help it will be great