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

Sounds (was Re: Environment variables of client)



On Fri, 8 Dec 1995, Matt Cortes <link@acy.digex.net> wrote:
> Forgive me for approaching this from a novice level <G>.  But I have 
> notied some clues that this game has sound.  Is there sound support 
> compiled into it or are you refering to an addon such as the lightning 
> code iv'e been reading about from here?
> 
> If there is sound, I would love to get it enabled. :>
> 
Sound is supported if you have the RPlay library.  RPlay works with almost
all UN*X systems, so it shouldn't be a problem for you to use it.  Rplay has
the great advantage of mixing sounds on the fly and working accross the
network (like X Window), which would not be possible if CrossFire was using
/dev/audio directly.  You can get the rplay library from ftp.x.org or
ftp.sdsu.edu.  The latest version comes with a "configure" script that should
automatically detect the configuration of your system.

Once you have compiled the RPlay library, edit the CrossFire configuration
file and insert the directories for the library and its include files.

Note: I wrote the sounds code a long time ago, and I have lots of ideas for
improving it.  But I thought that it would be better to wait until the
client/server split before adding these new features, because I didn't want
to have to do the job twice.  Well, I'm still waiting...

The first improvement would be to re-write the syntax of the "lib/sounds"
file which defines which sound has to be played when some event occurs.
Instead of relying on the entries to be in a fixed order, I would use symbolic
names for each type of event.  For example, the new file could have lines
like these:
  hit door = crush.au, 80         # <Event type> = <sound name>, <volume (%)>
  hit ennemy = tap2.au, 100
  small fireball = Whoosh.au, 70
  large fireball = Whoosh.au, 100
It would then be easier to maintain this file, and it wouldn't be a problem
if the number of spells changes.

Another improvement would be to use "environmental" sounds; that would add
a lot to the atmosphere.  Those who have played games like Hexen know what I
mean.  It should be possible to add some new "sound" archetypes that can be
placed on a map and play sounds from time to time.  For example, a player
could hear the water dripping if he/she comes near a pit, owls crying in the
forest, bells ringing in the church, etc.  The new proposal for "weather
effects" would also be a great way to add environmental sounds: a storm could
make a lot of noise.  And of course, the monsters could be noisy too.

I have several other ideas and I know how to add some of them to the code,
but I don't want to add this to the current code.  It would be much easier
to write and to maintain the new sounds code if CrossFire was really split
between a client and a server, like this was discussed some time ago.  Will
this ever be done?

-Raphael