RoomReferences LiteApplication

tolkun
tolkun
edited September 2017 in Photon Server
How I can create just two reference to the Room?
now in Lite Application references to the Room can be one,two and more

Comments

  • hi @tolkun

    you should invent it your self. There is no such feature in our code.

    if you just want to limit amount of users in your game, use MaxPlayers

    best,
    ilya
  • hello @chvetsov ,no idea how to use MaxPlayers..(((
    Now I'm checking count of Actors when add to list:
    if( Actors.Count<=2)
    { this.Actors.add(actor); }
    else {log.Debug("can be just 2 actor");}
    but it's didn't work
  • in such a way you will do again all what we already did

    best,
    ilya
  • tolkun
    tolkun
    edited September 2017
    i read all documention
    https://doc.photonengine.com/en-us/onpremise/current/applications/lite-application

    but i can't find anything about how to set maximum amount of players in the room
  • when you create game you send Join/Create request. in this join request you may add game properties.
    var gameProperties = new Hashtalbe { {(byte)255, 2}};

    then you add this properties to request dictionary
    request.Parameters.Add(248, gameProperties);

    after that your game will not accept more then 2 players. this property applied only during game creatation

    you also should take a look at samples which are included into client sdk you are using

    best,
    ilya
  • @chvetsov thank u for reply) but i want all logic of creating room was on server side.
    Client can just send join request ,and thats all; Client should not know room properties
  • well, then you may find how we use this property and set it instead of inventing your own way

    best,
    ilya