Daniel Moree wrote:
What would be the best way to store the controls of a game? Should it be
done in a INI or other type of file or should it be done in the registry.
Very off-topic. The C++ language doesn't care much about the outside
world, such as registries or files.
Explain both please. What's the best way to pull from the file and set my
variables, and what's the best way to add and pull from the registry?
Since this is platform specific, your best answers will come from
posting to a platform specific newsgroup or the generic
news:comp.programming. Your issue is platform specific because
I know of many workstations and embedded platforms that don't have
registries.
Thanks for your help in advance.
The ultimate answer to your question:
Game "controls" or other information should be stored in
non-volatile memory (NVM). NVM is memory that can survive
loss of power. The location should be somewhere that your
program can access and users can't. You don't want users
changing the settings of your game, or do you?
Text files have the advantage of being more platform
independent than a binary file. However, a binary
file is quicker to access because it doesn't require
a translation (but it may need converting when porting
to different platforms).
I can't say what is best because that is a religious
issue.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book