Ways Of Saving

Learn how to start making games.

Ways Of Saving

Postby PerrySteven » Thu Jul 23, 2015 12:44 am

Hello, recently I've been looking into methods of having a save feature for my game, and I'm wondering whether anyone has any ideas of how to accomplish this.

I think I have one idea, but one major problem I'm facing is that with my current method, the player can easily access the save files and modify it in their own way.
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score

Re: Ways Of Saving

Postby bat78 » Thu Jul 23, 2015 1:40 pm

PerrySteven wrote:Hello, recently I've been looking into methods of having a save feature for my game, and I'm wondering whether anyone has any ideas of how to accomplish this.

I think I have one idea, but one major problem I'm facing is that with my current method, the player can easily access the save files and modify it in their own way.


Every save file can be modified by the end user in their favor, so It is rather a matter of task complexity.
That's why one must invent some sort of encryption algorithm or at least compression. Best is both.

Now about your saves .. Did you know gE already provides a system for you to save variables?
Apparently your game must be in variables or heavily dependent on variables.
Then those variables can be exported to a compressed, encrypted .SAV file by virtue of the function saveVars.

More information about saving and loading .SAV files you can find in the Game Editor Scripting Reference.
Last edited by bat78 on Sat Jul 25, 2015 11:11 am, edited 1 time in total.
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: Ways Of Saving

Postby PerrySteven » Fri Jul 24, 2015 1:19 am

bat78 wrote:
PerrySteven wrote:Hello, recently I've been looking into methods of having a save feature for my game, and I'm wondering whether anyone has any ideas of how to accomplish this.

I think I have one idea, but one major problem I'm facing is that with my current method, the player can easily access the save files and modify it in their own way.


Every save file can be modified by the end user in their favor, so It is rather a matter of task complexity.
That's why one must invent some sort of encryption algorithm or at least compression. Best is both.

Now about your saves .. Did you know gE already provides a system for you to save variables?
Apparently your game must be in variables or dependent on variables.
Then those variables can be exported to a compressed, encrypted .SAV file by virtue of the function saveVars.

More information about saving and loading .SAV files you can find in the Game Editor Scripting Reference.


Wow! I didn't know there were such functions. Thanks for your advice, I will try it out sometime.
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score

Re: Ways Of Saving

Postby PerrySteven » Sat Jul 25, 2015 10:58 am

Hello, I came here to say that this function worked perfectly for me! Thanks again for your advice.
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score

Re: Ways Of Saving

Postby bat78 » Sat Jul 25, 2015 11:10 am

PerrySteven wrote:Hello, I came here to say that this function worked perfectly for me! Thanks again for your advice.

You are welcome. (You can always except nothing less from my help)
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 1 guest