Load game and New game [SOLVED]

  • #1, by red363Tuesday, 01. March 2022, 01:05 2 years ago
    Hello!

    Please advise on the following points:

    1. Do I need to create an empty scene before the first game scene with autosave? In my case, autosave #1 occurs when you exit the game in the menu. Those. after that I can continue the game (load autosave #1) or start a new game. Clicking "new game" runs the replaceGame() function.

    2. Initially, when we start the game file, we see a couple of splash screens and then get into the menu. How can I make sure that when we run the replaceGame() function, we start from the first game scene, and not from all this?

    3. What needs to be done so that after building the game, there are no autosaves that were made while working on the game?

    Thanks for the help.

    Forum Fan

    101 Posts


  • #2, by afrlmeTuesday, 01. March 2022, 14:46 2 years ago
    For  the replaceGame("example.vis") method just create an autosave just before you execute the the replaceGame fuction in a slot you don't plan on using & then in the game launch options, which can be used to check if the autosave exists & if it does then delete it & show the first scene instead of the menu - actually set the initial scene to empty so you can check whether to show the menu/splash videos, etc. first or the first scene. Also don't use the intro video section in the main game settings, instead play/show them all via the game launch actions.

    Imperator

    7278 Posts

  • #3, by red363Tuesday, 01. March 2022, 23:11 2 years ago
    Thank you very much, it seems to be working.

    I had to read it several times to get the gist of it. Because I thought that after the replaceGame function, all autosaves are automatically erased...

    Question, regarding point 3, in order to get rid of autosaves after building the game (which occur when working on the game), do I need to get rid of them in advance in the editor, before building the game? Or are there other ways?

    Forum Fan

    101 Posts

  • #4, by afrlmeWednesday, 02. March 2022, 11:59 2 years ago
    replaceGame() is just like the reset feature of a pc or games console. It essentially just clears out the the current sessions cache. It doesn't auto-delete the saves.

    As for your other question, just delete them manually, or query if they exist in the game launch actions & delete them if they do that way. You shouldn't be using the save game system during active development anyway as old saves can contain incorrect &/or missing data that can lead to weird bugs in your game after loading them that wouldn't have existed otherwise.

    Imperator

    7278 Posts

  • #5, by red363Wednesday, 02. March 2022, 23:47 2 years ago
    Thank you very much, I understand

    Forum Fan

    101 Posts