0
votes

I have recently began working with multiplayer games in Unity. I am not using Photon Unity Networking but rather the built in networking inside Unity.

In the game I am trying to create, each player has their own money, and inventory variables. My original plan was to store these variable client-side, but I realized this was a bad idea.

What would be the best way to store these variable like money and inventory on the server? I tried making a "Player" class on the server, and created an instance of the class for every player that connected. However, after days of research and experiments, I was unable to find a way to do so successfully.

I'm sure this is a common concept for multiplayer games. So I was wondering if someone could point me in the right direction on how to do so.

1

1 Answers

0
votes

The way we choose to do it, was to create a very basic webservice (REST) which the server (and the server only) could talk to.

The webservice was written in Perl with MongoDB as storage backend, but the options here are almost endless, so use whatever you think is best for you.