Hello guys!
After 3/4 years working with Unity and considering myself to be decently experienced already, I'm thinking about starting my first multiplayer project seriously.
The idea is to make kind of an idle game, where there is very limited interaction between players. I will not have to deal with real-time server authoritative movement or anything with fast-paced real-time.
What is going to happen tho, is that everyone will be connected to the same database and the clients will fetch that data to show the game state. There will be a quest system similar to the use case shown in the tutorial docs for netcode, inventories and equipments, server authoritative resource generation, etc...
I do have some questions about how to proceed on an scalable fashion:
-
Ideally my API would be stateless, on a client call, the API will read the database and decide whether that action can or cannot be made. As such, the database motor needs to be fast. For this im thinking about using sqlite, is there any other recomendation?
-
Im not sure if i should use Unity UGS and what I should be doing on the API or as RPCs inside Unity. The idea is that while RPCs offer a lot of shared code, I'm not sure how scalable that is. Ideally i want a solution that can be horizontally scalable that I would be able to dynamically load balance using kubernetes or something.
As an example of the problem that i have in my head: Server is source of truth, so the player that wants to equip an item has to call the API, which reads the database for the player for the requirements (level, stats, if there is such an item in the inventory). I'm not sure of a solution that would allow that process to be relatively fast (under 100ms would be perfect).
Any help on this matter is greatly appreciated!