A89: Re: Hi-scores and preferences


[Prev][Next][Index][Thread]

A89: Re: Hi-scores and preferences




Hi!

| I don't know much about TI programming yet...
| I once had a discussion on one of the news items on TICALC with Sebastian
Reichelt  about the possibility about finding a way to get
| programms to keep highscores/preferences while they're archived. Neither
one of us had a full  perspective if speed or other issues
| that could be a problem, but noone else said anything... the end idea was
to make a folder named "settings" or smtg and store
| preferences/hiscores there in separate files, in a way to look as windows
registry, and maybe have the os unarchive and archive it.
| Or maybe just an interface to a different implementation on TI-GCC (and
ASM, of course). I think it's a good idea and I wouldn't like to
| let it fade away, so at least someone tell me why it can't/shouldn't be
done.

Yeah, I remember.  It was about the "C Programming Editorial," right?  With
the new release of the TI-GCC Library, this should be easy, because it
supports easy file input/output operations.  The only problem is that we'd
need some kind of tree storage for the registry.

I thought about it a little, and here is my idea:  for each key, a separate
variable should be created.  It should contain a custom data type so that
you don't have problems with the NULL character.  Each time you change a
key, the changes are written into a new variable, and when the programmer
calls a 'Flush' function, the old variable is deleted, and the new one is
renamed and archived.

There would have to be some kind of root key variable, from which you go and
look up all the other variable names for subkeys.  For each subkey, you do
the same again.  It would have to be absolutely safe, with some backup
variables for the lower keys, because deletion of a variable (for example:
crash; the archive memory sometimes doesn't recover completely) would mean
that all subkeys become unaccessable and have to be realigned by the user.

I think the smartest way to do this whole thing would be with an external
library.  Include a link in all Readme files so that the user can always
download the latest version of it.

Of course, this whole thing wouldn't make sense without a program for
manipulation.  This task wouldn't be too hard, though.

If created and used in the right way, the registry could be the basis for
another file storage system (separate from the registry, of course).  For
example, we could include custom types and a tree structure for folders.

| Anyone who wants the discussion, I might find it... nothing much new on
it, though. If someone thinks the idea should follow to the
| Doors team, Zeljko Juric or Olivier Lesteven (TEOS) because they don't
read this list, or stmg, I might mail them.

Zeljko Juric usually reads this list.

Thanks for bringing this up again, I'll see what I can do.

Bye,

Sebastian Reichelt




References: