Drastically Reducing File Size

Discuss all aspects related to modding Zandronum here.
Post Reply
Tosen
 
Posts: 39
Joined: Fri Jun 01, 2012 8:45 pm
Location: Playboy Mansion

Drastically Reducing File Size

#1

Post by Tosen » Fri Jun 29, 2012 6:04 am

So many of you know that Zandronum supports music changes from website paths, such as .mp3 files stored on a website. This is easily achieved with something such as SetMusic("http://www.blahblah.com/sdfgdfg.mp3");.

I think it would be cool to see a website like wadhost that worked specifically for uploading and storing music, that way a wad wouldn't have to be cluttered with megabytes upon megabytes of useless music, when it could all be stored on a data site, then called from later.

What do you think?

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: Drastically Reducing File Size

#2

Post by Qent » Fri Jun 29, 2012 6:25 am

Ehh, I really don't want Zandronum downloading stuff while I'm playing. :/

Sodaholic486
New User
Posts: 13
Joined: Fri Jun 08, 2012 12:03 am
Location: Ohio

RE: Drastically Reducing File Size

#3

Post by Sodaholic486 » Fri Jun 29, 2012 6:49 am

A helpful tip I learned from Gez: only use Doom format graphics when you use a zip or PK3 format (not WAD) if the graphic in question has any transparency in it and if it was made in the target IWAD's or mod's palette. Transparency doesn't even exist in the Doom graphics format, only the ability to use custom image shapes besides rectangles for image borders. When compressed in a zip based format, this allows Doom format graphics to be smaller than even a fully optimized 8-bit PNG.

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: Drastically Reducing File Size

#4

Post by Bloax » Fri Jun 29, 2012 7:08 am

Good luck getting anything even remotely close to a very nicely paletted PNG, however.

Also, if we're talking about the Doom palette - it's very badly made and even directly artistically hazardous.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Drastically Reducing File Size

#5

Post by Ijon Tichy » Fri Jun 29, 2012 9:47 am

u guize and your misleading topic titles

anyway i'd support this, considering i have music off anyway and this would save me 40mb of bullshit i'll never listen to (because voivod fuck yeah)

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: Drastically Reducing File Size

#6

Post by Dusk » Fri Jun 29, 2012 10:00 am

I don't, just because my connection is pretty shit and I'd rather listen to music while playing than waiting for music while playing.

Also, half (if not the main) reason behind filesize reducing is to make you have less to download. Making people download the music while playing sorta defeats the point...

User avatar
Medicris
Forum Regular
Posts: 614
Joined: Mon Jun 04, 2012 5:29 am

RE: Drastically Reducing File Size

#7

Post by Medicris » Fri Jun 29, 2012 11:47 am

He's got a pretty strong point there. You're not avoiding that download of the extra 40MB, you're just delaying it. I'd imagine it would introduce some security and trolling vulnerabilities too.

Frankly I'd rather not play in silence while pinging 280 for the first X minutes of every map, since I'm probably downloading 320kbps mp3s in the background.

But I agree, badly made, uncompresssed wads can be a headache.

User avatar
infurnus
Retired Staff / Community Team Member
Posts: 601
Joined: Tue May 29, 2012 9:40 pm
Location: Dusty SEGA Tapes
Clan: Unidoom
Clan Tag: UD
Contact:

RE: Drastically Reducing File Size

#8

Post by infurnus » Fri Jun 29, 2012 2:28 pm

If you ever do the website thing, that's bad design.
Let's ignore that for a moment.. if you decide to do that instead of including the resources, at least make a patched version that includes the stuff you need in the event that the website goes away or removes the content due to bandwidth issues. (Please ask people permission before using their webspace for this, or read the usage terms of the website)

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Drastically Reducing File Size

#9

Post by Watermelon » Fri Jun 29, 2012 4:59 pm

Sodaholic486 wrote: A helpful tip I learned from Gez: only use Doom format graphics when you use a zip or PK3 format (not WAD) if the graphic in question has any transparency in it and if it was made in the target IWAD's or mod's palette. Transparency doesn't even exist in the Doom graphics format, only the ability to use custom image shapes besides rectangles for image borders. When compressed in a zip based format, this allows Doom format graphics to be smaller than even a fully optimized 8-bit PNG.
Does converting to doom palette preserve the true color? Just because that'd make OpenGL look shitier (since most people on ST/Zandronum use OpenGL outside of CTF)

Minigunner
 
Posts: 86
Joined: Mon Jun 04, 2012 5:24 am
Location: California

RE: Drastically Reducing File Size

#10

Post by Minigunner » Fri Jun 29, 2012 7:32 pm

