Be a Supporter!

Advice on making a save file?

  • 272 Views
  • 3 Replies
New Topic Respond to this Topic
GristlyBear
GristlyBear
  • Member since: Jul. 30, 2011
  • Offline.
Forum Stats
Member
Level 24
Animator
Advice on making a save file? 2012-05-29 00:33:49 Reply

So I have a working game which I didn't intend to implement a save file for, but I'm starting to think it'd be a nice addition.
Does anyone have any tips and advice on where to start? I'll mention a few of my questions and concerns:

Where is the file saved?
What commands do I use to save to and access it?
Will my game be easily abused if someone locates the save file and changes values for things? If so, is there a simple way to somewhat prevent that?

Also, I'm using AS3, and I have in mind the things I'd need to save. It's more or less say... 10 variables (or to be more specific, an array with maybe 8 elements and a couple variables).

Thanks!


BBS Signature
Patcoola
Patcoola
  • Member since: Mar. 7, 2003
  • Offline.
Forum Stats
Member
Level 60
Animator
Response to Advice on making a save file? 2012-05-29 00:52:56 Reply

At 5/29/12 12:33 AM, webufs wrote: Where is the file saved?

In your web browsers cookies

What commands do I use to save to and access it?

Look up shared objects

Will my game be easily abused if someone locates the save file and changes values for things? If so, is there a simple way to somewhat prevent that?

Yes, use encryption.

GristlyBear
GristlyBear
  • Member since: Jul. 30, 2011
  • Offline.
Forum Stats
Member
Level 24
Animator
Response to Advice on making a save file? 2012-05-29 12:29:24 Reply

That was awesomely helpful. Thanks!

For anyone who would like it, this link was very useful.


BBS Signature
ProfessorFlash
ProfessorFlash
  • Member since: Oct. 6, 2007
  • Offline.
Forum Stats
Member
Level 32
Programmer
Response to Advice on making a save file? 2012-05-29 13:38:00 Reply

At 5/29/12 12:33 AM, webufs wrote: Will my game be easily abused if someone locates the save file and changes values for things? If so, is there a simple way to somewhat prevent that?

99% of people who play your game wont know how to do that, so I wouldn't be worried about that. Also, I don't see any reason that you would want to invest time and effort in preventing this. If someone cheats in your game, you do not lose any profit (sponsorship money) and the game is not ruined for anyone except the cheater and since he didn't cheat by accident, he got the experience he was looking for by cheating so it's a win / win.


You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.