At some point while creating your game it will be necessary to store information externally and be able to retrieve this information. For example, you may wish to store login details, or hi-scores, or maybe the progression of the player through your levels. Whatever the reason, you will need to know how to use the different file functions that are available to you when working with GameMaker.
It is very important to realise that GameMaker is Sandboxed by default, meaning that there are a number of limits and minor complications when using the file system functions that are available, and it is worth noting too that the file system will work slightly differently depending on the platform you are targeting. For more information this, please see the following section:
You can turn off sandboxing on the desktop targets (Windows, macOS and Ubuntu (Linux)) from the Game Options for the chosen platform, meaning that you can then save and load from anywhere, within the limits of the OS permissions.
If you have been granted permission by Steam to use their dedicated API with your game, you will find that there is also a new set of file functions available to you. These are explained in the Steam API section of this manual.
Finally, you should also note that there are some distinct differences between certain target platforms which would be taken into account when using the file functions. These are:
Information on the different file functions can be found in the following pages:
GameMaker also includes a number of functions for encoding and hashing files and data, which you can find here:
Also note that there are some basic file functions for saving games available from the following pages (be aware that these functions are designed for beginners to get a basic save system up and running as quickly as possible, but for more complex projects, you should create your own save system using the functions listed in the sections above):
Finally you can find more advanced buffer functions that can be used for loading and saving data on the following pages: