Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
  1. Home
  2. APIs
  3. Unity Room Server

Unity Room Server

Scheduled Pinned Locked Moved Solved APIs
room serverserverunitydocsdockerdocumentation
20 Posts 4 Posters 6.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chad Franklin
    wrote on last edited by
    #1

    Hello, I am new to Braincloud and haven't been able to find any docs or examples about room servers in Unity. My game servers are Unity instances and I would like to know what steps I need to take for the room servers to interact with Braincloud. For example, how do I notify Braincloud that my server is ready for player connections with SysRoomReady once the container has started up? Is there an example of this that I am missing? The Unity examples on GitHub only use relay, not room server.

    Also, just as a separate question as I am new to DockerHub, I assume my repo needs to be public to be accessible by Braincloud. Are there any security ramifications of that?

    Thank you.

    1 Reply Last reply
    0
    • David St-Louis 0D Offline
      David St-Louis 0D Offline
      David St-Louis 0
      wrote on last edited by
      #2

      Hi Chad,

      First, a reminder that Room Servers are still in Beta. It is fully working, but some Libs+Examples are missing.

      1. We do not have a custom server example for Unity yet. Only for relay servers. It is however planned. I would like to have more details on your setup. Your dedicated server is an instance of Unity you said. As a Linux, console-only application? What Network API does it use? I thought Unity killed UNET. Is your dedicated server just a .NET application then?

      2. To notify brainCloud that your server is ready, you have to use the S2S library which we do not have a C# implementation currently, but it is planned. You can still do the calls yourself with any HTTP library. This is also how you will request the Lobby from brainCloud for your room server. You can look at our other libraries implement S2S calls for details: https://github.com/getbraincloud?utf8=✓&q=s2s&type=&language=

      3. Your docker repo does not have to be public. I am currently researching for you how to make this work. If I recall we have a brainCloud docker user you have to allow on your repository. I will come back to you on this.

      Another very useful example is our Web(Javascript) WarStone example: https://github.com/getbraincloud/examples-javascript/blob/master/warstone/readme.md

      David

      1 Reply Last reply
      0
      • David St-Louis 0D Offline
        David St-Louis 0D Offline
        David St-Louis 0
        wrote on last edited by
        #3

        Hi Again,

        From docker hud, you need to give read access to this user: braincloudhost

        C C 2 Replies Last reply
        0
        • David St-Louis 0D David St-Louis 0

          Hi Again,

          From docker hud, you need to give read access to this user: braincloudhost

          C Offline
          C Offline
          Chad Franklin
          wrote on last edited by
          #4

          @David-St-Louis-0 Hi David, thanks for your response. I will check out the docker setup when I get back to my desktop. My dedicated server is a Unity instance running the DarkRift2 networking library (https://darkriftnetworking.com/DarkRift2). I build it as a headless Linux build to run inside a container. I previously was running on google compute engine but had trouble setting up Kubernetes and Agones. I just yesterday found Braincloud and decided to give it a shot.

          I took a look at the links you sent and I'll have a go at setting up an http client in C#. I won't be ready to deploy anytime soon, so the beta room servers should be alright. I look forward to working with Braincloud. Thanks for the help.

          1 Reply Last reply
          0
          • David St-Louis 0D Offline
            David St-Louis 0D Offline
            David St-Louis 0
            wrote on last edited by David St-Louis 0
            #5

            Hi,

            So the C# S2S library is planned here for very soon. You might not have to build one yourself. But you can do the calls directly with HTTP anyway meanwhile and upgrade to our S2S once we release it. I'll note this thread and let you know once we release it.

            C 1 Reply Last reply
            0
            • David St-Louis 0D David St-Louis 0

              Hi,

              So the C# S2S library is planned here for very soon. You might not have to build one yourself. But you can do the calls directly with HTTP anyway meanwhile and upgrade to our S2S once we release it. I'll note this thread and let you know once we release it.

              C Offline
              C Offline
              Chad Franklin
              wrote on last edited by
              #6

              @David-St-Louis-0 Sounds great! Is there any loose estimate you can give for when it might be released? If it is soon enough I can just wait for it to come out so i only have to write the code once.

              1 Reply Last reply
              0
              • David St-Louis 0D Offline
                David St-Louis 0D Offline
                David St-Louis 0
                wrote on last edited by
                #7

                I don't have estimates for it, sorry. But it's at the top of our TODO list.

                C 1 Reply Last reply
                0
                • Paul WinterhalderP Offline
                  Paul WinterhalderP Offline
                  Paul Winterhalder
                  brainCloudAdmin
                  wrote on last edited by
                  #8

                  Hey Chad,

                  Stay tuned - we'll see what we can do. Hopefully can get an alpha of it out in the next 4ish weeks - just have to revector the right resources...

                  Paul.

                  C 1 Reply Last reply
                  0
                  • David St-Louis 0D David St-Louis 0

                    I don't have estimates for it, sorry. But it's at the top of our TODO list.

                    C Offline
                    C Offline
                    Chad Franklin
                    wrote on last edited by
                    #9

                    @David-St-Louis-0 No worries, look forward to using it.

                    1 Reply Last reply
                    0
                    • Paul WinterhalderP Paul Winterhalder

                      Hey Chad,

                      Stay tuned - we'll see what we can do. Hopefully can get an alpha of it out in the next 4ish weeks - just have to revector the right resources...

                      Paul.

                      C Offline
                      C Offline
                      Chad Franklin
                      wrote on last edited by
                      #10

                      @Paul-Winterhalder Hi Paul, no rush, take however long is necessary. I'll use the time to familiarize myself with the rest of Braincloud. Will be on the lookout for an update though 😃

                      Paul WinterhalderP 1 Reply Last reply
                      0
                      • C Chad Franklin

                        @Paul-Winterhalder Hi Paul, no rush, take however long is necessary. I'll use the time to familiarize myself with the rest of Braincloud. Will be on the lookout for an update though 😃

                        Paul WinterhalderP Offline
                        Paul WinterhalderP Offline
                        Paul Winterhalder
                        brainCloudAdmin
                        wrote on last edited by
                        #11

                        @Chad-Franklin 👍

                        C 1 Reply Last reply
                        0
                        • Paul WinterhalderP Paul Winterhalder

                          @Chad-Franklin 👍

                          C Offline
                          C Offline
                          Chad Franklin
                          wrote on last edited by
                          #12

                          @David-St-Louis-0 @Paul-Winterhalder Hello again, I hope everyone at Braincloud is alright regarding the current situation. I wanted to check in and see if there was any progress on the C# S2S library. Completely understandable if it is not ready, but I wanted to ask and hear from you guys. Again, hope you are all healthy and look forward to hearing from you.

                          1 Reply Last reply
                          0
                          • David St-Louis 0D Offline
                            David St-Louis 0D Offline
                            David St-Louis 0
                            wrote on last edited by
                            #13

                            Hi Chad,

                            It is being released this week for 4.5
                            It is already in the develop branch here: https://github.com/getbraincloud/brainclouds2s-csharp/tree/develop

                            C 1 Reply Last reply
                            1
                            • David St-Louis 0D David St-Louis 0

                              Hi Chad,

                              It is being released this week for 4.5
                              It is already in the develop branch here: https://github.com/getbraincloud/brainclouds2s-csharp/tree/develop

                              C Offline
                              C Offline
                              Chad Franklin
                              wrote on last edited by
                              #14

                              @David-St-Louis-0 Thank you David, I got up and running with a room server in no time. I wanted to let you know your "Custom Multiplayer Server with Unity" tutorial was very helpful. Thanks for the update and the help 🙂

                              1 Reply Last reply
                              0
                              • David St-Louis 0D David St-Louis 0

                                Hi Again,

                                From docker hud, you need to give read access to this user: braincloudhost

                                C Offline
                                C Offline
                                Carson Herrick
                                wrote on last edited by
                                #15

                                @David-St-Louis-0 Hi brainCloud. I am trying to follow this guidance. I'm new to Docker and containers.

                                "From docker hud, you need to give read access to this user: braincloudhost"
                                Did you mean dockerhub online web app? I have not found "permissions" on there. Only a Collaborators option, which gives read and write access.

                                This guidance
                                http://help.getbraincloud.com/en/articles/3942761-custom-multiplayer-server-with-unity
                                has a step "2. Install docker daemon"
                                On the Docker site I found the option to install a Docker Desktop app (for Windows). Is that what you mean?
                                Or is there really just a daemon to download? I cannot find such a thing by searching the Docker site. Do you have a link?

                                If I bother with the whole desktop app, is that where I can find the read-only permissions options?

                                Thanks!

                                1 Reply Last reply
                                0
                                • Paul WinterhalderP Offline
                                  Paul WinterhalderP Offline
                                  Paul Winterhalder
                                  brainCloudAdmin
                                  wrote on last edited by Paul Winterhalder
                                  #16

                                  Hi @Carson-Herrick ,

                                  You set the permissions in Dockerhub - it's the repository we will retrieve your custom image from.

                                  In summary, you need to do the following in Dockerhub:

                                  1. Create a team, called "brainCloud" probably, that you are going to use to give us access.
                                  2. Invite our user, braincloudhost to your repo, and place us on that brainCloud Team. (Note - this user still has no permissions in your repo)
                                  3. Go to the image that you want to share, then the permissions tab, and give the "brainCloud" team read-only access to that image.

                                  If you do this properly, our braincloudhost user will have read-only access to that image, and nothing else.

                                  I hope that helps!

                                  Paul.

                                  Edit - fixed step 2 with the correct user name, braincloudhost... (I had mistakenly said "bchosting")

                                  C 1 Reply Last reply
                                  1
                                  • Paul WinterhalderP Paul Winterhalder

                                    Hi @Carson-Herrick ,

                                    You set the permissions in Dockerhub - it's the repository we will retrieve your custom image from.

                                    In summary, you need to do the following in Dockerhub:

                                    1. Create a team, called "brainCloud" probably, that you are going to use to give us access.
                                    2. Invite our user, braincloudhost to your repo, and place us on that brainCloud Team. (Note - this user still has no permissions in your repo)
                                    3. Go to the image that you want to share, then the permissions tab, and give the "brainCloud" team read-only access to that image.

                                    If you do this properly, our braincloudhost user will have read-only access to that image, and nothing else.

                                    I hope that helps!

                                    Paul.

                                    Edit - fixed step 2 with the correct user name, braincloudhost... (I had mistakenly said "bchosting")

                                    C Offline
                                    C Offline
                                    Carson Herrick
                                    wrote on last edited by Carson Herrick
                                    #17

                                    @Paul-Winterhalder
                                    Thanks.
                                    Note, I think you meant username "braincloudhost", as posted above. ("bchosting" doesn't exist)

                                    1 Reply Last reply
                                    0
                                    • Paul WinterhalderP Offline
                                      Paul WinterhalderP Offline
                                      Paul Winterhalder
                                      brainCloudAdmin
                                      wrote on last edited by
                                      #18

                                      Ah - indeed @Carson-Herrick , you are correct.

                                      Turns out "bchosting" is the name of the group we use in our repo example. braincloudhost is indeed the correct user name.

                                      Apologies for the confusion!

                                      Paul.

                                      C 1 Reply Last reply
                                      0
                                      • Paul WinterhalderP Paul Winterhalder

                                        Ah - indeed @Carson-Herrick , you are correct.

                                        Turns out "bchosting" is the name of the group we use in our repo example. braincloudhost is indeed the correct user name.

                                        Apologies for the confusion!

                                        Paul.

                                        C Offline
                                        C Offline
                                        Carson Herrick
                                        wrote on last edited by Carson Herrick
                                        #19

                                        For any other small developers out there, just trying to test things out.
                                        Looking through Docker Hub menus and their documentation, it appears you can either create 1 free private repo on your User account (which doesn't allow teams), or you can create a team on an Organization account, which does not offer 1 free private repo. To add private repos to an Organization account, you are looking at a minimum cost of $35/month.

                                        1 Reply Last reply
                                        0
                                        • C Offline
                                          C Offline
                                          Carson Herrick
                                          wrote on last edited by
                                          #20

                                          @David-St-Louis-0 @Paul-Winterhalder
                                          Hi again.
                                          I would like to debug my server locally, in Unity. I have the _S2S stuff all hooked up as described in the walk through.
                                          But then I tried to do the following (actual numbers redacted)

                                          #if UNITY_EDITOR
                                                      var appId = "00000";
                                                      var serverName = "MyServerName";
                                                      var secret = "00000000-0000-0000-0000-000000000000";
                                                      _lobbyId = "00000:myLobbyTypeId:00";
                                          #else
                                                      // Load environment variables passed in by brainCloud to our container
                                                      var appId = Environment.GetEnvironmentVariable("APP_ID");
                                                      var serverName = Environment.GetEnvironmentVariable("SERVER_NAME");
                                                      var secret = Environment.GetEnvironmentVariable("SERVER_SECRET");
                                                      _lobbyId = Environment.GetEnvironmentVariable("LOBBY_ID");
                                          #endif
                                          

                                          However, I am getting a perpetual error:
                                          #S2S S2S Failed: {"packetId":1,"messageResponses":[{"reason_code":40613,"status_message":"Processing exception: Unrecognized lobby: 00000:myLobbyTypeId:00","status":400}]}

                                          I even signed up for a Dev+ subscription, just in case that was the problem, per this thread. No luck.

                                          How can I test my server code locally, while still planning for the full-on S2S Docker container deployment?
                                          Thanks

                                          1 Reply Last reply
                                          1
                                          • Paul WinterhalderP Paul Winterhalder moved this topic from S2S APIs on

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Solved
                                          • Unsolved
                                          • Users