Synchronization and State of map

Options
Hi Guys. Im very fresh with developing games. Just started my first one for school project and I encountered a little problem with syncing map for players ower the network.

I've an idea with game that when players join the game then flat map 20x20 (build of tiles) will generate and after 5 second the random tile will flash with red color and then collapse and destroy.
Like in a video for example ; https://youtube.com/watch?v=fj_W8qAXxXY

I've got already written script for creating NxN map and then randomly picking one by one tile to flash and drop attached to empty game object. BUt the problem is that it's starting corutine for dropping cubes whenever any clien joins the room so they get unsynced holes on map and can fall only through own holes on own screens.. I im struggling with how to sync this for 3 days now.... any help or advice ?? :) I dont know when , where and how start that script to work that all players get sync data of fallen tiles.

i would appreciate any help.



P.S.
Sorry for my English :pensive:

Comments

  • vadim
    Options
    Hi,

    Let master client decide which tile should be dropped. Synchronize tiles states via RPC or room properties. Storing generated map and tiles states in room properties array is the simplest way to synchronize level between players. Start drop coroutine when OnPhotonCustomRoomPropertiesChanged event fired.