Search Unity

Question Do I even need Lobby?

Discussion in 'Lobby' started by RR7, Dec 15, 2021.

  1. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    i implemented a game structure using HLAPI and the LobbyManager that came with it, i borrowed extensively from the lobby example that came with it.

    now that UGS seems to be the replacement suite for all this, I'm looking at making this work.

    there is a guide from UNET to Netcode, which is nice, but the lobby package and sample code doesn't really resemble anything from before. The Boss Room sample looks like it doesn't use the Lobby function at all, and yet it has a lobby.

    so, i'm rather confused. do I need Lobby or not?
     
  2. UnityPeterD

    UnityPeterD

    Unity Technologies

    Joined:
    Nov 5, 2019
    Posts:
    64
    Hi there,

    Thank you for sharing your thoughts and experiences with the Boss Room sample! Boss Room does not use the Lobby Service currently. As you have probably seen, based on your post, there is a sample for Relay and Lobby available here if you would like to get an idea about how it works and what it might offer over an implementation like the one you see in the Boss Room sample.

    Looking at the Boss Room sample (which I admit I haven't had much time to dive into yet but will make some time now to do that!), there is indeed a custom lobby being used that requires players to join by IP or Join Code (if using Relay). The Lobby Service would provide a service to host lobbies and allow you to search them by criteria instead of joining them directly only but you certainly wouldn't need it if you were not looking to implement the additional functionality it offers :)

    Hopefully, this helps but let me know if I can provide any further information or insight that would help :)

    Kind Regards,

    Peter Davidson
    Unity Service Support Specialist
     
  3. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    thanks for the reply, i had a little chat in the Discord, and have posted a feedback on the github. but in short, i am currently not really able to understand what the lobby sample technically does as its all in observer speak and this is not something i'd seen until today. i consider samples ways of showing people who dont know what they are doing, an example of it doing it and say 'well there ya go, so something like that' but the way its written isn't anything like anything i've used before not even any unity samples seem to be done that way. i'm sure i'll realise how awesome it is once i've now gone off and observed observing and such things.

    your explanation does answer my question though. i can see now that i don't NEED lobby as such, but i do in fact really want to use its features as it will help automate matchmaking without user input which is exactly what i want to do.
     
  4. veleek_unity

    veleek_unity

    Ben Randall Unity Technologies

    Joined:
    Aug 25, 2021
    Posts:
    59
    Can you help me understand what you mean when you say "it's all in observer speak"? I'd like to make sure that the sample is as clear as possible and just want to see if I can better understand what you think it should show.
     
  5. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    the gameobject scripts don't seem to explain much by looking at them, they all just a bunch of observers, these observers seem to be a self referencing class of base scripts and generics. its just a pattern which i've not heard about until i started looking into this, and i'm now having to work out what is going on before i can start to work out where the actual useful bits of info are. plus, no other samples seem to use the observer pattern, you find an object and it typically has a manager or controller style script attached to it. learning karate before punching something makes for a better punch, but sometime we just like to start swinging and maybe learn the karate later.

    am i supposed to import all the base classes and utility classes into my project and start doing it that way? should i change my whole project to use the observer pattern if i use the lobby?

    but anyway, no-one else has mentioned it so perhaps everyone knows the pattern already. i put the feedback here but it pretty much says the same thing.

    The code doesn't seem very understandable for n00bs like me · Issue #22 · Unity-Technologies/com.unity.services.samples.game-lobby (github.com)

    i was asked to put this feedback forward following a discord discussion, i'm not explicitly requesting any change, just sharing the thoughts i had when starting to use it.
     
    Unity_Brandon likes this.