Scenes not syncing as expected

Hi guys,

I'm trying to build a game in which each player can create/modify/destroy anything in the game world apart from each others (player can't eliminate other player).
The only way each user can interact with each other is by creating objects, modifying them or removing them from the scene/room.

For these reasons I would like the state of the world to be in sync no matter what happens:
1. if my player creates something in the world and that doesn't get destroyed, any other player previously offline now connecting to the room has to see the latest state of the world.
2. if anyone online has destroyed anything in the world I should see the resulting effects of the action once I log back in.
3. if I leave the room or the game all the objects I have created should not disappear from the world in the other clients.

(Let me know if you need more examples)

As of now, I am struggling to achieve this as the RPC strategy doesn't seem to work: I am sending BufferedRPCs but they get lost if the client is not connected so when I join the room my world is not matching with everyone else's.

So, is there a way to achieve this using PUN at all or am I just thinking about it in the wrong way?
Should I consider using other photon frameworks?

Comments

  • one thing is you have to deal with the empty room condition, as when no player in the room, the room will close without save by default. You might need external server to do this.

    another thing is keep all instantiated as room objects and let the ownership either takeover or request.
    in request, you might let master client to handle ownership transfer; while in takeover you can let room properties CAS to check the ownership.
Sign In or Register to comment.