[CF-Devel] Starting Suspended Animation Process

Tim Rightnour root at garbled.net
Wed Jan 2 16:11:21 CST 2002


On 02-Jan-02 Yann Chachkoff wrote:
>
     
      Again unstable and undocumented feature popped out on the CVS code.
     
     >
     
      Although I understand quite well the motivations of acting so, as well as the
     
     >
     
      problems any OpenSource project like Crossfire needs to handle, I do not 
     
     >
     
      approve them.
     
     
Well.. I sincerely apologize for not posting first.. I really should have done
so.  So there are two things I'd like to try and do to rectify this:

1)  Open this up for discussion.  Yes, it's allready committed.. but I'm
completely willing to backout and/or make changes.  Since I screwed up, and
didn't post first.. I will take complete responsibility for a backout if people
want me to back it out.

2) Describe what it is that I did, and attempt to document it here for everyone.

The overlay code does the following:

An overlay is a partial map, which is loaded on top of the original map. 
Any items on the overlay are loaded in addition to items normally on the map
from the standard map files.

Overlay maps are not normally saved.  There are two situations when an overlay
map is saved.  1) During an emergency save.  2) When using the new world maps,
the world map is slowly processed and re-saved via overlays.

Overlays allow one to make modifications to a map, without modifying the
original maps.  In this way, information such as temperature or weather
conditions can be saved in the map headers, and continually updated regardless
of a new version of the map being downloaded.  In addition, things such as
additions by DM's can be saved on these overlays.  Nothing alive is ever saved
on an overlay.

When a map is loaded via ready_map, it attempts to load the overlay for that
map.  If none exists, it continues without it.  If one does exist, it loads the
overlay, and replaces the map header with the one on the overlay.  It also
loads and places any items on the overlay map onto the map.

There also exists a decay algorithim, which fires off at ready_map().  This
algorithim looks over the entire map for things that were not loaded as part of
the original maps (marked with a flag FLAG_OBJ_ORIGINAL) and slowly decays
those objects, to prevent them from accumulating forever.  In addition, the
weather code, which slowly processes the entire worldmap over the course of a
day, runs the decay as it goes.

---
Tim Rightnour <
     
     root at garbled.net
     
     >
NetBSD: Free multi-architecture OS 
     
     http://www.netbsd.org/
     
     
NetBSD supported hardware database: 
     
     http://mail-index.netbsd.org/cgi-bin/hw.cgi
     
     
    


More information about the crossfire mailing list