Re: New tracking idea (well probably not new,but different from stock circle)

From: Gary Barnett (gbarnett@POLARNET.COM)
Date: 10/14/97


On Tuesday, October 14, 1997 12:17 PM, Sean Butler [SMTP:sbutler@DEVEAST.COM]
wrote:
> ----------
> From:  Ron Cole [SMTP:rcole@EZY.NET]
> Sent:  Tuesday, October 14, 1997 1:57 PM
> To:  CIRCLE@post.queensu.ca
> Subject:   New tracking idea (well probably not new,but different
> from stock circle)
>
> I like your idea Ron, in fact maybe tracks left by players can be a room
> affect? Since we already have code to deal with that it would make it very
> easy to add. I wonder how big the memory use would be?
>
> On my machine a raff_node is 32 bytes (64bit long int). That means if you
> have 100 chars making 30 moves per min and the tracks last 5 mins, that's
> 480k extra.
>
> That's not so bad considering that you can do some very cool things with it
> and considering that we can eliminate the rooms the char returns to by just
> updating that char's entry in the list for that room.
>

For movement tracking I use a linked list of rooms (one for each zone). Each
entry in
the list signifies a room that contains tracking data.

struct movement_tracking_room_type {
        int rnum;
        struct movement_tracking_room_type *next;
};


Each room contains a pointer to this struct, which is used to create a linked
list of
tracking entries.

struct movement_tracking_data_type {
    int age;
    byte dir_entered;
    byte dir_left;
    byte bleeding_level;
    sh_int info; /* 6 bits used for flag info */
    struct char_data *person;
    struct movement_tracking_data_type *next;
};

Then I have a routine that runs during idle time and ages a percentage of the
rooms based
on how many are left this minute vs how many have been done this minute. Gets
rid of the
tick based lag, though it did take a good amount of time to get working as
intended.

With this system you do have to remove all tracking entries for a mob/player
when they are
extracted. But I viewed that as an acceptable disadvantage of the system for
my purposes.

I like the cool stuff you can do with it, even though it's a hog
memory/processor wise compared
to timed objects, as an example. Blood trails/drops, hounds scenting their
prey, mobs using
in character knowledge to sense their attacker who has fled and is hiding out
one room away :-)

Now to work on making the mobs use the info in an intelligent manner.  Mob AI
anyone?

--Mallory

Neither sweat, nor blood, nor frustration, nor lousy manuals
nor missing parts, nor wrong parts shall keep me from my task.
  --Christopher Hicks


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



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