About 'Loading A SaveGame'!

In this video (objectives)…

  1. Setup saving from user input.
  2. Loading API.
  3. Using the loading API.
  4. Saving and loading a UPROPERTY.

After watching (learning outcomes)…

Load data from a save game file.

(Unique Video Reference: 12_LP_VR2)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

I need to know how to save and load a game file to and from the players computer while running on the server. What i have works fine in the Unity Editor but when on the server, I can only see the server directory where I don’t want the files saved (of course). Like the button used on this site that can browse my computer for files.

I need to know how to save and load a game file to and from the players computer while running on the server. What i have works fine in the Unity Editor but when on the server, I can only see the server directory where I don’t want the files saved (of course). Like the button used on this site that can browse my computer for files.

If you’re using a server, you have to have a connection from the server to each user’s computer.

You can use a service like Steam cloud where the user has an account hence both computers become “attached” and syncing possible. Maybe Epic will build theirs into UE5 at some point, but I don’t think it is with UE4.

If you’re using a dedicated game server thing like Nvidia’s streaming stuff, you need to see if there’s one for that instead.

If the server side is only the server and there’s a client on the user’s computer then you need to save it through the client if that’s possible.

Last option is to write the networking, syncing, and some sort of protection eg account all yourself.

The choice used is based on the project and personal opinion.

Another solution would be to have the player host the game directly. Is that not possible in your case? It seems odd to have server authority but then let the player upload any random save game. There are lots of potential security issues you would have to check for. What kind of game are you thinking of?

The game is Spooked and is loaded up right now. You can view it to see what I am talking about. In the upper left are two buttons labeled “Save” and “Load”. These bring up a browser window where they can save and upload files from their computer, (only while it is on a server, they are not able to do that) when they choose to do so. They are binary files and as far as security is concerned, if they want to waste their time hacking the files, it is not that that big an issue to me because the game is a single player game and in my opinion won’t matter much.
There is a button on simmer.io that allows us to upload a zip file. It opens up a browser window so we can pick the zip from our computer. That is what I am trying to do.
The idea behind this feature is to allow the player to save his game data from time to time, when he chooses, and if he finds himself in a jam to reload one of his previously saved files and begin again from that point.

I would think just opening a save dialog in the browser would do it. All you should hopefully need is put together the url of the file in the game code. Then you would need to spark a download dialog box with the browser and that url through the engine.

If you can’t do that then you need to use something compatible with or directly from simmer.io if they have something or make another connection. There’s different things people already do with simmer.io.

Few examples that may or may not be what you want but along the line of:
webgl with simmer.io https://forum.unity.com/threads/how-does-saving-work-in-webgl.390385/

https://answers.unrealengine.com/questions/539566/html5-content-control-browser-from-inside-ue4.html

[https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/Platform/LaunchURL/index.html](ue4 launch url)

I can’t provide a direct answer. But, the above should hopefully get you more understanding.

Ideally, you have an upload, a like download would be nice to go with it. You might want to change upload to be like download if download is different in the end.

Privacy & Terms