|
-
May 22nd, 2001, 04:59 PM
#1
Storing Variables...
hello,
I'm making a game, and was wondering how to make 'save files' to store some variables.
thanks for any help/code.
--yellowTIGER--
-
May 22nd, 2001, 07:31 PM
#2
Re: Storing Variables...
That type of your data?
String or bin?
Andy Tower
-
May 23rd, 2001, 07:43 AM
#3
Re: Storing Variables...
You can use ini file.
Iouri Boutchkine
[email protected]
-
May 23rd, 2001, 08:28 AM
#4
Re: Storing Variables...
You'll need to consider whether or not you want some or all of these variables accessible to the user. If you will be storing information like lives left and score you will not want to write this data as mere text in a file else the user will be able to edit this.
You can always just open a file for output in binary and store bytes of data rather than the actual ascii codes. You can have a data-block say 1024 bytes or however many you need. Then you just write the bytes (maybe even use some sort of offset to help encode the data) in a certain order so that you can read it back in. Perhaps use a check byte as well to validate the data.
Hope this makes sense.
-K
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|