[Help] I Need help with creating a multiplayer card game

Hello guys,

I am developing a card game that consists of two ways, Player VS PC and Player Vs Player VS PC, the game consists of four players. each player should be placed in front of the other forming a square, when a player first enters the game he will play against 3 PC’s (AI) then if any of the players wants to join, the game should replace a PC with a player, for now i have achieved Player VS 3 PC’s in a good way, but i am a little bit stuck of the idea of replacing a PC with a player, i have tried to learn Photon API to achieve my goal with it, but i couldn’t figure out how to do it.
So if there is any ideas of how to achieve multiplayer game with player VS PC at the same time, i will be glade to hear your advice’s.

I am using WebGL for the website.
Here is a link of my current game: qwader.com/bastoni/index.html
you may try the game it’s called Tarneeb, you can place your bid at the beginning then choose the cards type you want,

Unity has its own miltiplayer system as well (used to be called UNet), but that should suffice for something that size. Have a look at Unity

also, are you doing the Unity course here? if so theres the ahoy matey section that touches on multiplayer.

Ive not used the Multiplayer side of things much apart from a little primer, but to get the ball rolling I’ll add my 2p worth :slight_smile:

so just thinking off the top of my head, essentially there is 4 seats. each seat takes it in turn until win conditions are met.

if turn goes to seat A, need to find out if that seat is AI or Player, then make that seat play its turn.

how is the hand played at the moment, that is after player/AI has made a choice, is a function called that PlaysHand() for example?

im guessing you have an array or list that holds all the 4 seats players. and each seat has a class that holds all the hand/points data etc.
you could, if a player wants to join and take over an NPC slot, search for the next AI player and copy the class data so the player has all that info, remove the AI at seat and add player.

possibly even a pen and paper to draw out thought process to see how it looks, might give a better overview if seen on a bit of paper.

Well you got it right, there is a function and an array that has players turns, i will read about the multiplayer that unity has and then reply back again.

Thank you :smiley:

Hello again,

i really couldn’t figure how to do it even after watching tutorials, i really need to chat with someone.
i can’t figure how to replace places or even how players will communicate with each other.

have you done a simple flow chart of gameplay progression?

just out of curiosity, leave the programming to one side, if you get the logic on how it progresses the coding etc its academic.

Privacy & Terms