we are two developers who want to create 3D multiplayer RPG with Unity.
We are, however, limited by money and therefore I want to ask you what solution would you recommend to us?
It should be game for 100-300 online, but we want to create special system of allocating “rooms” to players, to avoid performance issues. This system will not allow more than 5 players in single room (scene).
After doing a little research I found out only one affordable solution.
For starters to rent some cheap virtual server (4GB RAM, 2proc.) => 200e per year
Install there Photon Server and for starters try limited version for max. 100 users => 80e per year
Buy and install Windows on the server, because unfortunatelly Photon runs only on Windows… => 200e per year
Firstly I thought that we will not need a server at all, but I think we will need to store user data, for which Photon Cloud is not enough.
Or maybe I am mistaken?
So again, my question is, do I have anything wrong here? What would you recommend as the cheapest option?
well if its just for storing user data and you dont care about it being vailidated by an authoritative server, you could stay with Photon cloud, and let clients connect directly to a mysql database via php to get and set their data when appropriate. Say they go through a login process first, get their personal data, and then replicate it to other players via Photon cloud. Obviously you’d still need to host that database somewhere though, and take care through design not to have hundreds of connections to it at once, which I doubt a cheap hosting would scale to handle well.
The thing is that I want to have many “rooms” with limited number of players. These rooms should be independant on the rest of the game.
So you can imagine that the load to server won’t bo so dramatic.
Your last link was to a method using Unity’s built in networking where I believe one of the players acts as the server for his room and each player is authoritative about themselves. Thats pretty simple and obviously more affordable, though whether it is sufficient for your needs depends on how you:
want to store your per-user data - see my last post for letting each client connect to a database to retrieve and store it, but keep in mind that this would be more prone to cheating than having a server take care of it.
want to store per room data (if you need any to persist) or score/ranking tables
what to do when the player acting as the server quits (migrate the server responsibility to another player or end the session),
deal with the complication that players acting as server need to have their ports forwarded on their router (either manually or through UPnP).