Download

Need some advice for the usage of SaveGame and SQL

Hi all , now I need to decide which way to store Players data , mostly permanent one
for instance their account name , password , inventory stuffs and so on …
I’m wondering would it be stupid to save those data using SaveGame data in BP ? and why ?
maybe using any kind of SQL database would be better ?

I’ve always done that by using plugin “JSON query” (but it’s stop updated)
and then communicate with mySQL server ,
but after I learned how to use in-game SaveGame Data I found that pretty convenient ,
otherwise using additional database for myself need a plugin like “Json Query” ,
it’s pretty painful whenever the engine version change .

maybe there’s another way to communicate with MySQL server ?
well I’ve stuck with 4.10 because of the reason above so I decide to try something new .
Any information would be helpful , thank you .

Hi Bassam83,

Time to upgrade. I too was enjoying JSON Query, but keeping up with updates became a pain. Have you considered giving VaResta try? There is also UE Login Plugin.

I would anticipate storing Login credentials, Player account, Character Info on a persistent Remote Database for retrieval with Web pages such as a Login Screen, Player Stats, etc. You could even store the world state to achieve a form of persistent save game feature.

I use SaveGame Objects to store data on local machine for rapid loading and persistent temp storage. I would use Data Tables, if there was a way to add new data to them from within Blueprints. I recommend using both if necessary. Remote Server for Login, Player Data, Shared Data/Media, and Websites; SaveGame Objects as Local storage for cookies and faster data loading.

I’m looking at the UMG WebBrowser Widget an alternative means to communicate with my HTTPS Server. I plan to use this Widget as a backend interface to TheGameDevStore.com for testing as I build up functionality in TheGameDevStore.VR.

Good Luck to you in your Project.

SaveGame and SQL server are not even the same thing.
A SaveGame stores information that the local user knows, on a local machine, under the local user’s control.
A SQL server stores things that your servers have validated, on a server machine, that you control. (Users should never connect directly to the SQL server; always put an application server of some sort in between.)

In general, you either build your Unreal server to know how to talk to a SQL server, or you build a separate web service (on top of Node.js or Warp or Flask or whatever) that talks HTTP, and have the client talk to it using web requests.
Which way you go depends a lot more on what your actual requirements are. Without knowing what your specific requirements are, making specific recommendations is impossible.

Thanks guys , I think I’ve got a bit more clear now ,
If I’m thinking right , for a game that might needs to Online-Sync a player data ,
Savegame should only be used for somehing like User preference setting , something that doesn’t really matter right ?

As for important data , should only be saved in a SQL , and SQL should only communicated with Server not the client .
But If I intend to let the player host their own game , which means my SQL should be open for internet instead of just local right ?
and that’ll be kind of insecure right ?
I think I might got more SQL or PHP problem to solve , but still it’s really helpful , thanks .

SaveGame is not good for backend services. The save file can be corrupted.