'Delete slot' / 'Clear slot' / 'Create empty slot' actions. (needed)

0 favourites
  • 15 posts
From the Asset Store
Awardkit
$3.50 USD
30% off
Create custom awards and achievement or use the many templates and create your own.
  • Hi all!

    I recently made a thread on 'How Do I' forum asking how to deal with save slots, and I came to the conclusion that this is currently not possible with Construct.

    Yes, apparently there are workarounds, but it can be just frustrating to go this way, specially if you have a reasonably big game.

    And I found that people need and ask for features like this for years (in the thread you'll find links to other ancient threads), so I created a suggestion on the suggestions page to ask for this. Please go there and give some votes on the suggestion, in name of our future games and of our future sanity making their slot system.

    Thread: https://www.construct.net/forum/construct-3/how-do-i-8/how-do-i-clean-a-slot-138124/page-3#forumPost952050

    Suggestion: https://construct3.ideas.aha.io/ideas/C3-I-576

    And thank you!

  • +3 to this. Workarounds are good, but a direct way to delete a save slot is a must.

  • Thanks NoSoul8! Sooner or later we'll have this. Sooner is better >)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Delete save slot functionality can be technically tricky to implement on some platforms, i guess.

    But there is no harm trying to ask for that, :)

  • Delete save slot functionality can be technically tricky to implement on some platforms, i guess.

    Well, maybe. We have the LocalStoge don't we? A slots system could be just a playing around with the LocalStorage; why not? That's what we're doing after all, creating our slots system with LocalStorage.

    A game engine is tricky, we have it.

  • If you want total control over your save data and save files, you would use a combination of Dictionaries and/or Arrays, and Local Storage. My current project has 3 save slots I am in total control of, can get or write to any part of them at any time, with copy/delete functionality as well. If this is what you're looking for, I suggest not using Construct's built-in save functionality. Far as I'm concerned that's just for debugging.

  • If you want total control over your save data and save files, you would use a combination of Dictionaries and/or Arrays, and Local Storage. My current project has 3 save slots I am in total control of, can get or write to any part of them at any time, with copy/delete functionality as well. If this is what you're looking for, I suggest not using Construct's built-in save functionality. Far as I'm concerned that's just for debugging.

    Yep, that's what I'm doing :) Being complicated tho.

  • Total control over saves (with dictionaries, arrays and LS) is way too manual.

    Build-in save/load functionality saves lots of development time.

  • If you want total control over your save data and save files, you would use a combination of Dictionaries and/or Arrays, and Local Storage. My current project has 3 save slots I am in total control of, can get or write to any part of them at any time, with copy/delete functionality as well. If this is what you're looking for, I suggest not using Construct's built-in save functionality. Far as I'm concerned that's just for debugging.

    Tokinsom Can I ask, are you saving information about the position / state of objects in a layout? Say there are elements in a layout the player can interact with: coins to be collected, enemies to be killed, smashable crates. Say you want to save the state of the layout after the player has played through collecting some items, killing some enemies, smashing some crates. If the player leaves the layout then returns later, how can I load the previous state of the layout, rather than loading the default state.

    What would you consider best practice in this situation to save the layout's state, including the position of objects within the layout, allowing to load that state at a later time?

    The Persist behaviour works up to a point. It saves the state of objects within the layout, but I don't think its possible to revert back to the object's default state, if for example the player wanted to restart the level to play through from the beginning again. The Persist behaviour would work well if you could disable / enable it under different conditions.

    The Save/Load function isn't ideal because it will load the old state and wont reflect points / coins the player has accumulated after leaving the layout.

    Any tips?

  • What I personally do is store either the JSON string of an object, or an identifier (usually IID or custom value), or both, to a dictionary for later reference. Then, at the start of the layout I loop through the dictionary and if the object(s) ID matches the key name, it will load by JSON string, be destroyed, or do whatever else I want depending on the value.

    Erm...here's an example

    Let's say I'm in Level 2 and I pushed a crate that I want to save the position of for later.

    +At End of Layout
    -Add key to dictionary: LevelName &","& Crate.IID with value Crate.AsJSON
    
    +At start of layout
    	+for each dictionary element
    	+for each crate
    	+LevelName = tokenat(dictionary.currentvalue, 0, ",")
    	+Crate.IID = int(tokenat(dictionary.currentvalue, 1, ","))
    	-Load crate from JSON
    

    (I'm paraphrasing here but you get the idea)

    It can be a lot of work, and a royal pain in the ass, but you get complete control over your object states. Also, families help. Perhaps a plugin can make it a little easier.

  • It can be a lot of work, and a royal pain in the ass...

    Sounds like smth i will never do.

  • What I personally do is store either the JSON string of an object, or an identifier (usually IID or custom value), or both, to a dictionary for later reference. Then, at the start of the layout I loop through the dictionary and if the object(s) ID matches the key name, it will load by JSON string, be destroyed, or do whatever else I want depending on the value.

    Erm...here's an example

    Let's say I'm in Level 2 and I pushed a crate that I want to save the position of for later.

    > +At End of Layout
    -Add key to dictionary: LevelName &","& Crate.IID with value Crate.AsJSON
    
    +At start of layout
    	+for each dictionary element
    	+for each crate
    	+LevelName = tokenat(dictionary.currentvalue, 0, ",")
    	+Crate.IID = int(tokenat(dictionary.currentvalue, 1, ","))
    	-Load crate from JSON
    

    (I'm paraphrasing here but you get the idea)

    It can be a lot of work, and a royal pain in the ass, but you get complete control over your object states. Also, families help.

    Good Lord that is an epic amount of work... Im not sure I want to go down that path, it could end up taking more time than is warranted for what I want to do.

    I may be able to achieve what I had in mind using some work around with the Save/Load function. I need to keep playing with it.

    Perhaps a plugin can make it a little easier.

    Were you thinking of making a plugin for this Tokinsom ? It seems like the Persist behaviour does half the job. It just needs the ability to be disabled / enabled. So if it's disabled: when player returns to layout objects are in default positions. When enabled, objects are in whatever state they were left in when player left layout previously. Maybe I should put a feature request or something.

    Thanks for the detail, I might end up using that method you describe.

  • Meh, sounds worse than it is. You're basically just recording the states of certain objects in a dictionary. It's only a pain when you get to lots of object types..but again, families.

    You won't get near the level of control with save/load or even persist behavior, and can do things neither of them allow you to.

    In my game there's giant stalactites that can be shot down from the ceiling. They fall down and to the layout below, creating platforms to jump on. (In reality they just fall off-screen...it's implied) By using this method, I can prevent the original stalactites from spawning again, and basically reverse the code to have the fallen platform stalactites spawn. Just one nifty thing you can do.

    Could ask around for a plugin, I suppose. Plugin dev isn't my forte.

  • Yeah thats cool. Ill have an experiment and see if I can get a system like that working.

    Mostly what I have is smashable crates that should stay smashed and some collectible items that should stay collected when player returns to layout. But they should be in default positions when level is restarted.

  • The Persist behaviour would work well if you could disable / enable it under different conditions.

    Artpunk , make a request in construct3.ideas.aha.io

    Heres the one I made a time ago: construct3.ideas.aha.io/ideas/C3-I-576

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)