Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Turn based card game, I can't get my multiplayer right, advices and insight needed

$
0
0
Hello,

I've implemented multiplayer in my mobile card game using PUN. After many iterations I can't get it stable enough, everything I test pass but once in production many player will encounter issues that will block the game and ruin the experience.

I know it's a long call but I'm open to any advice that would help me to improve the situation and make the game stable.

I'll try to describe my current implementation in a simple way:
It is p2p, and turn based, meaning that will often wait for the action of a specific player to continue the workflow.

At the start of the game, the master client sync the card deck and a few specific game settings with all clients (who is dealing the cards, this kind of thing)

Now here is how the game will play:
  1. First player select a card to play
  2. The card is sent to every client (including him) via server
  3. Once received by client, the card is visually played
  4. Once the card is visually played the client notify every other client (including him) , via server, that they have properly received and played the card
  5. Once the master received all the notification that the card was played on every client, it proceed to the next player
I thought that having this king of double check would make the game more stable, now it is slowing everything as players have to wait for confirmation from all clients after every action, and stability is still not there.

Is this a good way to ensure data are still synced between clients, do you recommand any better way to do?

Now the most frequent issues rise when a player disconnect, I handle and have tested all the possible case I can imagine, but still it will continue to block the game from time to time with real players. At a point where I really doubt my implementation.

Is this kind of p2p multiplayer implementation that hard to do properly or am I missing the whole point?

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>