Speaking of "Drastically reducing file size":
- Use OGG Vorbis audio, not MP3's. OGG is very compressible with minimal loss. Also, I would recommend downsampling the audio to 32000Hz, 16-bit (Mono for world sounds), as the loss of quality is barely audible, but the reduction in filesize is more noticable.
- Abuse the hell out of TEXTURES. It is very flexible, and since the graphics are generated in-game, the only space used is the text you put in. Definitely recommended for simple recolors, flipped/rotated textures, or copy-pastes.
- As Sodaholic said, as long as the image is in the Doom palette and the mod is a PK3/ZIP, convert to DPF (Doom Patch Format), as it is more compressible.
- And of course, remove unused and duplicate entries.
Last edited by Minigunner on Fri Jun 29, 2012 7:34 pm, edited 1 time in total.
Theshooter7 wrote:Also, to all those people who stack players for exploits: I hate you. Do I really need to seal off every inch of every map to prevent you from getting to places you shouldn't?

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: Drastically Reducing File Size

#11

Post by Bloax » Fri Jun 29, 2012 8:46 pm

Minigunner wrote: - Use OGG Vorbis audio, not MP3's. OGG is very compressible with minimal loss.
On that topic, there's a (really) fast command-line version of AoTuV OGG here. (Source)
Use something like -q 0.85-1.33, though make sure to listen to them and compare them to the original track.

Because you may find that some important pieces of sound have been cut off, many of which could be saved by upping that quality a bit.

Unless of course the entire track is high frequencies, like this thing. (I think it requires a -q of like, 2.5 or something.)
Minigunner wrote:Also, I would recommend downsampling the audio to 32000Hz, 16-bit (Mono for world sounds), as the loss of quality is barely audible, but the reduction in filesize is more noticable.
8-Bit sounds just fine to me, but I may be totally wrong.
And if you're going to downsample, I'd recommend doing so without antialiasing. (Aliased downsampling, wee!)

You can do that in Wavosaur, and it's portable and stuff, so yeah.
As for why, usually antialiased downsampling makes everything really muffled, and then you'd be better off not doing that.

Depends on whether the source is upsampled already with non-aliased interpolation, however. (If it is, aliased downsampling can help a bit.)

I MAY BE TOTALLY WRONG HOWEVER, HAHA.
Minigunner wrote: - As Sodaholic said, as long as the image is in the Doom palette and the mod is a PK3/ZIP, convert to DPF (Doom Patch Format), as it is more compressible.
As I've more or less pointed out already, UNLESS it's in the Doom palette, it's pretty much madness to follow this advice.

User avatar
ALIENwolve
 
Posts: 60
Joined: Sun Jun 10, 2012 1:14 am

RE: Drastically Reducing File Size

#12

Post by ALIENwolve » Fri Jun 29, 2012 8:57 pm

But wouldn't this cause issue for completely offline play and result in constantly downloading data instead of just once?

Tosen
 
Posts: 39
Joined: Fri Jun 01, 2012 8:45 pm
Location: Playboy Mansion

RE: Drastically Reducing File Size

#13

Post by Tosen » Sat Jun 30, 2012 1:47 am

Considering everyone thinks that the song would be slow to download (Which you must have a TERRIBLE internet for, although many people do play Doom for a reason I guess) I can conduct a test server later and see what the results are.

I tried this myself and it didnt lag at all, and the music started instantly, but maybe thats just me.
Result: I tested it with 2 test Subjects.
Test Subject1 : (Location America) Music changed within 1 to 2 secs
Test Subject2: (Location Saudi Arabia) Screen froze for 3 seconds, then the music changed. About 1 second later the server crashed.

I tested it twice, and maybe Zandronum is just unstable or something, but the music changing online from another website crashed the server with a "Fatal Error" message. Overall I would say it doesn't lag as bad as others think it does, but instead the problem comes in with the actual port itself I suppose.
Last edited by Tosen on Sat Jun 30, 2012 2:05 am, edited 1 time in total.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Drastically Reducing File Size

#14

Post by Watermelon » Sat Jun 30, 2012 4:15 am

This is cool. Streaming data would be quite interesting.

I hope an idea like this goes further, it could even be used to stream input into the game itself (like variables, game data...etc), which open up a whole new realm of possibilities.

User avatar
Medicris
Forum Regular
Posts: 614
Joined: Mon Jun 04, 2012 5:29 am

RE: Drastically Reducing File Size

#15

Post by Medicris » Sat Jun 30, 2012 6:34 am

Tosen wrote: Considering everyone thinks that the song would be slow to download (Which you must have a TERRIBLE internet for, although many people do play Doom for a reason I guess) I can conduct a test server later and see what the results are.
I was mostly just referring to low-grade hosters, not individual internet speed. High-speed internet isn't available in every country.

Also, I'm not certain wadhost would enjoy collecting what's probably copyrighted music after what happened earlier.

Post Reply