Multiplayer Lobby Question important feature

I am interested in creating a pre-game lobby for my upcoming shooter title. The lobby tutorial for Smartfox is ok but is not quite what I need. Below is an example of the process a player would go through in order to play online:

  1. Select Multiplayer from the main menu
  2. Type user name Log in
  3. After logging in the player would be sent to the “Map Selection Room”
  4. The player then would select the desired map and be sent to the lobby for that map
  5. Once in the lobby the player would be greeted with a character setup screen with the usual info
  6. Once the player has finished setup they would then be free to roam the lobby and interact with other players (maybe even a upgrade shop).

The problem is that I have designed a room that would act as the player lobby but have no idea how this could be implemented. Here was a thought:

  1. Have the lobby scene loaded after the player connects and logs in
  2. Have a timer in the lobby scene that tells the players how long before the next match
  3. Once the timer is up the players are then sent to the map and the match begins.
  4. Once the match is over players are then sent back to the lobby and the process starts over.

Problems I can see happening:

  • matches will start with one person if no one joins before the time runs out
  • no way to switch maps while in the lobby after playing

Please help guys…

you can check the amount of players in a room and if there is only one player, just reset/restart the timer.
I don’t know what you mean with the second question.

If you want to use ElectroServer as your middleware, it’s pretty easy to do what you outline above and I’d be happy to give advice in the Electrotank forums.

anybody else have any ideas

  • Start the game:
  • Go to a room
  • Select another room to go to
  • Wait for the game to start and load another room…

That’s the process, right?

How about:

  • Start the game
  • Go a global lobby where all players gather and setup your character
  • Go to the different games (shown as doors and info on the wall beside it) and place your ‘I’m in’ tag in the virtual “slot”. If you want to change the game you want to play, retrieve your tag and place it in the slot of another game.

If you really don’t want the player to select the game via 3D avatar walking around, select a game via an onscreen scroll box.

Here is MY setup:

  • Click “Start playing”
  • Login box pops up and validates your account
  • Automatically log in to the first available server
  • Walk around a 3D environment where you speak with other players, buy items, review your settings / stats etc
  • Go up to the map selection object and select a map (or cancel and stay where you are) and be teleported there.

That setup sounds more like what I am aiming for, and I have that setup up. The problem is more so figuring out how to get the lobby setup itself. I need the timer to start only after a minimum of 6 ppl enter the player lobby. Then once the timer hits 0 then the players in that lobby will be sent to the map. And all while that is going on as other ppl login to play the process repeats itself.

I’m so lost.

function AddPlayer(player : NetworkPlayer)
{
PlayersThisGame.Add(player);
if (PlayersThisGame.length == 6)
   InitiateTimer();
}

I can’t seem to see the problem you are having… I am completely lost… sorry :stuck_out_tongue:

Ok, I am back after a break. Is that the entire script or do I add that to a script.?

Oh, and by lost I mean super lost, like no script to start with because I can’t fully grasp this networking. sorry, I’m an artist :P.