question

Matt avatar image
Matt asked

Best Option for Simple Multiplayer

Hopefully I'm not beating a dead horse (too badly, at least), but this is definitely the first place I need to start to get my bearings on what to do next...

Let's assume my needs match the well established flow of Clash Royale:

  1. Player chooses to enter a pvp match.
  2. They get matched up against an opponent based on level and trophies.
  3. They can send one of 8 different faces to taunt/communicate during the game.
  4. Based on their own progress, they can send an event to opponent that spawns enemies.
  5. Game ends and they can either rematch or talk smack and leave.

I don't need any syncing across games whatsoever. My needs are strictly 'event' based. I need matchmaking and some sort of turn-based support. As of right now my options seem to be:

a) Custom Game Server

b) Photon Matchmaking

c) Unity Multiplayer

d) Cloudscript / Shared Group Data

Frankly I'm new to this, so each of those options seems equally appealing to me. I can save on costs by going with a custom game server or Unity...I can save on time going with Photon. I can potentially save on both going with Unity...but I currently don't know which of these options, if any, satisfies my needs.

I appreciate any help - Thanks!

-Matt

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

In large part, it depends upon your security needs. Put another way, how much server authority do you want to have over the interactions?

a) Custom game server - Maximum control, since your server controls the state of the game session. You still need to check the inputs from the client to look for any cheating, but since all the logic is controlled by you, this is the way to go if you want to be highly secure.

b) Photon Realtime - Photon allows you to easily connect players to each other for games which are largely client-authoritative. They do provide webhooks which can be used for server-controlled logic defined in Cloud Script, but that's really designed as an input system that allows you to submit client inputs to the Cloud Script which then makes changes using the Server API. Photon only returns data back to the client for webhooks if there's an error reported.

c) Unity Multiplayer - In between a) and b), this gives you the Unity-designed system for some server authoritative logic and connects players similar to Photon.

d) Cloud Script w/ Shared Group Data - Only an option for turn-based games with small player populations, as CPU time is limited in Cloud Script and Shared Groups are only for use with small numbers of players. But yes, if you don't need to make a lot of Server API calls and you only have a handful of players in a session, you could control your game with server authority and put cheat checking code into your Cloud Script.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt avatar image Matt commented ·

I appreciate the breakdown, I think I'm going to start by looking into Unity's solution.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.