3 Replies Latest reply on Feb 10, 2009 11:38 PM by TheCoffeeBoy

    MultiPlayer Game Lobby

    pdkn Level 1
      hi guys,

      I've got an plan for a simple 2 player quiz game against a timer to test Adobe's new services. I have ideas how I might be able to use Stratus to send xml questions to opponent (as bytearray?) and get the 2 clients sending each other notifications as to when questions are anwsered. However How would I set up a Lobby so players can actually find each other? would I need a Cocomo account for the lobby? and then use Stratus for gameplay? or would you suggest doing the whole thing in Cocomo? I'm a little unsure how Stratus can be used for 'Mulitplayer Games' as suggested? Any pointers would be ace, thxs paddy ;)
        • 1. Re: MultiPlayer Game Lobby
          pdkn Level 1
          Ooops, appoliges for duplicate - Forum gave me an error when I posted first time but looks like first post got send? delete at will ;)
          • 2. Re: MultiPlayer Game Lobby
            pdkn Level 1
            Ok, From reading the docs - how the lobby in managed seems to be outside the scope of Stratus. There are suggestions but I'm not a server guy so wondering if there's any advantage in using Stratus with Cocomo and even if it's possible? thxs paddy ;)
            • 3. Re: MultiPlayer Game Lobby
              TheCoffeeBoy
              You don't really need "real-time" info for lobbies IMHO. Any server-side system (such as PHP) should be able to do something like this. You maintain a simple database of "games" and present this list to the player. If fact, in most situations you'll want to maintain a lit of current games and some game state variables throughout the life of a game so some kind of server-side persistent storage is probably a good thing.

              Each game would have a separate state ("playing", "waiting for players" etc...). A player can make a new game so you make a new DB entry with the game name/id, a status of "waiting for players" and the player details (so those attempting to join can establish a connection). Make a lobby screen that queries and lists all games with a state of "waiting for players" and simply have clients on the lobby screen auto "refresh" the list every 5 seconds. Once a player selects a game to join you establish the connection and either change the state of the game in the DB or remove the entry from the table.