Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: vadbag on March 15, 2006, 03:13:56 PM

Title: Problem with sound package
Post by: vadbag on March 15, 2006, 03:13:56 PM
Hello.
In my game I have "sound" folder as a separate package. The folder contains subfolders "music" and "sfx". When I run the game from the project manager everything's OK. But when I compile the game and then run it there is no sound, although the sound.dcp exists.

How can I solve this problem?
Thanx!

EDITED: Just noticed that the compiled game also uses Arial font instead of one that I assigned.  :o
Title: Re: Problem with sound package
Post by: gajdy on March 15, 2006, 04:24:52 PM
Hello.
In my game I have "sound" folder as a separate package. The folder contains subfolders "music" and "sfx". When I run the game from the project manager everything's OK. But when I compile the game and then run it there is no sound, although the sound.dcp exists.

How can I solve this problem?
Thanx!

EDITED: Just noticed that the compiled game also uses Arial font instead of one that I assigned. :o

Hello,

probably you set the full path name of the sound file. In the Project Manager it is goes fine, but if you compiled game, this wonť be run. See the following script:

Code: [Select]
// we want to play the sound file from package called "sound"
Game.PlayMusic("music\some_sound_file.ogg");

You donť need to set the full path name of package, but only the folder wich package contains and the file name. See the documentation for more information :).
Title: Re: Problem with sound package
Post by: vadbag on March 15, 2006, 04:30:35 PM
Thank you very much!  :D :D :D

Still dunno what happens with the font, because now the compiled game displays it correctly, although I didn't change anything.  :(

Anyway, thank you, gajdy! ::rock
Title: Re: Problem with sound package
Post by: Mnemonic on March 15, 2006, 08:11:31 PM
Custom TrueType fonts must NOT be compiled inside WME packages (it's stated in the docs). They need to be accessible by Windows.
Title: Re: Problem with sound package
Post by: vadbag on March 15, 2006, 09:27:40 PM
Yes, it was accessible by Windows... I think.

Although, does it mean, that the required font should be in the "windows\fonts" folder? Or in the "packages" folder as well?
Title: Re: Problem with sound package
Post by: Mnemonic on March 15, 2006, 10:57:28 PM
It needs to be in the game folder, in the path specified in your .font files. For example, if your font file contains something like FILENAME = "fonts\arial.ttf", then you need to copy arial.ttf to some_game_directory\fonts\
Title: Re: Problem with sound package
Post by: vadbag on March 15, 2006, 11:49:50 PM
What about the packages? Should I create a folder "fonts" for this purpose in the "packages" folder?
Title: Re: Problem with sound package
Post by: metamorphium on March 16, 2006, 01:28:05 AM
yes. the path is relative to position of your game exe file.
Title: Re: Problem with sound package
Post by: vadbag on March 16, 2006, 05:04:45 PM
Thank you, guys!  :) :) :)