- Home /
Creating an online multiplayer game for android using mirror
I'm working on an online game for Android using mirror, I want to know if i will have to pay for servers to host the game sessions or if there are free ways to do it, the game shouldn't be very complicated, it's a simple board game that will include 6 player max per session. Also is there a way to test my game on android devices? because so far all the testing has been on PC with local host.
Answer by GetLitGames · Jun 16, 2020 at 12:12 AM
For a game like this, generally it would be built by having the same code base for client and server. There are ways to develop a single server that doesn't share a code base with the clients, and handles multiple sessions at a time but most people don't do that.
Most people would develop a game where you can run as a host, and other players connect to that host. For a situation like this you need a proxy service like Photon but it costs money over 100 CCU. In order to use Photon, you have to use their library like Photon PUN2 or Photon Bolt and not Mirror.
Without a proxy service, I'm not familiar with Mirror but unless it supports NAT punchthrough (STUN) then the only way for a host to allow incoming connections would be for the player for open ports in their router etc which is unreasonable for a modern game.
For a card game you also might want host migration, where once the host disconnects or whatever the other users can keep playing or allow the host the ability to reconnect. Photon PUN2 supports automatic host migration, Photon Bolt doesn't and I'm not sure if Mirror does.
Most likely Photon PUN2 is the best library for your card game but you could research whether Mirror allows you to setup a proxy server. If it did, then you would need to pay for server hosting. You could possibly start out with a cheap VPS solution for $30-40 a month, or a single Windows dedicated server where you control the entire machine should be less than $100 per month although you can find prices way over that. If Mirror has a proxy server built for Linux, you could find a little cheaper for a single dedicated server. Be wary of Shared servers, and VPS because you never know what quality you will get and if you want dedicated make sure it states the # of CPUs, storage, etc and ensure that it specifies completely Dedicated.
Your answer
Follow this Question
Related Questions
How to set up LAN/Same Wi-Fi Multiplayer on Android? 0 Answers
Application.genuine 0 Answers
PC Android LAN Network Connection 1 Answer
How to use Alljoyn to make multi-play game 1 Answer
Multiplayer for Android/iOS platforms 0 Answers