-1

We are working on a multiplayer game in Unity. The players can have weapons. The weapons and their attributes are stored in the database on the server database. But how can we show all the weapons in the game(not only player owns) to the player. Do we need to make a database on the client side too? (mobile game so we don't prefer database) or send all the information to the client when he logs in the game?

I was thinking of storing the information in a XML file on the client side and initialize the weapons with a script, but on the other hand the players can reach this file and change it. (not a security issue but we don't want them to do this). Can you tell me some other approaches?

user3071284
  • 6,955
  • 6
  • 43
  • 57
Emre Canbazoğlu
  • 113
  • 3
  • 13

1 Answers1

0

Basically it depends on the way you use the weapons in your game. I suppose that your server must be synchronized with the client version and the weapons your client can handle in game logic, otherwise when your character will get a new brand weapon he can't handle by the game logic you will not accomplish anything.

On the other hand, if you have generic weapons (gun with fire rate +1) with game logic that can handle the fire rate change, there will be no problem adding gun with fire rate +3 on the server side without updating the client.

So if we are talking about the first case, no need to update the client unless you want to display a list of new weapons available for the client in the next version. For the second case you can synchronize the weapon list on user login.

MikeL
  • 5,385
  • 42
  • 41