Any suggestions about server type and logic?

Options
Siegfried
edited January 2012 in Native
It's my first post on this forum, so... HI EVERYONE ;)

I am evaluating photon now, here's what i need to do:

when player starts multiplayer, he is taken to lobby screen which shows other players looking for a game. He selects opponent to play, opponent agrees, they disappear from the lobby and start playing 1on1 (game doesnt need any server based logic).

So far my plan is to use LitePeer: initially player joins one predefined room, and if two players agree to play game, they are taken to another room (unique name based on their peerIDs?)

I am gonna use
LitePeer::opRaiseEvent(bool, Hashtable&, nByte, nByte, int*, short)
to send data in the first room to specified player (invitation, accept, decline etc)

Does it make sense? Is there any simpler way to achieve my goal (it's gonna take some time to implement in-lobby behaviour)? Any suggestions are welcome :)

Comments

  • Kaiserludi
    Options
    Well, you can do it that way, although I would use the LiteLobby application serverside instead of Lite, but all, what you are desrcibing + some more features like distributing gamerooms to multiple gameservers and beeing able to (but not have to!) use the exitgamescloud, so that you do not have to care about your own server-hardware, lsits of open games, etc., are builtin functionality of our LoadBalancing high level layer, which seems to perfectly suit your needs and will definitly be the simpler way to achieve your goals than using Lite.
    From your opRaiseEvent signature I conclude, that you want to use th C++ version of the client. The Loadbalancing layer for the C++ clients is in the final steps of its development and will probably be released this or next week, so I would suggest, that you wait for it and develop your game using the C++ LoadBalancing client.
    If you want to already get into or to evaluate the LoadBalancing client API , then you can have a look at the objC client version (iOS or OS X SDK), which already has been released. The C++ one will be quite similar, except of language-dependent differences. Alternatively you could already start development using Lite and concentrate on the ingame logic of the game loops, which will be the same when using LoadBalancing instead of Lite or LiteLobby.
  • Tobias
    Options
    A simpler solution for matchmaking in the Photon Cloud solution is to use random matchmaking:
    This operation looks for open games that have room for more players and will join that game. If none is available, the operation fails and you could create a game.
    Set a maxPlayer setting and you avoid getting one overcrowded game.