Where should i store the user data, like Username, Characters etc?

Hello,
where should i store all my player data like Username, created Characters etc.? This game will be multiplayer.

I need

  1. Something to store all the data. (Character, Instance, Playerstate, Gamestate, GameSave?
  2. Pawn? For example a car, storing a separate Inventory and car parts.
  3. Character? To walk around on car meetings using the Inventory of the current car(Pawn?).
    (Not like GTA5 etc, it will be a racing game where you can walk around for example on certain maps, like in your garage).

I made now a Starting Map with “Username” “Password” input boxes.
Now i need to store this data after clicking “Login”, i make it now simple. When a user named like this doesn’t exist, just create one and set the password for it. If the username already exists, check for the password.
I’m mainly a web developer and i get my thinking from PHP.

I tried this:

It’s totally up to you. Just remember that for networked multiplayer you will likely need the replicatableness of GameState to extend anything all players’ devices need to be aware of, and keep what doesnt need to be shared in the GameMode and GameInstance. And if you need a playercontroller to share info to all devices you should put that info into its Playerstate instead. Pawns shoyld replicate just fine but remember when they die their info dies with them so only the controller and state ifo survives to the respawn.

I used PlayerState in my game. And, because PlayerStates get destroyed with servertravel, I also relied on GameInstance on storing and re-loading PlayerState data before and after server travel.
I decided to relay on Unreal’s framwork as a practice even if that functionality isn’t there yet. So, when Epic decides to add an automated way of story player data, surely it will be the PlayerState since it is the unique aspect for each player.

1 Like