Page 1 of 3

ThunderGraft Now Undead

Posted: Thu Sep 03, 2009 4:59 pm
by Quantam
Does this site still exist?

Well, as a lot of people know, I'm primarily motivated by my whims. As it turns out, writing this pseudo-eulogy for ThunderGraft last week made me want to get it working again. So, here it is, about ready for beta-testing. And now that I'm able to compile it for the first time in many years, I can actually look at fixing bugs, if any are found.

For those who aren't familiar with it, ThunderGraft allows Diablo through Diablo II (including Starcraft and Warcraft II BNE) to use modern audio compression algorithms (those games only natively support uncompressed WAVs and WAVs compressed with a lossy 4:1 compression that noticably affects audio quality). MP3, Ogg Vorbis, and FLAC are all supported, as well as the other recent ones (the only common one it doesn't support is MP4). Save for FLAC (which is lossless), these allow for superior quality and less than 1/2 the file size compared to compressed WAVs, or about 1/4 the file size for the same quality.

To preempt a couple questions:
1. This is a debug build. Like all the other debug builds, it produces debug log files. They're now, however, in the temp directory for your Windows user.
2. There are some really strange problems with this and FireGraft, and it currently does not work with FireGraft. I'm talking with DiscipleOfAdun about it.

You should read the readme, as it contains some info that will help avoid certain problems.

Also, in the process of getting this thing working again I found 5 different MPQDraft bugs, which I'm really surprised nobody mentioned to me in the last 6 months (2 of them were major, and all of them were pretty stupid little mistakes). There will be a new build of MPQDraft in the very near future.

EDIT: This build is obsolete. Do not use it it; use the one later in this thread.

Re: ThunderGraft Now Undead

Posted: Thu Sep 03, 2009 5:14 pm
by Hercanic
Hell, it's about damn time!

I was totally going to harass you about TG at BlizzCon, too. =o)

I have yet to use TG in the newest release of STF due to the constant log files generated. With a fixed-up and stable TG on the horizon, I definately want to finally include all the custom STF music that's been collecting dust these past seven years.

Re: ThunderGraft Now Undead

Posted: Thu Sep 03, 2009 6:04 pm
by Quantam
Stupid typo broke StarEdit support. Redownload (from the original post)

Re: ThunderGraft Now Undead

Posted: Thu Sep 03, 2009 6:13 pm
by IskatuMesk
All of those people who pestered me about Thundergraft in the past are going to celebrate now.

Re: ThunderGraft Now Undead

Posted: Thu Sep 03, 2009 8:51 pm
by AA7Dragoon
Oh my gosh, it's Quantam!

Re: ThunderGraft Now Undead

Posted: Fri Sep 04, 2009 2:44 am
by Taeradun
awesome, means those CC campaign contest entries could be fixed to be less than a gigabyte :P

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 1:14 am
by Whiplash!
T-DAWG wrote: awesome, means those CC campaign contest entries could be fixed to be less than a gigabyte :P
um no the large size comes almost entirely from custom music and voicing.

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 5:46 am
by Taeradun
Whiplash! wrote: um no the large size comes almost entirely from custom music and voicing.
lol do you even know what ThunderGraft is

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 10:39 am
by Quantam
T-DAWG wrote:
Whiplash! wrote: um no the large size comes almost entirely from custom music and voicing.
lol do you even know what ThunderGraft is
*facepalm*

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 5:24 pm
by Negi
Maybe undead, but not really all that useful...

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 6:23 pm
by Quantam
T-DAWG wrote: awesome, means those CC campaign contest entries could be fixed to be less than a gigabyte :P
Some thoughts on that thought (as it'll take me another hour to download Will of Atai to crunch some actual numbers):
- 22 khz 16-bit stereo WAV music (what Starcraft uses itself) compressed with WAV compression is 23 KBps (12 KBps for mono, which is often used for speech)
- Comparable audio quality MP3s or Oggs (64 Kbps) would be 8 KBps, about 35% as large as the WAVs (would be the same ratio for mono vs. mono)

Thus a 1 gig campaign, assuming it was primarily music and streamed voice, would be 350-400 megs.

EDIT: Shit, Negi's still here.

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 6:33 pm
by Lavarinth
Quantam wrote:
T-DAWG wrote:
Whiplash! wrote: um no the large size comes almost entirely from custom music and voicing.
lol do you even know what ThunderGraft is
*facepalm*
Best. Post. Ever.

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 8:27 pm
by Quantam
Ooooookay, that was... enlightening.

Just had a look through Will of Atai, with regard to sound size.
Total size: 338 megs
Estimate of the amount of that that's music/sounds: 330 megs
Average sound compression: 73.5%
Estimated total uncompressed music/sounds: 1.24 gigs
Estimated total duplicate large sound files: 240 megs

Out of unique sound files (duplicates removed):
Mono sounds (44 khz and below): 5.8 megs
Stereo music at 44 khz: 528 megs
Stereo music at 96 khz: 159 megs (399 megs including duplicates)
Stereo sounds at 96 khz: 352 megs

Okay, so, what do all these numbers mean? Well, the jist of it is that this is a spectacularly space-inefficient mod. Almost all of the sounds in this thing are stereo, 44 khz and above. This is way beyond what SC can handle. SC outputs sound at 22 khz, and anything above that gets downmixed as the sounds play. Downmixing all these sounds ahead of time could reduce the uncompressed size by 647 megs (827 megs if you count duplicates), about 1/4 of that size compressed with WAV compression (meaning a download size reduction of about 171 and 219 megs, respectively).

Second, sound effects are generally only mono, and take up (unsurprisingly) half as much space that way. Yet in this mod about 98% of non-music sounds are stereo. This in itself could reduce uncompressed size by 176 megs (47 megs when compressed).

Combining both of these would reduce the overall uncompressed size (including duplicates) by 872 megs, 231 megs when compressed (download size); if duplicates were removed, that would reduce the size an additional 60 megs (16 megs compressed). All things combined, this would bring the download size down from 338 megs to 91 megs; ThunderGraft could then reduce it to roughly 39 megs.

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 10:29 pm
by DrumsofWar
Silly Query: Wasn't there some way to force a .scx to read sound directly from the StarDat.mpq file instead of having to extract it then add it to the .scx in order to save space?

Re: ThunderGraft Now Undead

Posted: Sun Sep 06, 2009 10:44 pm
by Quantam
DrumsofWar wrote: Silly Query: Wasn't there some way to force a .scx to read sound directly from the StarDat.mpq file instead of having to extract it then add it to the .scx in order to save space?
Yes. Though I don't recall exactly how.