# [MUD-Dev] Re: mobile movement

Marc Hernandez marc at ias.jb.com
Tue Jan 12 21:25:55 New Zealand Daylight Time 1999

```On Wed, 13 Jan 1999, Ling wrote:

> On Tue, 12 Jan 1999, J C Lawrence wrote:
> > On Tue, 12 Jan 1999 13:39:51 +0000 (BST)
> > Ling <K.L.Lo-94 at student.lboro.ac.uk> wrote:
> >
> > > The ambitious mud designer will, of course, not define the
> > > highways and write an algorithm which tracks players and
> > > extrapolate the routes from the players' movements. :)
> >
> > I forsee an algorithm:
> >
> >   Plot and follow path from current position to position of target.
> >   if current position was position of target within last X time
> >     follow path of target (ie same location motions)
> >     if blocked, resume plot/follow.
> >     if current location is too-old target position, resume plot/follow
>
> I was thinking more of:
>
>   Log all player movement that is in quick succession.  That is,
>   continuous movement with only brief pauses.  Starting a log requires
>   monitoring the player until the server thinks that the player really is
>   on the move.  Ending the log means waiting for a significant pause (like
>   over 30 seconds, maybe a minute).
>
>   Compare logs of locations traversed, if there are significant
>   continuous agreements in location between multiple logs, make these
>   locations a highway with branch offs equal to the start and end of the
>   players' moves.
>
> Then add code to give highways a score.  This score decays to remove
> highways that are out of fashion.  Highways that are in use constantly
> would have their score topped up by the players.  Maybe code to join
> highways up...  Hope this isn't too obscure.

Assuming it is room based (or possibly grid based of some sort)
how about adding a decaying person count.  When they enter the spot
increment it by N.  Every X minutes decay it by some amount (or multiply
it by a number between 0 and 1 for a nice exponential decay curve).
You could also add a count per entrance into an area (and an exit
perhaps?).  Then have code like:

if greatestTravelledDir > 1 person per hour
if n/s
Describe("There is a heavily travelled pathway in the
north and south direction.")
else if e/w
Describe("")

else if greatestTravelledDir > 20 persons per hour
Describe ("Many travellers have passed through this area from
dir to dir")
etc.

The highway would then emerge from travelling.  The above seems
like it could be very computationally expensive (specifically "if there
are significant continuous agreements").

Marc Hernandez

```