Page 1 of 1

JPG Textures

Posted: Sat Oct 15, 2005 5:20 pm
by AlliedArmour
JPG's would make good textures because they're able to be so much compressed. Of course, there wouldn't be transparency but you could either have fixed-colour transparency or none for JPG.

Another idea.

Posted: Sat Oct 15, 2005 5:30 pm
by Supertanker
Hey yeah that WOULD be a nice idea...and maybe GIFs too...

Animated gifs for water would look really nice, i have seen some awsome 256 color water effects that I sware look like they are highcolor...

Posted: Sat Oct 15, 2005 5:48 pm
by JeffM
umm PNGs are allready compressed, and lossless. JPEGS can get smaller, but they also loose image quality, so it dosn't realy buy us anything. Since images are 3d textures and are going to be scaled, you want the origonal image to have maximum quality.

Are you saying that downloading current PNGs is a huge problem? If so I'm not seeing it. I do see people not seting good compresion settings in PNGs, but then that can happen in jpeg too, so it is somewhat a moot point.

supertanker
gif is copyrighted, we can not use it with out a license. You can make 256 color PNGs that can be smaller then gif images.

The format does not dictate usage or content.

Posted: Sat Oct 15, 2005 5:57 pm
by AlliedArmour
JPG's can be made smaller and therefore easier to download on BZ. They are lossy compression but it's compression can be used in a manner that you lose less quality for less size.

Posted: Sat Oct 15, 2005 6:01 pm
by Supertanker
I thought the copyright expired on june 2, 2004?

Stupid outdated graphics book

Hey how about Shockwave files? :twisted:

Posted: Sat Oct 15, 2005 6:23 pm
by JeffM
AlliedArmour
What type of size diff are we talking about? a couple K? that's nothing, textures are downloaded once and cached, it is not like it's a huge download of 100's of megs. Yes dialup users may have to wait 5-10 seconds more per image, once. They are a dying breed. It's a lot of work to do jpeg( more code, more libs, more chances for something to fail on some OS) for very little reward. PNGs have many compression settings, most people just don't set them and leave them a the default. Also the lack of alpha makes it even more confusing, having to swap formats for diffrent effects.

supertanker
don't be stupid. you are becoming anoying again...

Anyone can make some case for "insert my favorate file format here", but bzflag is a simple game, not an image editing program. it dosn't have to support everything under the sun. Doing so make it much more complex and much more prone to problems.

If I was to redo the image libs again, sure I'd use a 3rd party lib that loads many formats, but only because it offers other features that we would use, not just to pick up formats. But then that lib would also limit the platforms bz runs on. It's a trade off.

PNG is a good open format, that has reasonable compression, all the features we need, and is well supported on allmost every platform. It works, and it's not like people are screaming "my god the downloads they take forever, every time I play".


oh, and I'm prety sure the jpeg compression system is patented, and that makes it a bit 'iffy' in open source, just like gif :)

Posted: Sat Oct 15, 2005 6:28 pm
by AlliedArmour
Jeff, what you say about dial-up agrees excatly with what I think. But, one of my friends that I play BZ with is on dialup and can't get DSL because there's no ISP for it out there yet.

Some examples:
A 12KB drop.
A 15KB drop.
A 21KB drop.
A 62KB drop.

I can provide the files if you want. Personal preference of course would be for widespread DSL.

Posted: Sat Oct 15, 2005 6:39 pm
by JeffM
ok so 12k, that saves you what 4 seconds? the one time you download it?

your largest one will only take 20 seconds longer, on DIALUP ( 3k/sec average).

Texture downloads are cached, you only get them once. So your telling me you want us to implement a totaly new patnented file format system, that has to exist allongside our current one since it dosn't support alpha, so you don't have to wait 20 more seconds, once?

It is not like we stream images every time. or stream 100's of gigs of them.

maps with textures have what 4-10 images?

We don't do any sort of smart video memory management, so it's not like maps are going to start using 100's of images, since it would run like crap.
If we ever get that far, we'd have to change a lot of things, and would probaly start puting textures into a comprresed virtual file system ( like quake did ).

Posted: Sat Oct 15, 2005 6:43 pm
by AlliedArmour
Ok, but my friend on dialup only has 2.0.2 and that doesn't seem to caache the textures.

Posted: Sat Oct 15, 2005 6:48 pm
by JeffM
that was a bug, I fixed it right after L4m3r and SportChick told me about it durring dinner at Gladstones,

from the changelog
* Fix texture cache on windows. - Jeff Myers
have him upgrade.

a file format change is not the answer to fix a simple bug :)

Posted: Sat Oct 15, 2005 6:49 pm
by AlliedArmour
Lol! So, is 2.0.4 the fixed version?

Posted: Sat Oct 15, 2005 6:50 pm
by trepan
yup, 2.0.4 has the fix.
(windows specific bug)

Posted: Sat Oct 15, 2005 6:52 pm
by Saturos
If he has dialup he should stay away from online-games... it's his problem. In my opinion.

Posted: Sat Oct 15, 2005 6:52 pm
by AlliedArmour
trepan:
Thanx, that should make it easier for him.

Saturos:
Most of the time his lag isn't bad.

Posted: Sat Oct 15, 2005 6:56 pm
by JeffM
dialup lag is allways bad, it's base latency is at least 100ms, compared to DSL where it is usualy under 5ms to the gateway.

Posted: Sat Oct 15, 2005 7:01 pm
by AlliedArmour
I know, whenever I do lagstats for myself it's nice seeing the teeny numbers. But I mean that most of the time he's playable.

Posted: Sun Oct 16, 2005 6:35 am
by L4m3r
JeffM2501 wrote:that was a bug, I fixed it right after L4m3r and SportChick told me about it durring dinner at Gladstones,

from the changelog
* Fix texture cache on windows. - Jeff Myers
have him upgrade.

a file format change is not the answer to fix a simple bug :)
Ah, yes, I noticed... thank you! :D It's so much nicer to join servers with downloaded textures now.

Anyway, Alliedarmour, I think your cause is pretty much lost. It's not like the minimal filesize increase is affecting gameplay- a few extra seconds for a one-time download won't kill ya. :p

Posted: Fri Oct 21, 2005 11:36 am
by Jo-W
.GIF wrote: The Unisys patent expired on 20 June 2003 in the USA, in Europe it expired on 18 June 2004, in Japan patent expired on 20 June 2004 and in Canada it expired on 7 July 2004. The U.S. IBM patent expires 11 August 2006
Image

Posted: Fri Oct 21, 2005 11:25 pm
by The Vaxorcist
If we ever get that far, we'd have to change a lot of things, and would probaly start puting textures into a comprresed virtual file system ( like quake did ).
You mean something like this?[/url]

Posted: Sat Oct 22, 2005 1:43 am
by JeffM
yeah there are a number of VFS libs out there.