Re: Circle: Important: Should Circle switch to ASCII playerfiles?

From: Michael Buselli (
Date: 04/25/95

On Tue, 25 Apr 1995, DoDGeR wrote:

> I prefer the Binary, both because of easy of use, (one fwrite and it is all
> there) and the savings on space.  writing a converter really isn't that hard.
> the purgeplay.c contains all the hard file grabbing and saving stuff, you just
> need to convert the structures between the read and the write.  You will still
> need to write a conversion routine for the ascii file any ways,  because if you
> just insert a new structure over the old one in the file, you are most likely
> gonna overwrite someone else's character.

     If you set up the ASCII file correctly, no conversion should EVER be
needed.  All you would do is add the new field to the bottom of the file. 
Also, ASCII files don't have to save fields that are 0 (or some other
default value), because if the mud doesn't find those fields in a file, it
can assume they are 0 (or the default value). 

     Although I personally don't see the dificulty of setting up an option
for either ASCII or binary at the top of structs.h.  The code for binary
is already there.  Add what you need for ASCII and surround them all with
#ifdefs.  People shouldn't switch back and forth between the two, anyway,
once they choose one of them.  Making a switch in config.c is just silly, 
and will require checks all over the place for things like this:

if (using_ascii_pfiles)

Better to just write whole functions of the same name and select which 
one you want before you compile.

Just my $.02.
Comments are cool.
Flames are not.

Michael Buselli

This archive was generated by hypermail 2b30 : 12/07/00 PST