Monday, September 2, 2019

What are my options for building a centralized server architecture for a Unity game?


I have made in the past multiple offline game, and would like to make my first online game. I have very basic knowledge of server structure.


The game is a multiplayer RTS game, with ONE server (If possible in c#), where player can build base, attack other player and move around a world. it is in real time, but slow paced, so not many actions, and every time a user make movement it take let's say an hour to move. The game is planned for Android/iOS and (maybe) but not at all for the moment, web.


The game itself is easy, but the server I don't know where to start and I have been struggling in the last 3 days to find a informations and answer to my question. Most of the example I found are P2P/client-hosted server, this do not apply to my case, I want a single server that runs outside of Unity and that I can run on a computer as stand-alone. My question problems are.


1) for a mobile game, I have seen in some post that UDP TCP/Socket are not available in 3g? is this true ? If so, what should I Use ? I was thinking of websocket since MAYBE i make a web version, but I don't know if it's a good idea, and apparently it is not built in in Unity.


2) Related to my 2) is there any c# library that work in Unity and would fit my game needs? a user would probably load a map, and interact around 20 times with the server during the gameplay. I believe a simple server that get and send message only is largely enough, but I don't know what to use. Start from scratch? then what should I use, TCP ? Socket? WebSocket ?



3) Should I use photon ? I've seen is free to test until 20CCU, and since for probably the next 6month I will be alone on it it's OK, then at release let's say I have 100 player, is not that expensive. Is it a viable solution? I found it a bit overkill for my needs, but it looks documented and easy to start. Will I still learn stuff if I "cheat" like this?


Thank you for your time




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...