[crossfire] [Crossfire-cvs] SF.net SVN: crossfire:[13885] server/trunk/doc/Developers/protocol

Kevin Bulgrien kbulgrien at att.net
Sun Sep 26 16:48:26 CDT 2010


> Extract from the Developers/protocol:
> 
>       Change background music. Server will send NONE as the string to stop any
>       music from playing. This song data is set in a map property.  (Due to
>       someone forgetting to update this file when he/she implemented the
>       command, it is unknown what exactly should be done with the string
>       parameter, is it a filename? If yes: relative what?)
> 
> That wasn't precisely defined during server implementation, because client-side 
> wasn't yet implemented.
> 
> There were 2 global ideas:
> - it's a song or file name, the client knows where to find it (either bundled or 
> to be downladed from some site to be defined)
> - it's a mood name (eg: "dangerous place", or "port area") that the client 
> would pick up to arbitrarily decide what music to use from its pool
> 
> Arguments I remember are that it would be better to have music match on the 
> clients, because if you were playing together it would be weird to have 
> different musics at the same place.
> 
> So the best idea is probably to make that a filename.
> 
> Of course that means to wonder where the client should get that one, and how 
> to handle custom background musics.

I agree that using the name as the base file name is a good idea with the
exception of specifying path and extension.

I think it should be a case-insensitive name, not a file name... i.e. with no
file extension like .ogg or .wav, and no path.  The idea being that the client
should be able to determine how to get files, what format of files to play, etc.
It is important that the name not include path.  This was a weakness of the
cfsndserv program.  The case issue is to prevent the possibility of having
similar names that vary only in case as these cause problems with windows.

With it being a name, it could be up to the client to use it as a filename, or
simply as a unique name that a player could map to his/her own choice of music.
I prefer to require that the name not have spaces for various and sundry
reasons.

Kevin



More information about the crossfire mailing list