[crossfire] ingame music

Brendan Lally B.T.Lally at warwick.ac.uk
Fri Jun 3 21:52:28 CDT 2005


>>>
     
     
      mwedel at sonic.net
      
       06/03/05 05:24 AM >>>
     
     
>
     
       Perhaps, but not positive if that will work.  Lighting is just a single value. 
     
     >
     
       If you try to hijack that code for music, you will get cases of two sources 
     
     >
     
      overlapping, so that single value doesn't work - you then need to store both 
     
     >
     
      sources or figure out which is louder or something.
     
     
This is a limitation the lighting code could do without also. If such a mechanism were used for the sound code anyway, then it could usefully be extended to the lighting code to allow coloured lights. I don't know how easy it would be to implement client side, but it would be a nice way to give feedback on some levels, or create interesting optical effects.

The easist thing to do in that case then would be to store RGB values in the stats for the light object, and then when they overlap have the resulting colour be the weighted mean in each value. (based on proximity and strength of source).

Likewise with music, the resulting sound could be the songs all mixed together with volumes varing depending on their source volume (glow radius) and the distance from the source.

    
    


More information about the crossfire mailing list