cooldev
cooldev

Reputation: 41

How do large games save Data?

Can somebody please talk a little bit about saving data for large games in Unity?

I'm gonna start working on a MMO soon, don't worry I have a realistic scope.

It feels like everything JSON, binary formatter, aren't good options because they can just be changed by the player anyways. However, if I went on any of the big shooter games for example, how do they save data? Cause obviously I can't go into a big game like that to change my data?

How do the big games do it, and what is a good way to save data for large games?

Upvotes: 0

Views: 793

Answers (1)

R Astra
R Astra

Reputation: 469

Many big games store data in the cloud, especially online games like MMOs. The cloud server has authority over saved data (e.g. player inventory) and realtime data (e.g. player position). This prevents players from hacking items or teleporting, because all their computer can do is tell the server the player's input (e.g. movement direction); their computer can't dictate the player's inventory or position. This means that your server will have to run physics and gameplay logic as well as store all player data, so it won't be very cheap at large scales.

To store the data in the cloud, make the server send save data every time a client (player) connects. While they are connected, use something like Unity's built-in multiplayer system (e.g. for position use Unity Network Identity, Unity Network Transform) to make the server have authority over runtime data and keep the clients up to date. When it's time to autosave or shut down the server, the server saves all the data. The client never has to save data and the server never has to request saved data.

Upvotes: 1

Related Questions