Sandboxing is incredibly important when users suddenly start to export to other platforms, and then suddenly it all breaks. We then get support tickets asking why this is, only to discover after hours of searching through their code they've been trying to save stuff to "c:\MyGame\test.dat" on an android machine. Sandboxing takes care of all the cross platform issues, including when loading from a compressed ZIP on android to saving into the correct areas.
If you don't want it, there are extensions to bypass it, and this also means when you try to export to android, you'll figure it out yourself as a windows DLL won't export.
Just because you may not be a novice, doesn't mean you know all the save points on all platforms or consoles, and even if you think your being smart by saving to a relative path, that just won't work.
The sandbox needs to be gotten rid of or at least made optional/configurable, precisely because you don't know where all the possible load and save points are. You shut out perfectly valid load and save points and add needless extension dev work for GMS users. None of GMS's competitors do this.
Let's take Windows as an example. Here are a number of valid load and save points that the Sandbox won't allow:
- Saved Games (under home directory)
- Another directory in %localappdata% or %appdata% not exactly equal to the project's name (e.g. multiple games belonging to the same company or series sharing data with each other)
- My Pictures (under home directory)
- Files passed in through the command line for opening
There are use cases for all of these. We've opened tickets on Mantis about all of these. No action for 4 years.
What about Android or iOS?
- The photo gallery
- Camera pictures (DCIM)
- File paths returned by file selector extensions
All of GMS's competitors allow access to these as long as you set the right permissions and go to the right place. GMS alone makes its users jump hoops and write proprietary extensions, just because its creators fear novice ignorance even when non-novices are using it.
If you insist on a sandbox, I suggest adding the following functions:
- file_sandbox_allow(path): Adds the specified path to the sandbox's whitelist. Will throw an error if it is inaccessible.
- file_sandbox_deny(path): Removes the specified path from the sandbox's whitelist.
If anyone makes the mistake in your example or anything along that line, the error message along with the name of the export + OS version would make the problem trivial to resolve.
Let people who are novices play within the sandbox. Let people who aren't break out of it as needed.
This is a should-have for 1.x, and a must-have for 2.x.