Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: object structure layout.



[Mark Wedel]

>    True.  But to have the server effectively use the os paging for
>   unusued maps, the unused objects must be disassociated from the
>   lists that the program is using for the active maps.  So that sort
>   of goes back to having the needed lists referanced from the map
>   structure, and not global lists.

Right.  I think that is the better idea.  Coupled with the incoming
queue, this sounds powerful and uncomplicated.

>    It is easy to do in O(p*m) time (n=players, m=other objects).  go
>   through all the players, and then go through the map objects and
>   see what is nearby.  But if p gets pretty large, this could be
>   pretty slow - slower than just updating all objects on a map that
>   has a player on it.

Clearly it will depend on the size of the map.  I think just
_checking_ whether an object should be processed will not take that
much less time than do all processing on it.  You also need to make
sure that to objects adjacent to two players don't get processed twice
(going to timestamps instead of speed_left will help this problem).
However, if a more advanced scripting language is available for NPC's,
the tradeoffs will change.  I say keep it simple until profiling shows
gains to be had.


Kjetil T.
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]