Creating a Simple LOBBY!

I cannot believe how hard it is to setup a simple lobby. Photon is not brand new, where is the COMPLETE documentation on this fundamental function? I have been through every (out-dated) tutorial on this site, and still have no working example to start from. I am trying to pull together an FPS. It works multi-player with PUN, but what is the point if it auto-joins a level, and instantiates AI, and those who join later can only see the AI that spawn after they have joined? There are twelve AI in the level, and the 2nd player can only see six.

Are there any good current tutorials?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Kohi10,

    Thank you for choosing Photon!

    With your help we can make Photon better and provide good quality documentation.
    First we need to know what you are looking for as a Photon generic feature and not as a specific one for your game.

    What issues are you having with Photon lobbies? I can't seem to understand the issue from your post, it's about AI and instantiation.
  • The problem (and it is all about creating a lobby menu or some other way to sync game start):

    I have purchased UFPS, UFPS-MP add-on, and am trying to use PUN. I want to launch the game on my console as the master. On the master, I want to add my player name, create a "room", and wait for other clients to connect. I want to display all clients that connect, and have them see the same information.

    They should have the option of joining the room that has been created, or starting their own room. When they join or create a room, they should be able to see a scoreboard that tracks gameplay stats.

    When the minimum number of players have connected to a room, a countdown timer should start. Every player should have a "ready" button. During the countdown, anyone should be able to join a room, up to the maximum number of players. If the minimum number of players are present and ready, the game level should be loaded on timer expiration. If late coming players were not ready, they should be returned to room selection to sit out the round. If maxplayers is reached and all are ready, the master should see a LAUNCH button to by-pass the countdown timer.

    There is a checkbox to Auto-Connect To Lobby, but it doesn't provide a lobby functionality, it just loads the game. I am trying to run an FPS. I need to start all clients at roughly the same time. If the game starts immediately upon the 1st client starting, instantiation of AI characters will only happen on the 1st client. Anyone who joins later will not see the first AI characters that spawned before they joined. This is a basic, functional multi-player lobby. This is a fundamental component of multiplayer paly. This is NOT a function for UFPS/UFPS-MP, so please don't pass the buck to Opsive.

    All I am trying to do, is make it so when the clients join, they wait for a period of time, and the minimum number of players to be present and ready before launching the level in order to keep spawned bad guys in sync across all sessions.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Kohi10,

    What you are describing can be done using Photon.

    Did you follow third party Photon tutorials? Sky Arena is a good one. These two videos (1 and 2) can help you make the lobby logic you want.

    What is a bit tricky, if I understood you correctly, is to show list of players inside a room from the lobby. You can do so using lobby properties with predefined keys with special format at least as many as the number of players.
  • @JohnTube regarding the tutorial on creating a game lobby, does it also cover for self-hosted servers?
    If not, then how do we create a lobby in on-premise server SDK?
  • JohnTube
    JohnTube ✭✭✭✭✭
    @Kaito yes code should be the same for self-hosted as well.