Create/Join Game in LoadBalancing example

Options
KevinB
KevinB
edited October 2012 in Photon Server
Hi,

In the loadbalancing server example, it explicitly requires separate operations for creategame and joingame, and it prevents game being created by a join operation. Can someone elaborate a bit on why is that?

I am planning to add a createjoingame operation which will create game by a join operation if game doesn't exists, and just want to make sure that I am aware of any issue ahead.

Thanks.

K

Comments

  • dreamora
    Options
    Depending on your implementation it could lead to problems.

    Reason is the architecture of LoadBalancing (its not a single server):
    * Join knows which game server to connect to to find the game to join
    * Create on the other hand doesn't do so, it asks the master server which will direct it to the game server with the lowest load to create the game

    As such what you would need to do is always issue a create and if create fails cause room exists, you would then instead join it.
  • Tobias
    Options
    We removed the create/join operation when we added game properties. Those should only be set on create and not by someone joining (in our opinion and usecase). The mixed operation makes it really hard to decide if you have to send game properties or not and if they end up ignored or used.
    That's why we removed it. The loadbalancing workflow was added a bit later on and also could be problematic.