Best way for a lobby to work in a racing game?

In my racing game I’m trying to work out how the public games will work.

For private games I think I’ll just have a waiting room where the characters can wait until their friends join and the game starts and then they can race several races and have lots of customisability. (Maybe they’ll have to Skype their friends to tell them their online?)

For public games I think I’ll have a playlist scheme which just puts them in the next available game. The problem is if people are racing for a cup you wouldn’t want to join in half way through. But Unity’s Master Server doesn’t know which games have begun or not. So either for public games I would have to restrict it to single laps so they don’t have to wait too long for the next race.

Another idea is to “alert me when races are available” and let the player just practice in single player mode until more players join.

Or I could have a waiting room (which is a room on the Master Server) where people can go in it and wait for other players to come in, then they could somehow decide between themselves if they have enough people for a race. Like if two more people come in they can decide, “lets not wait any more and just have a race now.” And the rest of the players can be AI.

But then if the first player creates a waiting room which is hosted on their computer but then other players come in but the first person leaves, the hosting will have to transfer to a different player! Unless the waiting room was hosted on the server.

It’s a minefield!

Crash Drive 2 from M2H has a well done lobby/matchmaking:

  • Play with friends
  • Level to join (“Canyons”, “Tropical”, …)
  • Each level shows the “# of players playing”
  • Random join into a active games (but you have to wait until the current round finished)

Chris

Thanks Chris I’ll check that out!

(Is this your game BTW or just one you like?)

It is built my M2H/Mike using PUN. (And I like it.)