Page 1 of 1

Saving a Game

PostPosted: Mon Nov 02, 2009 2:34 pm
by ~Cetanu
I was wondering how to create a method for saving a game...

...someone told me that I could have a directory w/ a .txt file that will hold all of my variables, so when it starts up the game gets the variables and loads everything. However, I have no idea how to do this, so if someone could run down some basic methods I'd be eternally grateful. :D


Thanks,
~Cetanu

Re: Saving a Game

PostPosted: Mon Nov 02, 2009 3:12 pm
by TheJanMan
Hmm I would also like to know how to do this just like those RPG game save screens. However, saving it in .text seems a bit too "hackable". SInce its basically a notepad, someone could just open it and change the values.

Re: Saving a Game

PostPosted: Mon Nov 02, 2009 3:42 pm
by PixelRebirth
If you only need to remember simple things, like player stats and position, I'd simply use a hash table and save it as a random file. It's not that easy editable compared to having it in a txt or ini, where all the values are just out in the clear for everyone to see and edit as they please.

A very basic protection would also be what Minor describes in this thread: INI Protection with CRC32

Re: Saving a Game

PostPosted: Mon Nov 02, 2009 4:17 pm
by lucid
i thought ini's were viewable in a txt editor.

i'm not sure about the binary object

it has a little bit of a learning curve, but the 's' plugin let's you store any type of data, and saving it to an encrypted file is just one action.

Re: Saving a Game

PostPosted: Tue Nov 03, 2009 7:52 pm
by ~Cetanu
I took a look at that INI example and it broke it down for me, but still didn't tell me enough...

...how do I make Construct read/load the file? :?:

Re: Saving a Game

PostPosted: Wed Nov 04, 2009 9:22 am
by Ashley
There are built in save/load actions in the system object which take care of all the complexities for you.

Re: Saving a Game

PostPosted: Wed Nov 04, 2009 10:44 am
by ~Cetanu
Okay, thanks! I actually just found them a while ago, and I said to myself, "Can it really be this easy?" :D