My game is almost half a Gigabyte in size

Oh, and obfuscate it if you really need to cut down on filesize. JShrink

Extremely Unrelated:
It looks (to me) like you’re using Java2D.
This code might help enhance your game’s graphical appearance.

// Put this at the start of your rendering. No need to use every single one.
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_TEXT_LCD_CONTRAST, Integer.valueOf(100));
g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
g.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);

I’m not sure why you need thousands of sound effects.
You’re making your life harder for little benefit IMO.

  1. Especially with small games, you should be ok with less than a hundred SFX, having more won’t make the game more fun.

  2. if you load all your sounds at once, they will still take up 500 MB in RAM, even if their files are compressed with vorbis

I’d have to agree with Arnaud. You’d probably get a lot more bang for the buck by using a relatively small pool of sounds and applying blending/audio processing to get variation. A single “footsteps” sound effect could have reverb added to or a low pass filter to simulate walking in large cavernous spaces, or a grassy field respectively for instance. DSP may be a bit more complex, but it can potentially save you a lot of space in your final product.

Generally you would use WAV files for short sounds (Special FX) and Mp3 or other compressed format for music and large sounds.

I’ve heard that, but I always wonder, why? Is it loading times? I have several theories on this, but I want to know other people’s opinions on this, as I am wondering if I am doing something genuinely ‘wrong.’

I think it’s for ease of processing since you don’t have to unpack/decode the data on the fly. I would imagine many sound libraries would store the data in memory in an unpacked format for this reason. Just my $0.02.

That is a reason I’ve considered, but also, all sounds loaded into memory are in an uncompressed (raw) format. Only files streamed from the HDD avoid this (and only partly, as they must be decoded in as the stream comes in), which is what you try to do for long sounds, like background music, to avoid using hundreds of MB’s.
But surely the processing time required to decode many small mp3’s or such is small compared to other concerns?

Indeed. Although I’ve seen people use .wav files for sound FX, I can’t say I’ve really seen many people advocate using it outside of beginners tutorials. Maybe it’s just traditional to suggest them since they were pretty ubiquitous back in the early days of game development before we had accessible and affordable/free compression technologies. It seems like rather dated advice to me, but there may be other reasons that I’m not aware of. I’d be interested to hear other’s take on it as well.

As an aside, I would avoid using mp3’s in anything I distribute at the moment. There are currently too many licensing/patent uncertainties involved with their use that can be sidestepped with the ogg/vorbis suggestion. 8)

Yea, I think it is mostly just the traditional advice.

Ah, now there is a legitimate reason in regards to file format, good idea, thank you sir.

For size purpouses seems the best option.

Wav are default. You don’t need extra libraries to use them, so they are easy to access and control.

Mp3 size are very small, but you need to go a little further to use them.

Just an advice that was very useful to me: “wathever works”. If it works and it has good performance, go with it.

“Whatever works” is the main cause of Epic Failure

From what I see from the games screenshots and gametype,
you should target to have it smaller than 30MB.

next to using ogg for sound, also
optimize your PNGs

Use a function to create large tiled layers from a smaller PNG
instead of saving large background pictures. etc

Ardor3D has some nice math functions that can be used to generate textures on the fly, notably simplex noise, and brick/grid patterns.