How can I make a multiplayer card game?

Hello. I’m a junior Unity programmer. I met with 2 graphic designer brothers who made a card game. They finished all game-play and graphics and they playing their games in Photoshop :slight_smile:

They asked me help for programming side of their game. I want to help them but I’m not familiar with multiplayer game technologies.

We need friend list (I think Facebook integration), server services ( like Photon) and maybe renting server. But I don’t know what I need exactly. Their game system like trivia quiz game. Gamers will have a profile, friends and they match each others in 5-minutes games.

I googled it but I’m still confused. Some people use node.js and another stuff but I don’t know what is their purpose.

I want to ask which steps are need to I follow. How can I build that system? Can somebody clarify it for me step by step ( like buy server, integrate your game with Photon, take friends from Facebook etc.)?

Probably best to ask in the Networking section but Unity’s new Unet system should allow you to set up a peer to peer network to play the game.

However a server based turn based game is probably a better solution, this would allow you to validate the cards dealt to players and help prevent cheating. But you would need a dedicated server running the game, at the moment I do not think Unity provides a server side solution for this (please correct me if this is incorrect).

Note: Facebook is adding a games service going into direct competition with Steam and they are opening an early access program you can sign up for.

I’d recommend starting with some cards.

Seriously though, you should probably break the problem down into smaller pieces, given that it seems like you have a few distinct problems to solve. Like, I feel like Facebook integration is a seperate problem from the actual online multiplayer aspect. I know nothing about this network stuff though, so I could be wrong.

Do you have a working local multiplayer prototype?

2 Likes

This.

Is there any reason the game needs to be digital?

1 Like

If you are new to networking and fairly new still to Unity itself, you should probably start out making a prototype that you fully expect to throw away. It’s purpose will purely be to let you explore and learn the networking API in Unity. You could make a simple card matching game:

  • the server provides the deck
  • the two clients each draw a card
  • which ever player has the higher ranked card wins.

With this kind of simple set up you can focus almost entirely on getting the networking communication designed and working correctly, and the experience will directly apply to the card game you really want to create.

The Unity networking code is described in the manual here:

http://docs.unity3d.com/Manual/UNet.html

It will doubtless be slow reading at first, but be persistent and try things out as you go along and you should be able to pick it up.

3 Likes

This tutorial is quite old, it may not work properly anymore on the current versions of Xcode and iOS.

Thanks for all replies. As I know, UNet is not very good solution for our game because it can’t store our player’s informations like XP or friend list. I think Photon can’t support too. Also our players play game when other player offline, like Trivia Crack. We need these supports for our game.

Dedicated server looks like best solution for me. But how can setup game integration? I know how to use cPanel little. People talk about Node.js. But is there any simple solutions in Asset Store? Or any other ways? Can any body share a roadmap for me?

you could look into game sparks and playfab. I know gamesparks has a heartstone style tutorial.

1 Like

“GameSparks” is my new dream keyword I think. Thanks for information :smile:

You’re getting “storage” mixed up with “transmission”. UNet is used to synchronise data between computers, not to store the data itself.

As @KnightsHouseGames says, this needs to be broken down into multiple parts.

1 Like