Cached events not being [re]sent to newly/re joined actors

JohnTube
JohnTube ✭✭✭✭✭
My problem is that events sent by the first actor are not being transmitted to the second actor who joins the room later (post events). Althought the first player didn't leave the room I was having doubts about the RoomOption.CleanupCacheOnLeave option. I'm setting it to false in OpCreateRoom with LobbyType.AsyncRandomLobby. But when I checked the saved Room options in Parse I'm always seeing DeleteCacheOnLeave set to false. Is it normal that the two keys for the same purpose have different names ? Maybe they have nothing to do with each other...RoomOption.CleanupCacheOnLeave should always be true in that type of Lobby or for all turn-based games ?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Problem was fixed :
    I was sending Event and specifying the TargetActors (3 - LocalActor.ID) in OpRaiseEvent(). I removed it and now it works !
    but can someone tell me the difference between CleanupCacheOnLeave and DeleteCacheOnLeave ? and also EventCaching.AddToRoomCache vs. EventCaching.AddToRoomCacheGlobal
  • Good you found one fix. Thanks for that update.

    I can't find "DeleteCacheOnLeave" in our API. Where did you find it? It might be the same, actually. It will clean events of a player when that client disconnects / leaves the room. Or it leaves that clean up to you.

    EventCaching.AddToRoomCache vs. EventCaching.AddToRoomCacheGlobal add events to the RoomCache (our sequential cache). The first adds events "tagged" for a player. The latter keeps events in the cache as "coming from the room" and they don't get deleted when a player leaves. It hides the origin, I think.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Here's a screenshot of the State field of a game entry saved in Parse (GameState file) using the default node app provided in your github examples.

    game_State_Photon.png

    I alread had few questions related to the Binary, Debug_Binary, Debug_Properties_19 and Debug_Events_18 fields elsewhere in the forum but no answers yet, I guess it's related to the binary protocol used by Photon.

    Anyway you can see that there are two fields for game events : DeleteCacheOnLeave (always true even if I set the CleanupCacheOnLeave to false) and SuppressRoomEvents.
  • JohnTube
    JohnTube ✭✭✭✭✭
    @Tobias : still no answers regarding CreateOptions.DeleteCacheOnLeave (from GameCreate, type "Create" args, always true ?) <-> RoomOptions.CleanupCacheOnLeave (LoadBalancing API).

    New related question :
    CreateOptions.SuppressRoomEvents (always from GameCreate, type "Create" args) has no equivalent ParameterCode in LoadBalancing API only in PUN (http://doc-api.exitgames.com/en/pun/cur ... 73b5e3dabf) and I think its description at the end is wrong : it should be Default : false (and sent) or Default : true (and not sent)
  • SuppressRoomEvents is not yet properly used anywhere. We did this for a very specific usecase but don't want to support it publicly, actually. If you suppress those events, things will fail to work because some info is missing. In LoadBalancing, it makes more sense actually than in PUN. I will take a look and clean up. Thanks!
  • difference between CleanupCacheOnLeave and DeleteCacheOnLeave
    there is now difference it is a naming inconsistency.

    I just ran a test with the loadbalancing api

    private RoomOptions myRoomOptions = new RoomOptions()
    {
    ...
    CleanupCacheOnLeave = false,
    ...
    this.OpCreateRoom(roomname, myRoomOptions, this.CurrentLobby);

    and as you see it is set to false.
    >
  • > difference on EventCaching.AddToRoomCache vs. EventCaching.AddToRoomCacheGlobal

    As Tobias explained AddToRoomCacheGlobal strips away the original "sender" information.