Best approach to move turn based game from Unet to PUN

We were developing a card game for up to 16 players using unet. Beside the design stuff, the game was almost finished until we realized that the game was getting random disconnects when we test with multiple players using mobile network.
Now we are trying to decide if we go with gamespark or photon pun. Both seems to need lots of change on our scripts.
I'm trying to find the best approach to change the roll thing to work on pun but I'm having trouble with it.

Our current implementation of the game has lots of network identity (photon view equivalent). Each card has one network identity and it is spawned by the host on a deck in the beginning. Each card has its own Commands and RPCs to achieve their effects. We also use plenty of syncVar to handle health, turn number, game state and etc.

I’m trying to decide if I should go for an option that I don't lose most of the job already done.

First, I thought about going with PunRPC as it is more similar to what we already did and to what we know about networking. But then I read somewhere that pun dont handle well lots of photon view. So I thought about move all the RPCs to the player and the card would find its correspondent RPC on the player and call it. Is this a good solution?

Keeping reading, I found that for turn based game you should use Raise Events instead of Photon View and RPC. I read the docs for Raise Events and didn't understand very well. RPC is clear to me because of previous knowledge and because PUN basic tutorial use it. Is there a tutorial or exemples of raise event?

If I go with Raise Event, what's the best solution? All the places that I have Commands and RPCs (game manager, the script of each card, players scripts…) should call its especific PhotonNetwork.RaiseEvent() and the player should have a script to handle all this in a single OnEvent()?

Thanks very much!


  • I posted again as Discussion instead of Question, but can`t delet the other one. Sorry about that
This discussion has been closed.