questions regarding save menu + loading a saved game

  • #1, by sebastianWednesday, 15. July 2015, 20:20 9 years ago
    Hello guys,

    im trying to design a save/load menu in the future and just thinked over some points i have to get rid of before doing something productive and to the whole thing in VS.

    I have a few questions that came into my mind:

    1. I've read about an "autosave system" and a "normal save menu". Are these 2 different things? If yes, what are pros and cons of these?

    2. When i save a game, quit and load the saved game, do i have to get rid of some special stuff (starting scripts again, etc?)
    Also what gets saved in general in a savegame?
    - Are animations continue from the point where they are saved or start from the beginning?
    - Are characters who walked around stand at their start point or are they continuing their walk where they left?
    - Do i have to load scripts again?
    - Are actions running action continue where they got saved or do they start from the beginning?

    3. Is it possible to do a save/load menu inside of an interface (i guess this only will work with autosave-system)?

    4. Is it possible to name a saved slot?

    5. Is it possible to manipulate the screenshots from the saved games (object overlay)?

    kind regards

    Sebastian







    Thread Captain

    2346 Posts


  • #2, by afrlmeWednesday, 15. July 2015, 23:28 9 years ago
    A'llo.

    1. yes they are two different systems entirely.

    The default save system requires a menu scene & you have to define the save slots for saving & loading the save games. When you save a game it will automatically create a thumbnail (& date/time underneath if you enabled in scene properties by assigning a font for it) in the first available empty slot. It does not necessarily create the save in the slot you selected as it will always default to the first empty slot unless a save exists already in the slot you selected, then it will overwrite the save in that slot.

    The autosave / quicksave system is more of a silent save system that is used in the background. You can load / execute a quicksave / autosave from pretty much any scene, although it is advised to only create them on actual scenes instead of menu scenes. The autosave / quicksave feature is actually what you will end up using to create your resume / continue & new game options. To truly start a new game, you need to reset all conditions, values, positions & states back to their default values - what better way to do that than creating a dedicated quicksave the first time the player presses the new game button?

    2. You don't have to quit anything. The players should be saved in the location that they were in, however I don't think it will save their current animation frame position / action. Your at begin of scene actions will usually take care of setting most of your scene stuff going again or calling actions or functions or loops that you might need for the scene.

    In general the save files contain a list of values such as the values of all conditions & values, the positions of all characters, positions of various other things & so on. The engine reads this data while loading a save file & updates the relevant tables / fields accordingly.

    3. You've answered your own question here. Technically with a bit of time, patience & effort you could actually make a save style system similar to Tell Tell Games The Walking Dead or The Wolf Among us using the autosave system, some time stamps, if queries & some pre-images / animations & a bit of parallax scrolling or manual movement of the image / animation positions - fun.

    4. Only if you use the autosave method & are willing to use Lua script to read / write to an external txt file in which you can save the name to & retrieve the name from as VS won't remember those names by default until you load a save file that contained those names. So the only way to do that is externally then you create a small loop (with jump to x action part) & pause action part & a display object or narration text in which we use a value that we wrote the name from the text file to, in order to display the name on the screen where we want it. It's a lot less complicated than it sounds. Just hard to explain with text.

    5. Yes you can add scene objects containing an image sprite or an animation over the top of the save slots (since 4.x) however if you want to place something below it then you will have to add it to the background image itself or make sure you crop / edit it so that it doesn't overlay the save thumbnails themselves. There is no z-index ordering in menu scenes, so you have save slots (thumbnails) at -1 & the scene objects at 0 I think.

    Finally, I would like to provide a quick, but important tip. Do not load from save files during the development of your game. Only load from save files created in the current play session, when testing your game. In other words during development create some delete autosave action parts in the launch game actions to delete the autosaves you are using for your new game & resume / continue game options. The reason for this is that when you update your project by adding, removing or editing something that might get stored in the save files & then try loading a save file from how ever long ago, you might end up with various bugs while running your game because you've tried to load data that might no longer be there, or is lacking new data.

    Imperator

    7278 Posts

  • #3, by sebastianThursday, 16. July 2015, 08:31 9 years ago
    hmmm so it would be possible to use "autosave 0" for "new game" and 1-6 for selfmade "slots" when trying to do it only with the autosave functions? or works autosave only for one fixed "slot"?

    another thing why i consider using the autosave system is that ive read something about bugs after loading a game from the save menu objects couldnt be hovered anymore. Is this still the case?

    Thread Captain

    2346 Posts

  • #4, by afrlmeThursday, 16. July 2015, 10:46 9 years ago
    You can use as many autosave slots that you like. I recommend starting at slot #1 instead of #0 as it seems that you can't delete slots below #1.

    No idea. Most bugs that occur when loading from a save game usually happen during the development phase of your game, because you have probably loaded from a save game, that is out of date in comparison to your current project file in terms of the conditions, values & so on that you may have added, removed or edited.

    Imperator

    7278 Posts

  • #5, by sebastianThursday, 16. July 2015, 10:58 9 years ago
    sounds good enough for me to try an own savemenu instead of the buildin functions...

    regarding the save files itself:
    do autosave and "normal" save files differ in any kind?

    Thread Captain

    2346 Posts

  • #6, by afrlmeThursday, 16. July 2015, 11:51 9 years ago
    Yes. The regular save files contain time stamp & I guess they either have the thumbnail embedded or contain a path to the thumbnail (not 100% sure on how that works). They also have different names. savegameXX.dat for default saves & bookmarkXX.dat for autosaves (where XX would be the id / slot number. 01, 02 etc).

    Autosave files contain no time stamp (as far as I'm aware) & also have no embedded / linked to thumbnail. If you want a thumbnail or time stamp or name then you will have to manually code it in. I know the time stamp & or name, completion percentage & so on is possible by reading & writing from & to an external txt file. I'm not sure about the thumbnail as I've not tried sorting that out before.

    Imperator

    7278 Posts

  • #7, by sebastianThursday, 16. July 2015, 12:09 9 years ago
    nice.
    well i have to write a lua script then which writes into an external file the

    id, path to a screenshot, name , (timestamp) for each created bookmark.

    is it possible to save them in the same directory where the bookmarkxx.dats are saved? I guess by default it saves external files to the root directory of the game. but there arent the savegames saved, so it would be a bit messy to place savegame related stuff on 2 differrent places...

    Thread Captain

    2346 Posts

  • #8, by afrlmeThursday, 16. July 2015, 12:31 9 years ago
    localAppDir .. "/Savegames" is the path the savegame folder.

    The thing with an autosave save game system is that you don't need to create a typical style save menu. You could create profiles instead - say 3 profiles & just have the game automatically save at checkpoints or after every x amount of time. Or you could do a chapter based system with 1 autosave per chapter & 1 for progression point of current chapter / session.

    Or you could make one of those old school style game save systems in which the player enters a name (no thumbnails), or a pure text one that contains an id / save number, a date, game completion percentage, the playtime etc. etc.

    In other words: there are lots of different ways you could go about it.

    Imperator

    7278 Posts

  • #9, by sebastianThursday, 16. July 2015, 13:28 9 years ago
    i plan to make it old school so a screenshot is not really neccessary. The problem is when i dont use screens i have to set a text to make it recognizable. and i guess how to input text is way more hard to implement than just using screens, right?

    Thread Captain

    2346 Posts

  • #10, by afrlmeThursday, 16. July 2015, 14:28 9 years ago
    My method would be writing to a txt file (one per each autosave slot used). A single line of information (string) containing whatever I wanted it to say, such as: name, date, current playtime etc. & then I would on game launch check which autosaves exist & return the information into the string section of a vs value for each one. Then I would inside of an at begin of scene action for the scene containing the save game slots, I would wrap some display narration or display object text action parts inside of a jump to x action part loop & inside of the display texts I would just include the <vs=value_name> tag to pull the information from the string section of the specified value. That's about it I think.

    Imperator

    7278 Posts

  • #11, by sebastianThursday, 16. July 2015, 18:05 9 years ago
    what about letting the player enter a short string (keyinput) when saving? is this possible?

    Thread Captain

    2346 Posts