• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • 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
P

PJ

@PJ
About
Posts
5
Topics
3
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    [Unity] LobbyService.CreateLobby - Best time to show and hide a "Connecting..." popup?
  • P PJ

    Hi! I'm adding loading popups and error messages to my game - not only to let users know when something goes wrong, but so things can be a bit more clear to me during development when I don't have a console log easily available.

    In my game, I'm calling LobbyService.CreateLobby to create (and as I understand, join) a lobby. I also have a callback registered via RTTService.RegisterRTTLobbyCallback to handle the various lobby operation types.

    At the moment I'm a bit stumped on when the best time to show and hide a loading spinner is.

    My current setup is this:

    • Show loading spinner ("Creating lobby...")
    • CreateLobby and wait for Success
    • Hide loading spinner
    • Wait for "STARTING" operation from Lobby <- (problem is here because this takes a second or two)
    • Show loading spinner ("Joining lobby...")
    • Wait for "ROOM_READY" or "DISBANDED" operation
    • Hide loading spinner

    This results in a loading spinner that appears briefly for "Creating lobby...", then no spinner for a slightly longer gap while we wait to get the first operation back from the server, and then a "Joining lobby..." spinner until joining the room succeeds or fails.

    I'm not sure exactly how to treat that gap. I could just omit the "Hide" after the lobby is successfully created, but am I guaranteed in all cases to get some sort of response (even a timeout) from the server, or does that create a risk of a hanging loading spinner that never goes away? Is there some sort of state dispatched from the BrainCloudWrapper that neatly surrounds "The user wants to join a lobby", and "The user has succeeded/failed in joining that lobby"?

    NOTE: One maybe-important caveat is that I'm setting this up without an actual running server to connect to at the moment - primarily because I want to make sure that in such a case where the client can't reach the server, it gracefully informs the player and allows them to try again.


  • Am I misusing Lobbies? Server Browser / Lobbies with same lifetime as game session
  • P PJ

    Hey! I just wanted to double-check that I'm going about Lobbies the right way.

    In my game, a user will either select from a list of pre-existing Lobbies/Servers created by other users, or create their own. The server browser is populated by GetLobbyInstances.

    Due to the nature of the game, these servers have no "ready/start/end" phases as the documentation seems to expect. The game is not a survival crafting game (or anywhere near that complex), but I think the analogy fits. Anyone can pop in or out at any time, and a solo player can, in theory, "play" until other people join.

    Right now, I'm using Lobbies as a mechanism to make these servers discoverable. They're set to "Allow join in progress", and players are readied up the instant they enter the server.

    As I'm setting this up, I notice that the "ROOM_READY" event doesn't serve up any information about the users who are in the lobby. This is far from an unsolvable problem (serve this info to the user once they connect), but it's just one more thing, on top of the phrasing of a lot of the documentation that I've read, that makes me second guess whether using the Lobby system as a "server browser" for games is going to bite me somewhere down the line.

    Searching "brainCloud" "server browser" on Google only turns up one result - soon to be two! - so a thumbs up or thumbs down on my current approach would be greatly appreciated!


  • Quick iterative testing of Room Server lobbies locally [Unity][Mirror Networking]
  • P PJ

    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 to true in the config.js and following the instructions at the end of the GitHub page. Thanks again!


  • Quick iterative testing of Room Server lobbies locally [Unity][Mirror Networking]
  • P PJ

    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.


  • Quick iterative testing of Room Server lobbies locally [Unity][Mirror Networking]
  • P PJ

    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!

  • Login

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