1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Feedback Please allow program directory to save and write data

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Shadowblitz16, Dec 21, 2017.

  1. Shadowblitz16

    Shadowblitz16 Member

    Joined:
    Jun 23, 2016
    Posts:
    601
    @Mike please can you allow program_directory to support both saving and loading?

    it wouldn't get rid of sandboxing but would allow the user to have portable game data.

    this would still keep people from saving to locations that could be harmful but it would also allow better modding support for gms games.

    it could be for desktop only if needed but I don't think this restriction is fair
     
  2. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    2,308
    I'm pretty sure you need admin rights to modify the program directory folder.

    If I remember correctly it's bad practise to allow write access to that folder, because it can mess up the application and or make it a target for viruses etc...

    I would be surprised if they would allow it, but I think there are extensions on the market place that can break out if the sandbox if you didn't know already.
     
  3. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,522
  4. Mike

    Mike nobody important GMC Elder

    Joined:
    Apr 12, 2016
    Posts:
    2,412
    Saving to places like Progam files (where games would normally be installed) needs admin rights, and so won't happen.

    GameMaker automatically Loads and saves to the most appropriate place on all machines.
    On PC, loading will usually come from Program Files (or where ever they've installed to), and then load from %localappdata% as this is where user data (per machine login) usually comes from.
    On devices like Android things are more complex, as games are loaded from a "ZIP" and then saved to another special area.
    Consoles get even complex...

    Sorry. The current behaviour is there for a reason, without it too many folk try to load/save from/to "c:\" and then expect that to work on everything. There are extensions if you wist to handle it yourself.
     
    IndianaBones and YellowAfterlife like this.
  5. Shadowblitz16

    Shadowblitz16 Member

    Joined:
    Jun 23, 2016
    Posts:
    601
    @Mike it may need admin rights to save on windows in program files but to a portable folder out side of it it does not.

    I don't see why admin rights is a big deal anyway? just have warning about it in the gm docs about it only being for desktop.
    you have done that before.

    @IndianaBones I don't see how it could allow people to make viruses. it would be contained in the program directory and if necessary a data folder that could be renamed.

    aka program directory not being program files but the folder of the game!

    @The-any-Key I don't want to have to buy a extension when there is no reason in the first place that this is not allowed.
     
    Last edited: Dec 21, 2017
  6. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,694
    Sorry, but I just don't buy this preemptive assumption of ignorance in developers who use GM.

    Just so that I don't have to reinvent my own wheel, here is a post I've made last year arguing against your point:
    Please, consider the tickets that have already been made about widening the sandbox, and consider ways to reprogram the sandbox without extensions. It's the least you could do to improve the most historically hated feature of GMS, especially with GMS 2.x trying to grow its professional audience. Virtually every extension for working around the sandbox expresses derision and contempt of the sandbox in their title, that should tell you something.

    If you want GMS to be taken seriously as a non-infantile tool for game development, perhaps the first place to start is to stop preemptively treating its users as infants. You are the only one on the YoYo team that asserts the sandbox's treatment of GM developers this aggressively.
     
    Sammi3, Shut and stigmund77 like this.
  7. stigmund77

    stigmund77 Member

    Joined:
    Nov 23, 2016
    Posts:
    40
    I agree, in my opinion keeping functions dumbed down like the sandbox filesystem because you believe the people who use your software are not smart enough to handle filesystem access places game maker one step away from being a professional game making tool.
     
  8. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,522
    I don't think you understand why there are an extension folder in GM :)

    By default YoYo dont allow it in GM. But it's not illegal to add the feature via an extension.
     
    Last edited: Dec 22, 2017
  9. Mike

    Mike nobody important GMC Elder

    Joined:
    Apr 12, 2016
    Posts:
    2,412
    Just because you don't agree, doesn't mean it's not totally valid. The ability of GM users covers the whole spectrum, but there are far more novices and those towards the lower end than experienced coders. You may not like it, but it's true. This is there because we've had to deal with this in the past - many times (in GM 8.x and early GMS1.x days), and this forces these users to do it in a way that is portable. If you're an experienced coder, it's not a hard thing to get around.
    It's the same reason that registry stuff was removed. Not only was it totally incompatible with cross platform development - as is the file system, it was abused but those who didn't really understand what they were doing.

    Rubbish, it's funny how the "most hated feature" is usually what someone themselves doesn't like.. Professional coders - especially those who move to consoles, will use the system as is, precisely because it IS so portable. If you're going from windows to Linux, to Mac to Android to XBox... you don't want to have to handle this stuff yourself, it's a nightmare that you just don't want to have to deal with.

    As I say, you may not agree, but there are reasons behind it that we're firm believers in, and that help preserve the cross platform nature of the tool. At the end of the day, if you don't like this and if you want to bypass it, then as an experienced user, you can easily use an extension to do whatever you want. There's plenty on the Marketplace....

    Lastly... having GML functions adding to the white list is a joke. Whats to stop anyone adding c:\ or c:\window, that's basically the same as removing it all. The END USER is the only one who should be allowed to add to the whitelist, to "let" a game/app save somewhere on his machine.
     
  10. Shadowblitz16

    Shadowblitz16 Member

    Joined:
    Jun 23, 2016
    Posts:
    601
    @Mike
    just check if the program_directory is in "C:\Program Files" or if the system is not desktop.
    if it is then reroute writing to the working_directory.
    problem solved.

    you can still implement the ability to write to program_directory if its not.
     
  11. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,840
    Plus, Win10 apps cant even be accessed by the admin, me. The folder where apps are located is totally locked! Welcome to the future....
     
  12. Shadowblitz16

    Shadowblitz16 Member

    Joined:
    Jun 23, 2016
    Posts:
    601
    thats if it is stored in the apps folder though
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice