Re: [Circle] Suggestion for crossplatform binary format

From: Niese-Petersen (Tenp@cris.com)
Date: 08/13/96


On Tue, 13 Aug 1996, Jack Wilson wrote:

> >I think that this problem has to do with diffences in the size and 
> >structure of the way the 2 os's save binary data with fwrite().
> 
> Yeah, which gives me an idea.
> 
> Why not prefix every Circle binary file with a 32 bit integer (such
> as 0x01020304).  If, when the file is loaded, the driver detects that
> the number is not equal to 16909060 (decimal for 0x01020304), it will
> know that the file was saved in a different format than the driver 
> is currently using, so it can convert.
> 
> Sure would save a lot of people some headaches... 
> 

A much better thing to do (in my opinion) is make ASCII playerfiles, instead
of one big binary-file.

Positive:
+  [BIG PLUS!] You do not have any problems moving it to a new OS.
+  Much easier to delete one player. [No need for DELETED Flag. Just delete
                                      the playerfile.]
+  Fill less [Made one on 2.2 long time ago.. One ascii playerfile filled
              only 33% of the binary info for a player. Never saw it over
              45%. And that was even after I added 640 more bytes to the
              player structure.]
+  Name change much easier.
+  Don't need to load the whole playerfile in for all players.  Load a player
   only when needed.
+  A few other things..

Negative:
-  ASCII file read/write is slower than binary. But trust me.. You can't
   feel it.
-  Take some time to insert the damn code :) Including making a different
   playerindex system and fix all the small stuff that use playerinfo.


It is worth it.


---
Erik Niese-Petersen
Aka Quint The typo God
Realms of Darkness IMP [matrix.xiii.com 6666. Playertesting]


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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