Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Join Date
    Feb 2014
    Posts
    277
    I did notice that the lobby system has a bit of a bug.
    If the owner of a game lobby leaves, then by design, the lobby is transferred to the next player.
    However, players outside the lobby, and that includes the former owner, cannot see the change in the lobby. It should be updated to say "xxxx's Lobby".
    The reason is that the proxy is sent only to the members in the game lobby, not those back in the main lobby.
    The gamelobby knows nothing about the mainlobby.

    A few avenues of approach are so far fruitless.


    Working on it.
    Last edited by oldngrey; 08-08-2017 at 02:58 AM.

  2. #12
    Join Date
    Feb 2014
    Posts
    277
    I see that cjrgaming has put another video onto youtube.
    He is back although he does say he will take it slowly so as not to burn out this time.
    He has a set up patreon. I've decided to support him.
    https://www.youtube.com/user/cjrgaming/videos

    Of course I will still do what I can to support 3dbuzz. A few weeks ago the blog was updated. I hope we've all read it.
    Last edited by oldngrey; 08-05-2017 at 06:46 AM.

  3. #13
    Join Date
    Feb 2014
    Posts
    277
    Designing the LeaveLobby system for the MainLobbyService

    This isn't code, but a roadmap of what needs to be done when the owner of a GameLobby clicks the LeaveLobby button.

    As Nelson's code stands, it handles the GameLobby updates, but not the MainLobby updates needed.
    Here is an example to follow along with. If you have 3 clients running and logged in:
    client A is not in a gamelobby,
    client B is the owner of a gamelobby
    client C has joined the gamelobby owned by client B.

    Currently if client B leaves the gamelobby, the code successfully transfers the ownership to client C. This is done through the GameLobby class on the MasterServer. Client B has the lobby system destroyed and the lobbies system displayed again.

    However, the MainLobbyService knows nothing about it and therefore client A still sees client B as the owner of a gamelobby and client B still sees themselves as the owner of the gamelobby.

    The way I have developed to fix this, is to have the Leave Lobby click() event trigger not only the Assets.Code.MasterServer/LobbyWindow.LeaveGameLobby method, but to be wired via the Unity3D GUI to also trigger a new method called Assets.Code.MasterServer.Systems/MainLobbySystem.LeaveGameLobby.

    In other words we are going to trigger events to separately do the gamelobby updates as well as mainlobby updates.

    This new method calls it's proxy on the BuzzMMO.Server.Master.Systems/MainLobbySystem.LeaveGameLobby() which passes it on to the MMO.Server.Master/MainLobbyService.LeaveGameLobby method which does all the work.

    That work is to:
    1. Calculate the new owner by removing the owner player from the LobbyDetails and using reflection to find the dictionary of _players in the GameLobby class. Find the first one in the dictionary that isn't the player. That's our new owner.
    2. Setup a new method in the MainLobbyService class that does a similar thing to SetOwner in the GameLobby class - ie change the owner, calculate the number of players from the GameLobby._players dictionary , and finally calculate the name of the lobby
    3. Proxy this to the client for all connected players LobbyRow.SetLobbyDetails so they will all see the new gamelobby owner.

    I am not suggesting for a moment that this is the best or only way to do it. It only seemed the cleanest way because the MainLobby and GameLobby classes are quite separate and normally do not share data.
    Last edited by oldngrey; 08-13-2017 at 06:31 AM.

  4. #14
    Join Date
    Aug 2010
    Posts
    151
    I would just create another event on the lobby that is an Updated and have the mainlobbyservice add a handler to that on creation that fires a network event for the mainlobbyservice. There is already an OnLobbyUpdated for the lobby clients to handle. This should be fairly trivial without adding too much code.

  5. #15
    Join Date
    Feb 2014
    Posts
    277
    Fun isn't it? Maybe because it's your profession, the fun is different for you.
    I am using the unused MainLobbySystem.OnLobbyUpdated method to write the lobbyrows at the client for the current user.
    There's still a bit of work to do, as there are 2 different _players and _lobbies/_proxy details and each player has the details to update. It would be interesting to make some of this stuff static, but oh well....

  6. #16
    Join Date
    Nov 2006
    Location
    Vancouver, WA
    Posts
    236
    I really liked doing this project and had very high hope that it would get finished to a working state.
    The only way to fail is to give up or die...

  7. #17
    Join Date
    Feb 2014
    Posts
    277
    Hi Matroblend,
    I haven't started on the game loop stuff yet. Still messing around with the the leaving-game-lobby.

    How much of it were you able to recover from the intro to chapter 12?
    ie what's missing?

  8. #18
    Join Date
    Nov 2006
    Location
    Vancouver, WA
    Posts
    236
    I went through the intro about 6 times, gleaned everything out of Nelsons working code but I do not have the skills to properly merge it into a working codebase.
    The only way to fail is to give up or die...

  9. #19
    Join Date
    Feb 2015
    Location
    Turkiye
    Posts
    18
    i finally get other players movement on a particular client.
    Last edited by byagcioglu; 01-18-2018 at 08:47 AM. Reason: correction

  10. #20
    Join Date
    Feb 2014
    Posts
    277
    Video is "unavailable"

    *edit*
    Thanks for letting us see it! Well done! I had a big smile on my face as I watched it.
    This is the first time I have seen Nelson's code in real action apart from the live test a few year's back!

    Care to tell us if you are going it alone or re-creating Nelson's game loop?
    I am so glad someone else is working on his - I had gotten discouraged and hadn't done anything for a while; it felt like everyone had abandoned it.
    Last edited by oldngrey; 01-19-2018 at 02:02 AM.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •