Why does everybody hate "Save Frame"?
For some reason all the old click users are constantly recommending manual saving without even mentioning the inbuilt "save frame" (which is one click away). It's true that currently it has some bugs but surely this should be the first thing to try out and leave manual saving only for when the automatic doesn't work? Also it becomes much easier to use when you know it loads/saves at the end of the event and that there's "Frame has just been loaded" etc...
For example this:
Quote:
"Associative Array is indeed one of the many possibilities for saving/loading. But none of those will make it save/load automatically : if you want something saved you'll have to create an action to save it yourself and same for loading.
For example if you need to save character's name, position and gold you'll have something like this :
On User pushed button "Save" :
+Set "name" to string Global String 1
+Set "xPos" to value X("Active1");
+Set "yPos" to value Y("Active1");
+Set "gold" to value Gold("Active1");
And you'll have to load all this. The method will be quite similar using INI, INI+, XML, AssArray, any database, any array... Or any data extension able to load/save files.
EDIT : Of course things are harder if you have to save many many things, like monsters, inventory and such. If you need to save such informations you'll haveto be more careful ofthe way you design your saving/loading process"
is probably enough to turn almost everybody off of even thinking about saving... (btw I'm not picking on the poster of the qouted mail, it's just that it was the most recent). So I was just wondering why exactly does everybody automatically recommend this horrible and complicated way of saving where you have to manually record everything?
Re: Why does everybody hate "Save Frame"?
I don't know if there are any posts of mine that you're including in that, but for me it's because doing things manually like this gives you greater control over what you're saving and loading. With the save and load frame actions, you're saving a game/frame's state in one monolithic chunk - which can be fine (I actually started writing an adventure game experiment and tried out this new "save frame" feature, and it worked very well), but if you have a more complex system where you want to restore some values but not necessarily the exact state of the frame (or you have data in objects that aren't supported by the Save/Load Frame feature), then being able to save and load readable files, and manipulate the save files that you generate manually, have their advantages.
Re: Why does everybody hate "Save Frame"?
I don't think I was thinking of any posts in particular - actually looking back it was silly to include a concrete post (I should have pasted some stuff from the resources section that describes how to save stuff, forgot there's even an official tutorial that teaches this).
As for the "monolithic chunk", I got the impression it isn't that monolithic (except conceptually) - for example my game produces a savestate of 15 kb...
Still, I fully agree that it's better to save just parts of the game if you don't need the whole frame. Thanks for explaining!
Re: Why does everybody hate "Save Frame"?
a lot of the pre-coded functionality like that is usually better-suited to those new to TGF/MMF, or programming in general; the frame and demo loading in particular, iirc, need the frame to be in the exact same state as it was when they were saved... not something that happens often in complex games
pre-made solutions are less useful for those with experience; someone who just started with MMF might think the built-in platform movement is a godsend, those who have been using MMF for years dismiss it due to limitations and bugs
i only ever use bouncing ball movement anymore, for things like menus and the like which i want to have a little motion in them (quick and easy), but not for actual in-game stuff
Re: Why does everybody hate "Save Frame"?
Haha maybe I too will be advocating the "write your own" in a few years when I get some more experience points :-)
Re: Why does everybody hate "Save Frame"?
As the author of the quoted post, I have to say I don't have anything against "Save Frame", I just never used it. Since OldGuy was asking how to save with Associative Array, I tried to point him to some solution, but I don't know if it's better than Save Frame. But I heard there were quite a few bugs and troubles with this action, so I'll probably stick to old methods anyway.
Re: Why does everybody hate "Save Frame"?
Quote:
For example if you need to save character's name, position and gold you'll have something like this :
On User pushed button "Save" :
+Set "name" to string Global String 1
+Set "xPos" to value X("Active1");
+Set "yPos" to value Y("Active1");
+Set "gold" to value Gold("Active1");
And you'll have to load all this. The method will be quite similar using INI, INI+, XML, AssArray, any database, any array... Or any data extension able to load/save files.
It's not all like that. When you have enough experience points, you'll probably set up events that automates the process and iterates through objects by itself, and storing the important data. There's nothing wrong with using "Save Frame", and it's an easier and better way for beginners, but once you gains lots of experience, you might want to go for a custom system that stores exactly the information you need and nothing else. That way, it's easier to load your previous games even though you may have changed things in the game.