[CF-Devel] Weather level 5 (Re: Weather needs smoothing)

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Tue Aug 3 17:10:17 CDT 2004


  a lot of good ideas, but some of my own thoughts.

  In addition to be able to better tell the client about some effects, it'd also 
be nice if the server knew which information was weather related with no real 
meaning (say the puddles on the ground) vs data with real meaning.

  I say this in that a lot of the data falls into that later category, and it is 
probably something that individual players should decide if they want to see it 
or not.

  Some thoughts on the previous ideas:

1) Each space could have an actual temperature.  High or low temperatures could 
effectively cause fire or cold damage (taking into account the players 
resistances, or maybe have each point of resistance act as it shifting the 
temperature in the players favor?)  Anyways, the point being, deserts could have 
a temp of 120 F, and arctic reasons temps at -10 F, and do damage as appropriate 
- shouldn't be that hard to do, because I believe the weather code currently 
figures out the temperature of each space.

  In terms of lifecycles - the best way to handle this is to add a field like 
'expires_at' to the object structure, and have it represent the tick (or other 
global time) it happens.  This is different from the current object scheme where 
it only ages if it is currently in memory.

  Thus, when a map is loaded, the expires_at field can be examined, and it can 
quickly be determined that the object should now be dead.  Likewise, maps in 
memory could periodically be examined to clean them up.  And it wouldn't be hard 
to have a flag or something which says 'when this object expires, create 
other_arch in its place' - thus you could mimic growth - the sapling expires, 
but creates a small tree in its place, after a while it expires, creates a large 
tree, etc.

  As far as the crash in wolfsburg, a stack trace could be handy.  And there is 
no guarantee of course that the code is bug free.  dmalloc or purify (free demo 
available for linux) can be useful in finding memory leaks.

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list