General architecture for turn-based board game ? I have my 2player game ready (pass the screen) ...

Options
Dear All,
I just finished the PUN2 tutorial and did another one from youtube (dapperdino). But they were focused on real time movement and such - using the PhotonView component.

I am at lost about trying to implement multiplyer (2 players) for my already coded game.
- It's a 2 player card game, with things happening on a central board too.
- All the game data for my game are basically many ScriptableObjects and some scripts (that I will save into JSON).
- My game loop is , today, a series of CoRoutines, and each time the game switch players , i show a screen saying "pass the screen" please, then a button, and boom, next player plays his turn.

I would love some help about how to "think" about creating my online 2 players system with PUN2.

I understand, i think, how to get the 2 players to matchmake and join a room. But then.... how do I attribute 1 player to be the red player and then 1 player to be the blue player.... but more importantly.... when the players do actions that modify the content of the game.... how do I get PUN2 to register that and send the info to all..... how do I tell the "non playing" player to wait (show him a "waiting screen" / canvas) ....

the whole architecture / logic eludes me ....

thanks a lot and sorry for that noob question !!!

Comments

  • it is turn based, of course.
  • so, trying a bit to learn

    I used [PunRPC] tag, to have methods modify the data of a Scriptable Objects. and both clients (the build and the editor ) modify it and i have the data change after button clicks :) so amazing !

    1 question

    That Scriptable Object, which is placed in Resources Folder....is it synced and the same on both clients ? or only the master keeps it ?

    do all the Scriptable Objects I have to store data of game state will HAVE to be in /Resources folder ?

    thank you
    so motivated now !