[CF-Devel] Client Sound Server

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Thu Mar 6 00:11:08 CST 2003


Preston Crow wrote:
>
     
      [I have no clue how sound is implemented now, so my comments may be
     
     >
     
      somewhat ignorant.]
     
     
  right now, its basically that sprinkled through the server are things like 
'playe_sound...'.  The sound they play is basically hardcoded to certain events, 
like pulling of levers, buttons, going through trap doors, eating poison, etc. 
For spells, when one is cast, it basically says 'play spell sound xxx'.


>
     
     
     >
     
     
     >
     
      This indicates that sound activations should definitely be part of the
     
     >
     
      arches.  That way a map maker can turn off sounds for machinery that the
     
     >
     
      player isn't supposed to know about, such as grates that roll boulders to
     
     >
     
      generate random actions depending on which button they land on.
     
     >
     
     
     >
     
      Volume could be a factor of distance.
     
     >
     
     
     >
     
      Of course, as you point out, this gives the player more information, so it
     
     >
     
      is something map designers need to think about carefully.
     
     
  Well, in the sound command send to the player, on offset to the player is sent 
(eg, -4, -2).  Thus, the client can adjust volume, as well as adjust the balance 
for two speakers (if something is just to the left of hte player, only play on 
the left channel for example)).  I suppose if someone wanted to get adventurous, 
they could put support into the client for full surround sound also.

  But yes, I think sound should be part of the object.  A simple implimentation 
should just have one sound/object, and a flag which says when to play that sound 
(eg, when player applies it, etc).

  A more complex method is what I described briefly before - ability to add 
repeating sounds (so something like a fountain constantly makes noise), ability 
for objects to have multiple sounds (if applied, play this, if dropped, play 
this, constantly play this, etc).

  However, this is near the bottom of my list of things to do.  So unless 
someone else does it, not likely to happen anytime soon.

  You are right in that it would give out more information.  I'm not sure how 
big a deal this really is - I know when discussion about increasing the size of 
the window the player sees was discussed, there was some concern about the extra 
information it gives out (what might have been a gate connected to a lever that 
were too far apart to both be seen might now be visible to the player.  Or you 
could have cases where player could now easily see the other side of the room 
and try to make more clever decisions, etc).  I think its pretty unlikely that a 
player hearing an event they didn't hear before isn't likely to significantly 
change any maps.  The most likely case I'd see is where you have cases of 
objects like gates/buttons used for effects the player shouldn't really notice.

  As an aside, since the server sends instructions to the client like 'play 
sound X, offset x,y', the client could certainly be made to display that in an 
'intelligent' fashion even if the player doesn't want audio effects. Eg, 
something like 'you hear a grate to the north' or the like.



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



_______________________________________________
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