The question may be very common, but I need help in my particular case.
In my game there is a large location which has a lot of randomly created objects like trees, stones, and so on
How can I store their positions and states as efficiently as possible so that I can load them later?
Put this in a condition once all object generated-> System: Save game to slot "you_name_it"
If you want to exclude object from save list just add behavior NoSave. Load object would be straight by using Load game command.
What about game updates? If I add any new content to my game and use previous save?
I'm sorry if I don't understand this function well enough. The last time I used it was on Construct Classic, and there the game completely rolled back to the previous version, without innovations, old conditions, and so on.
Develop games in your browser. Powerful, performant & highly capable.
For more specific need better to create a level editor.
Why do I need a level editor for a randomly generated world?
Probably just overwrite the saved game would be an easy option then.
You can also use an array to store the x/y coordinates (and other data), then draw/destroy the objects at any time.
Here's a quick example (though it's not very elegant, I'm sure there's a nicer way to do this!)
But what If I wan't to destroy some of trees?
Any changes on screen should overwrite previous save state. Give it a go and observe the result.