How do game devs go about making a user's multiplayer experience persistent?

I come from a web/mobile development and CS background but now I want to dive into game dev. I have looked into services like GameSparks and Playfab which seem to be an entire one stop shop. That is fine and all but I also looked into PUN and UNET. To me they just seem like servers to host multiplayer games. They don’t really handle data. How do I go about storing data such as stats, level, inventory and so on?

As many things, there is not definitive answer, i can only tell you how i would approach it.

For the persistent part i would use a database (which one really depends on the amount of user) and a simple server, even a webservice could work for the beginning. The purpose of this server would be to store user account data, players, inventory, avatar customization, etc. etc. And that can be queried like “What items do i have”, “Add this item”, “Whats my credit amount?” “Where did i log off last time?” etc.

The realtime part i would do with regular PUN or UNET and use “instances” of the same level to load balance the players into it.

Lets say its an agent game, where 4 agents go on to do missions but first meet in the HQ with many other agents to form groups and start missions.
I would let my server “host”(a bit like a dedicated server) multiple “rooms” of the HQ Level for players to connect. When the player logs in, the game chooses one of the available HQ instance rooms that still has free space in it and joins it. The rest from here is regular realtime multiplayer, mixed with occasional calls to the persistent server to update or query persistant information.

I hope that gives you a rough idea how you could start working on a persistent multiplayer game.

Hi @connorb1,

When you sign up to GameSparks, you get access to a NoSQL Database with a really simple interface and API for saving, reading and updating player-centric and game-centric information.

For example, when a player log’s in, there is a special document in a database for this player that can track things like Level, Stats etc… what’s more, you can create entire collections of data for things like Inventory. Not only that but a lot of functionality that is common to games comes out of the box, like Virtual Good management, IAP integration, Achievements, Push Notification config, and is all easily testable through our new Portal. You can find tutorials on these, and more, in GameSparks Learn+ https://docs.gamesparks.com/

If you have any further questions about GameSparks or would like to discuss how best to implement this and other features in your game, please head over to https://support.gamesparks.net/support/home to get in touch with our support team. We’d be more than happy to help!