Re: Game Control Storage

From: Thomas Matthews (Thomas_MatthewsSpitsOnSpamBots_at_sbcglobal.net)
Date: 11/08/04


Date: Mon, 08 Nov 2004 18:20:07 GMT

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


Relevant Pages

  • Re: Modify project.reg and rebuil all platform
    ... "Copy files" does copy files from your PLATFORM directory ... to FLATRELEASE directory, including Platform.reg and Project.reg. ... "Fmerge" tool merges all registry files to Reginit.ini. ... Exist a method for not rebuil all after project.reg modify? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Noob question on registry
    ... OK so the file I edit within PB is not the file that ends up on the platform? ... persistent registry on the device and are using an old registry saved ... dword:0 and added my static IP settings then did a Make Run-Time ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Plataform Agnostic
    ... I have been doing quite a few platform agnostic systems ... ... Mono winforms code is not prime time ready. ... The registry functions were a great example of this ...
    (microsoft.public.dotnet.general)
  • Re: EVC 3 and 4 stopped working with ActiveSync
    ... Does downloading work? ... in the registry) gets tweaked and causes hanging. ... connection and also a LAN connection to the same ... interaction between ActiveSync and the Platform ...
    (microsoft.public.pocketpc.developer)
  • Re: loading dll through the wince shell
    ... i did checked the driver registry and modified it to non-pci based one. ... >> i have modified the available ensoniq platform dependent code wrt our ...
    (microsoft.public.windowsce.platbuilder)