Saving High Scores

Started by
3 comments, last by Nathaniel Hammen 21 years, 4 months ago
Before I even looked at gamedev.net I had already completed my first game, a ripoff of Tetris called TetriNate. It took me one week. Unfortunately, I never added a function to save high scores until one week ago. It saves the scores in an external text file using fstream.h. This is a very BAD way to save high scores as anyone can open scores.txt and alter the scores. Unfortunately, I don''t know any better way to do this. Could someone show me how to do this. Is it possible to save it into the .exe file somhow? -------------------------------------- I am the master of stories..... If only I could just write them down...
I am the master of ideas.....If only I could write them down...
Advertisement
look up how to do some basic xor encryption/decryption. There is a lot of information all over the web and many threads here descussing it.

Hope this helps

tazzel3d ~ dwiel
You could always write it in the registry; most of the time, the "average" user hasn't even heard of regedit.

You could always write it to the file in binary instead of text format, which would cause most users to stare blankly at a few rows of []'s.

And at worse, you could always throw in a few protection algorithms such as a checksum to make sure the file wasn't tampered with...

[edited by - RuneLancer on December 5, 2002 4:18:23 PM]
Or better yet, write your own encryption algorithm.

- Rob Loach
OverTech Technologies
__________________________
"Life moves pretty fast. If you don''t stop and look around once in awhile, you could miss it."
- Ferris Bueller
Rob Loach [Website] [Projects] [Contact]
I would go easy, and use binary files, you shouldn''t put to much effort into encryption into a highscore file for tetris and stuff.

Sand Hawk

----------------
-Earth is 98% full. Please delete anybody you can.


My Site
----------------(Inspired by Pouya)

This topic is closed to new replies.

Advertisement