Execute action before quitting game

  • #10, by SimonSMonday, 15. February 2021, 16:36 3 years ago
    @i-c-g Well judging by what I'm reading you would've changed engine even if I added some hooks there and I can understand that. For anyone's needs there's an engine. For some the lack of low level code interaction is limiting, for other's it's about right. And I'm trying to better the possibilities that can be achieved with coding and plugins.

    The recommended use has always been autosave on every scene. The problem is that often in the event of closing the app you don't get the option to show a dialog asking if the user is sure, I can't guarantee it at least. So I think the autosave way is the best way to go. Either way I can see if I add some events on close for the future.

    But even then, the devs of the particular game need to implement it. I won't force it on everyone. For my taste if I press quit, via alt+f4 or cmd+q I want it to close. If the game in question didn't have autosave, I'm sure it won't have a hook on close.

    Thread Captain

    1580 Posts


  • #11, by i-c-gMonday, 15. February 2021, 18:32 3 years ago
    @i-c-g Well judging by what I'm reading you would've changed engine even if I added some hooks there and I can understand that. For anyone's needs there's an engine. For some the lack of low level code interaction is limiting, for other's it's about right. And I'm trying to better the possibilities that can be achieved with coding and plugins.
    Totally, and that's what I hope I wrote, acknowledging VS is far from being a bad solution.
    I personally think, if you want to accept feedback by a potential customer, that empowering devs to interact with the engine more broadly (namely: all object properties are scriptable, there are execution hooks for most of the game AND application event, there are a set of accessible "primitives" to support the creation of GUIs without abusing other elements) will just add to VS, without subtracting from non-devs experience.

    I mean, the scripts necessary to manage @AFRLme's game menus templates are not "just about right" for non-devs; they are just as hard to come up with for both devs AND non-devs. Maybe the difference is that for a dev it feels like a pile of workarounds, while a non-dev may feel like coding badass or just accept the "one-time" effort, having no alternatives.

    Not trying to be harsh, only to provide honest feedback and a more general point-of-view.

    The recommended use has always been autosave on every scene. The problem is that often in the event of closing the app you don't get the option to show a dialog asking if the user is sure, I can't guarantee it at least. So I think the autosave way is the best way to go. Either way I can see if I add some events on close for the future.

    But even then, the devs of the particular game need to implement it. I won't force it on everyone. For my taste if I press quit, via alt+f4 or cmd+q I want it to close. If the game in question didn't have autosave, I'm sure it won't have a hook on close.
    On this I personally agree 100%: my request was if it was possible to be aware that the game was exiting, not to have VS doing mojo on my behalf. Just showing an "Are you sure?" modal is impossible in case the user wants to quit closing the application window.

    But maybe on this you were replying to @thomas-t,  I guess?


    Newbie

    19 Posts

  • #12, by afrlmeTuesday, 16. February 2021, 03:25 3 years ago
    The advanced menu template? I created that thing years ago. Visionaire has changed a lot since then, so it's probably possible to do a lot of it without any scripting, unless you are referring to the config.ini script, which I'm fairly certain I included with it - if that's what you are referring to, then script is needed for that as you are reading from/writing to an external file.

    Imperator

    7278 Posts