Re: Version Information?

From: Patrick Dughi (dughi@IMAXX.NET)
Date: 09/26/98

> Yup, You would have to use separate files for each player.  Think about this:
> What happens when you save the larger struct into the space of a smaller one?
> Yikes!

        Think about this, and mind i'm poor at ansi diagrams. =)

| int here      |    This is the version info..  we load the size of
  - - - - - - -      one int, and use the correct struct to load up the
| Size = 2      |    rest of the file (rewinding first of course!).
|               |
| int here      |    Same starting 'int', same routine to determine struct
  - - - - - - -      version to use.
| Size = 3      |
|               |    Different size, but we're loading up a different (the
|               |    'correct') struct.


Result: different structs in the same file, no hassle about which is
which, its determined on load time.  I'd suggest that you would also want
to make a run-time converter for each file load too.. you wouldn't want
'old' players running around your 'made-for-new-people' mud.  Would be
rough to handle.  But, on the bright side, you only have to do it once for
each revision, and i'm sure I can think of a good way to make this easy.

  After all, write a ver 1 to ver 2 converter, write a ver 2 to ver 3
converter (and make the ver 1 to ver 2 run ver 2 through the ver 3 if you
catch someone at that version..)

                        Or, could I be horribly wrong about this?


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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