The smartest way to make a smooth autosave/resume game system?

  • #1, by RadicaaThursday, 22. January 2015, 19:24 6 years ago
    So I was thinking of implementing a very simple autosave system, leaving out the basic "Save/Load Game" menus; just a basic New Game and Resume Game button menu where "Resume Game" always starts precisely where the player decided to quit the game. I'm not sure how exactly I would approach this. Placing an Autosave in every action chain can be a little tedious but still doable of course. But how I should approach the numbers of Autosaves to load on Resume game I don't really know. Then there's also the problem of cutscenes in the start of scenes; condition chains would probably have to be implanted into all cutscenes?

    Any ideas on how I could approach this without making a huge mess would be welcome ^^

    Newbie

    25 Posts


  • #2, by afrlmeThursday, 22. January 2015, 19:33 6 years ago
    You only need 1 autosave file.


    • at begin of scene >
    • pause for fade in time (see game tab)
    • execute autosave #1
    • rest of at begin of scene actions here...


    You could add the execute autosave #1 action to important event changes in each scene. Don't have to add it to everything. You could even create a loop so that it automatically saves after every x amount of time. You could also add the action just before opening up the menu (during game play - in case player decides to quit game) & so on.

    For the continue / resume button you just need to add an if query...

    if autosave #1 exists
    load autosave #1
    end if

    Simple enough.

    P.S: the autosave system is one of Visionaire Studios most useful features.

    Imperator

    6842 Posts

  • #3, by RadicaaThursday, 22. January 2015, 19:52 6 years ago
    Nice, thanks! Didn't realize it was that easy. Visionaire sure is great ^^ I'm unsure of the loop though. I'd probably have to insert a value count loop from, say, 30 seconds to 0 where the autosave is executed at value = 0. But as I'm still too green to script LUA, how would I implement this to run through out the game? Just add it in the beginning of each scene?

    Newbie

    25 Posts

  • #4, by afrlmeThursday, 22. January 2015, 20:41 6 years ago
    Wouldn't need Lua script at all. smile

    I was talking about creating a loop with the jump to x action part in combination with the pause action part. You would need to disable the looping action in menu scenes though &/or during cut-scenes etc, which could be done by a combination of if queries & the quit action action part.

    P.S: it's Lua, not LUA. grin

    Imperator

    6842 Posts

  • #5, by RadicaaThursday, 22. January 2015, 20:52 6 years ago
    Oh ok. Well, the menu action -> save autoexec will work at least for now. Will need to tinker with the loop later; I actually have already implemented a timer in the game where the player is given 5 seconds to execute the correct action (with the jump to x action part), so I guess what you mean is not so much different. But as long as the player decides to close the game by menu, there shouldn't be no problem in just adding the autosave action to the menu hotkey.

    Newbie

    25 Posts

  • #6, by afrlmeThursday, 22. January 2015, 21:02 6 years ago
    Sure don't forget to add it to a key action (released) too, then player can manually decide when to save game too.

    Imperator

    6842 Posts

  • #7, by MachtnixFriday, 23. January 2015, 00:14 6 years ago
    P.S: it's Lua, not LUA. grin

    LUA scripts is on the left side of the forum :-):-) :-)

    Thread Captain

    1087 Posts

  • #8, by afrlmeFriday, 23. January 2015, 00:54 6 years ago
    Yes & I keep asking them to change it, but do they? Do they bollox! grin

    I used to think it was LUA too because of that. It's misleading as it makes you think that Lua is an acronym for something else when it is in fact the noun for moon in Portuguese.

    Imperator

    6842 Posts

Write post