|
User Settings and High Scores |
Paladin
Member #6,645
December 2005
|
I'm asking a lot of questions here at once, but I was wondering, I wanted to know how to make an "options" screen where you can set the screen resolution, sound volume, etc, and when you press "OK" it records it in some kind of file and then sets the settings to your game. Then when you reload your game, it would use these settings again because they were saved. That's my goal. Then I was wondering how you could save high scores in a file, then have them displayed, and announce when you beat the high score, etc. If you guys could help, that would be great. Thanks. |
CGamesPlay
Member #2,559
July 2002
|
A pretty easy way for all of this: You can also use binary files, like for your high scores.
-- Ryan Patterson - <http://cgamesplay.com/> |
Neil Walker
Member #210
April 2000
|
Hello, After changing any of the major graphics settings (like width/height/buffering/depth) you just call Framework->Restart() and it reinitialises everything. Obviously you have to use my classes, which probably isn't what you wanted, but it does animations and graphics handling as well and you can get the framework to run in a timer based loop to control the whole game for you if you wish (you just pass in function pointers and it does the rest). It'll be finished in a few days. Or if you just wanted code for all the settings and custom values like high-scores and don't mind c++ then download the stuff from my sig and it is all in the one file (Configurator), complete with help file, just ignore the bit about animations and graphics. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
ImLeftFooted
Member #3,935
October 2003
|
For settings a simple 'blah=fubar' system seperated by lines works for me. If that scares you you could check out the config routines linked to. For highscores, I'd say use allegro's xor packfile password routines and write out in some obscure binary format, while linking against allegro staticly.
|
|