Re: Circle Architechture - was Re: [CIRCLE] DG-Script'scrashing..

From: Chris Gilbert (chris@buzzbee.freeserve.co.uk)
Date: 05/31/00


Patrick Dughi wrote:
>
>         This last set of messages brings up an ongoing issue I have with
> the circle code base as a whole.  I'm not sure exactly how to label it
> though; perhaps I should fall back on my old line that 'circlemud is a
> tense system'.  That is, you cannot push it very far, or it breaks.

[snip - description of problem of stuff getting relocated/deleted/etc
with an active ptr to it, which is the common problem]

>         I believe an object oriented approach to the problem would be the
> best bet - as much as I prefer C to C++, this is the direction I'm
> leaning.  As an interim solution, perhaps much of the direct access to
> structures/data should be replaced with a bit of abstraction, accessor
> functions, or data manager functions (for the many lists, for example).
> For now, until I can make..basically a mud API, I'm still fixing on a
> point of conflict solution for each problem.

I'm heading down the C++ route, and tring to use id's/vnums more often.
this is especially true of things like the event systems around, eg the
player dies, the mob dies or something of that ilk and you're stuck with
a ptr to nowhere, with an id you just have to dereference it (and as I'm
using C++ it's fairly easy to do with a custom class or using map from
STL)

My general feeling is that C++ holds a lot of stuff these days,
especially as C++ compilers are getting better at optimizing templates.
Looking over some of the STL stuff I'm like that's just so nice, in
terms of you don't have to handle anything, you just insert an item and
that's it, no checking memory, allocating it etc.

I believe that Circlemud 4 is heading down a route of STL and C++,
although what's happening with it, it's all very secret ;)

>         I am curious though if anyone else is experiencing this issue, and
> if so, what's being done about it for your mud.

like I said mostly to switch to using id's or vnums and avoid having too
many ptrs around the place, but certainly the crashes are a pain.

Cheers,
Chris


     +------------------------------------------------------------+
     | 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