EXE with no sound?

For questions about using Classic.

Post » Mon Dec 05, 2011 9:10 pm

Hey guys,

I am having an issue with getting my project to export with sound... If I put the .EXE file in the folder with my audio files, it works just fine...

Will I need to package/distribute my game in this way or am I missing something?

B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Tue Dec 06, 2011 10:32 pm

There's two ways of doing what you want.

The first one is to point Construct towards the right path where the sounds are placed, when using external sounds. To do this you need to use the "AppPath" expression when pointing Construct to your files. If you have your sounds, like a file called sound1.wav for example, in a folder called audio that is placed within the same folder as your executable, then you'll want to do something like this: AppPath & "/Audio/sound1.wav"

Alternatively you will want to add the files as resources within construct, effectively baking the sounds into the executable. Add the sounds to the "Files" folder in the project view, you'll then be able to access them as resources with either XAudio2 or Audiere, whichever you prefer.

There are pros and cons to either method, if you don't want/need to go into detail about which is better, just use whichever method comes easiest to you.inkBot2011-12-06 22:34:17
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Dec 07, 2011 12:21 am

Wait, can you please go into those pros and cons? I want to know even if the OP doesn't :PSup with that?2011-12-07 00:22:16
B
34
S
15
G
16
Posts: 267
Reputation: 10,684

Post » Wed Dec 07, 2011 1:21 am

Sure. I'll just mention this first, I'm going mainly by MMF1/2 knowledge here, but I'm guessing the general logic is the same, since there are many similarities between MMF2 and CC.

As far as I know, the main difference is how/when the sounds are loaded. If you bake in the sounds into the exe, the exe will (narutally) be larger, and consequently take longer to load. Having just one file can be seen as both a pro and a con I guess.

Loading the files externally will in general allow the program to load up quicker, but it will load the files when they are called for (which back in MMF1.5 times were kind of a big deal IIRC). If you don't want the audio files to be easily copied or accessed out of game, then this would be a con, since you effectively store the files outside of the executable.

Now again, I'm not 100% sure that this is completely true regarding CC, though it was with MMF2. However, unless you are doing something seriously intensive you shouldn't have much of a problem with either method, since computers today are more than powerful enough to handle loading the files on the fly. It's good to keep in mind though.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Thu Dec 08, 2011 4:18 pm

Hey thanks inkBot. I figured it was something like that, but I am still trying to read up on all the intricacies of files vs. resources vs. sounds, and getting everything to work smoothly.

I'll probably go with "baked in" approach, it's just simpler/cleaner...though there is something kinda cool about letting people have access to the sounds and things if they wanted to repurpose them, I dunno, I'll figure it out.

thanks again!
B
17
S
3
G
4
Posts: 91
Reputation: 3,929


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests