Reseting whole game after completion

  • #1, by andiliddellWednesday, 28. January 2015, 23:03 6 years ago
    Once a player has completed a game and potentially hundreds of conditions, values, waysystems and variables have changed over the entire play-through, is there a way to reset everything back to its initial state in one simple action or lua script?

    I'm bug testing my Demo game submission, and once the end credits roll, it takes the player back to the main menu. If you click Start New game, nothing is re-intialised.

    Is there a quick way to do this?

    Many thanks
    Andi

    Forum Fan

    178 Posts


  • #2, by afrlmeThursday, 29. January 2015, 01:59 6 years ago
    There's been loads of threads asking about this lately. grin

    It's all about the quicksave/autosave system.

    1. In your first playable scene you should create an at begin of scene action.

    2. add pause 500ms > if autosave #0 exists > else > execute autosave #0 > end if > pause 1000ms > now whatever other actions you want it to trigger. What you have done there is checked if autosave #0 exists & if it doesn't then create it. The pause after prevents it from triggering any other actions / conditions so that it gives it enough time to write the raw data to the save file before anything is changed.

    3. In your new game button if you don't trigger any cut-scenes / menu scenes or videos before the first playable scene, you should add an if query to it. If autosave #0 exists load autosave #0 else change to x scene (whatever it needs to do) then add an end if action part.

    This may vary a bit depending on how your game starts. But that's the basic grasp of it. The autosave system is also useful for creating the resume / continue system.

    Imperator

    6845 Posts

  • #3, by andiliddellThursday, 29. January 2015, 11:10 6 years ago
    Sounds feasible, and I'd read the thread you'd written for the other guy.

    I'd hoped there was some kind of initialisation state that could just be called in lua or with an action. Maybe that would be a good edition for the devs.. a "reset all" action.

    Annoyingly I've got an intro video that plays after the main menu and before the first playable room, but I think I'll be able to work out the best way to implement that.

    Do autosaves show up in the save thumbnails? or are they hidden from the user?

    Forum Fan

    178 Posts

  • #4, by lefooshThursday, 29. January 2015, 11:19 6 years ago
    I have every intention of uploading a tutorial later today on a new game / restart game system in its own thread.

    Watch this space...

    Newbie

    77 Posts

  • #5, by afrlmeThursday, 29. January 2015, 11:29 6 years ago
    Autasave/quicksaves are hidden in the background. I the save folder wherever your save games get saved the autosave files will be called bookmarks instead.

    The reason there's no reset all is because conditions & values get saved in the save game files.

    Imperator

    6845 Posts

Write post