Quick iterative testing of Room Server lobbies locally [Unity][Mirror Networking]
-
Hey! I'm in the middle of converting my Unity game to use brainCloud as a backend.
I've followed this tutorial and am able to create a lobby and connect to the server. This is really cool, however, the fact that I need to build the Linux server binary, build the docker container, push the docker container, and (usually) wait for a server to warm up before the connection goes through, totally demolishes what was previously a fairly quick iteration time for testing the server.
The tutorial I linked tells me to run the container locally. However, it also tells me I should just expect this to fail, since "we didn't pass-in environment variable". Is there a way to run the server in this container in such a way that I can use it to test the lobby functionality?
Better yet, is there a good workflow that would allow me to reliably test the Lobby functionality of the server from within the editor? In addition to the pretty dire iteration time, viewing the logs on servers in Global -> Lobs -> Recent Errors (for which I had to override my Logger since it doesn't seem to pick up Unity's Debug.Logs by default) feels a bit cumbersome. Any tips, best practices, or links to docs I might have missed would be hugely appreciated!
-
Hi @PJ ,
Have you seen our RoomServerDevTool? https://github.com/getbraincloud/braincloud-roomserver-devtool
It allows you to setup your local workstation as a remote "Room Server" -- and then you can run and debug the server remotely. Basically brainCloud will attempt to launch a server to your workstation.
Paul.
-
Thanks Paul. I hadn't encountered that before, but it looks like it will indeed be a huge help!
I'm excited to give it a whirl, but while I have a few more hours before I can do so - Building to a docker container seems to be an important step in using this tool. Will I have any luck just running the server in the Editor and trying to point to my IP, or does some sort of magic happen in the docker container that truly makes it a critical step?
Either way, this will make debugging much easier!
EDIT: Will mark "Solved" either once you reply, or I'm able to verify this myself.
-
Awesome! Still a few things to clean up but I appear to be right back to testing within the editor, but against brainCloud's actual lobby system. The key was setting
debug
totrue
in theconfig.js
and following the instructions at the end of the GitHub page. Thanks again! -