- Home /
Mobile Networking
Hello,
I'm working on a mobile game and want to make it multiplayer. I have next to no clue where to start though. Multiple example projects I downloaded had different ways of doing it and none were exactly optimized for phones. My main question would be: Is a server strictly necessary assuming that only 2 phones would be connected at any given time or could I get away with only using a server to connect the phones to each other then have them communicate directly?
Thanks
Have you gone though different multiplayer provider like :
1) GPGS
2) Photon.
using GPGS you can connect max 8 device at a time in a room.
I honestly had heard of neither before now. Photon looks good. GPGS doesn't support iOS anymore which my $$anonymous$$m wants to release on as well as android so that's a downside. Unity multiplayer is another thing we're looking at.
Answer by Vandarthul · May 18, 2017 at 12:51 PM
Hello, @Rangr
I would recommend you to use Photon Engine over Unity Multiplayer. The main reason is when master client(client that created the room) leaves, the game will be terminated in Unity Multiplayer, but not in Photon. Also it has bunch of other stuff that can support your game needs.
Is a server strictly necessary assuming that only 2 phones would be connected at any given time or could I get away with only using a server to connect the phones to each other then have them communicate directly?
It's up to you. In Photon, you can have a custom server that will communicate players via Server(Authoritative Server) or you can use default Photon servers to create rooms for you and master client(client which has created the room and has authority to do stuff in the room) manages the game logic. As you might guess that second option is not secure at all, so there are no control logic to prevent people from cheating(there is an exception to that, please read further below).
If you choose the second option and want to have a custom-server-like behavior you can check out PlayFab. PlayFab is a backend platform where you can store player or title data, items, contents and bunch of other stuff. It also has Photon Add-on which implements itself to Photon Callbacks, this way you can secure your game up to an extend.
Hope these helps you a bit.
Your answer
Follow this Question
Related Questions
How can I connect PC(Unity program) with Mobile Dvice(for Android)? 3 Answers
Networking 2 player game - use MasterServer? 0 Answers
networkdiscovery find IP of one of Devices but not connect to each other 1 Answer
Networking Question about Activating/Deactivating Server, I need a logic path 1 Answer