Hi, ive looked all over for a way to save my variables into a save game and then retrieve them when needed…
ive looked at xml but ruled that one out, due to the fact that anyone can edit that.
ive read through numerous forums on how to save games in to a binary file, but i cant seem to get my head around it.
if someone could upload their entire project file on just a basic save and load script, or maybe make a video going through the step by step process of doing it and whats going on… id even be grateful if someone could maybe go into a little more detail on how it actually works.
I would have to say Player Prefs is the easyest. But like in my case my file is expected to excide the 10 meg limit on Player Pref’s so I just use a Flat File, I do understand that people will be able to edit it, But for now as I’m devloping and learning it works. Later I my self will be looking to maybe encrypt my file or switch formats.
I don’t know file limitations on webplayer. but i do know if you do use PlayerPrefs your limited to 2mb in data.
Player prefs is going to be just as editable as any other locally stored solution. Unless you can say store progress on a database remotely you’ll find people being able to edit.
PS: Xml or binary makes no differences. Both can be edited and the fact that XML can be edited easier is no argument. It would just create a wrong sense of security to argument to use binary for that reason. If you don’t want someone to edit them, encrypt them… But even then you just raise the bar of effort…
Binary is faster and when you already worry about 2 MB limits, XML is definitely no real option. Also I am not sure if it works in WebPlayer with NET serialization (I doubt it)…
its a standalone windows game… so yeah i went ahead with playerprefs… after all i guess it wont matter if they change the values - it will only reduce the quality of their gameplay. I’ve heard PlayerPrefs has a limit of 10mb? I wouldnt think i’d go over the limit, i only need to save their position, map level, energy, fuel and an array of inventory items… and if use integers when possible i couldnt possibly go over right?
i’d be interested in binary writing, but for now i think ill leave that to the next game i make and when im a little more confident in javascript and c# thankyou for replies anyways though