Re: STL (was Re: [CIRCLE] [CODE])

From: Patrick Dughi (dughi@imaxx.net)
Date: 06/21/00


> > The STL . . . I haven't seen it discussed much here.
>
        > rest snipped <

        Personally, I don't have much experience in using the STL.  I tend
to have my own less-generic c-versions of the routines contained in there.
Not that it isn't useful - it is, but the same thing can be accomplished
without doing an entire paridigm shift to an object-oriented system.

        Granted, Circle lends itself to OO in most places rather nicely.
However, that would require redesigning - and if you are doing that you
will have uneffectively started from scratch.  I did a conversion into a
binary tree world structure and aside from the actual binary tree
algorithm (and the testing, I never get my 2'nd rotate left/right correct
first try), it took maybe 2 hours to convert and another 2 hours to test
to the point where I was satisified that it would work exactly as it had
before (no change in functionality).

        In the end, I didn't do this so I could just easily add and remove
- I was actually pained over loosing the O(1) lookup time for the array; I
did it so that way the entire array could be manipulated more easily
without incuring the cost of renumbering all affected data every time
there is an insertion/deletion.

        This allows me to have a dynamic structure for the world with less
housekeeping involved, though there is a larger lookup penalty.  But
considering that some spaces, like the space between zones (the map area)
are going to be almost wholy dynamic, I don't see a huge problem.

                                                PjD






     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT