I know this topic has been discussed a lot, but I want to check the best solution for my case.
I finished doing a game similar to hearthstone. The single mode is working fine.
I want to add the multiplayer feature now. Details are:
1- Log in with username and password
2- Save players stats
3- Shows leaderboard depending on number of winning matches
4- User selects multiplayer mode, and waits till another player joins ( its only 2 players max)
5- For the server/game logic, I just need the server to send a bit of information ( card id, player id,) and the AI will move the card and control the card’s function.
Player-hosted games using Unity Services relay servers and matchmaking. This avoids the need for having a dedicated server but is less secure (the player hosting a game could be using a malicious client) and you need to pay for the services.
A dedicated server of your own that manages all the games. This is ultimately the more secure approach to prevent hacking, but you need to create your own server (and take care of the hosting) which, among other things, includes creating your own matchmaking system.
Which approach is best will depend on several considerations specific to your studio and project (e.g., type of game, expected number of players, team size, familiarity of the team with server-side technology, budget, etc.).
I use UNET in CCG Kit, where an optional Node.js + MongoDB server providing a REST-based API for player authentication, remote persistent data, card packs purchase and rankings is also included. But there are definitely many other options that are also suitable for this purpose.
Hey guys, I’ve used GameSparks to run hearthstone like logic all on cloud. It uses the Matchmaking and Challenge system, and can easily incorporate leaderboards into it too. My approach means housing all the game’s logic on the cloud while having the front end just reflect the data passed in from the backend (If card A2 from the player’s playing field attacks card B3 from opponents field then display that appropriately in the front end).
The entire game can be tested on GameSpark’s platform without using a frontend. The data can then be sent to Unity, Unreal, Marmalade, your own custom engine (provided it can integrate the SDK) etc and displayed however you like.
I’ve written a tutorial on how to do this using GameSparks on our doc website, if you want to check it out:
It’s an advanced tutorial that takes into account knowing a little about GameSparks, but couple that with the beginner’s guide to Unity and it becomes rather straight forward.
I’ve been working on multiplayer games lately, i highly recommend you Photon. I’ve used Photon and Digital Ocean server for hosting php files and database.
Sure thing, we’re currently over hauling our platform’s look. When that’s done, wel’ll be pushing a lot of video tutorials out. Hearthstone will be among them.
Turnbased and Realtime are more or less the same in Photon, as the API is the same. The main decision is if you need the game to be asynchronous or not.
For most card games it should be fine that a game gets played in one session. That saves you some extra work, as you don’t save a gameplay state.