unity3d - how to code on server side in photon in unity -


we need create game 10 + 1 users. 10 players real users - in multiplayer online game. 1 player dealer app software - work dealer. dealer not real player. dealer throwing dice.

how can in photon pun ? using free version of photon right now.

depending on photon client sdk use, should have callback of when master client changed (should "onmasterclientswitched"). triggered when server detects master client disconnected. master client should actor lowest actor number there way force master client (change client). if save data in room properties or send events , maybe cache them, there no risk of data loss there long room still "alive". actor properties on other side, should cleaned when respective actor leaves room.

one tricky situation though: when master client not responding , did not explicitly disconnect, there may few seconds (default timeout 10seconds) before server detects that actor timed out , switches new one. if situation concerns you, instance if target mobile, can discuss possible solutions.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -