[Design] Where to save in-game Player data ?

JohnTube ✭✭✭✭✭
I'm seeking advice from you guys about my game. Right now I'm using CustomProperties of Actors to save "in-game" UserId, Score, equipped Powerapps and other player related data per game. I've read somewhere that LocalPlayer properties are cross Rooms, they persist from Room to Room so I need to leave the Room and update them before joining a new one.

The Memory demo uses CustomProperties of the Room for the same purpose. Is it the right way to do it then ?


  • It's a matter of preferences, I'd say.
    You can save the player related props in the room, if they are also room-related but you can as well set them as player props and clean those when you switch rooms.
    The player.CustomProperties can be cleared when you're not in a room. Anything saved inside the room will stay in there for Turnbased / persisted games.
    When you use a room property per player, the values stay in the room "automatically". It's not wrong to do it this way either.

    Does that make sense?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Yes it does make sense. And I know that all CustomProperties (Room and Player) can be persisted as the GameProperties webhook is called when any Property (Room or Player) is changed/updated.