POV-Ray : Newsgroups : povray.windows : Single BMP, perhaps you all misunderstood my question : Re: Single BMP, perhaps you all misunderstood my question Server Time
28 Jul 2024 14:22:39 EDT (-0400)
  Re: Single BMP, perhaps you all misunderstood my question  
From: Remco de Korte
Date: 7 Sep 1999 20:01:07
Message: <37D5A864.37261F22@xs4all.nl>
Jon A. Cruz wrote:
> 
> Remco de Korte wrote:
> 
> > Jon A. Cruz wrote:
> > >
> > > 2) BMP for a game? I'd really suggest trying to stay away from BMP if at
> > > all possible. Store things as PNG and just convert to BITMAP as you read
> > > in.
> >
> > Again: why? What would be the advantage of PNG over BMP? It loads much slower.
> > >
> 
> "It loads much slower". That sounds like a start at premature optimization, which
> is the root of all evil. :-)
> 
> How much is "much slower". Tests should be made. I'm guessing on the order of
> perhaps a second at the extreme. Depends on your system. Disk speed is going to be
> a bottleneck anyway, and modern processors get quite fast. The main point would be
> to test it in context and see how it works overall.
> 

I agree about that. The only thing I can see about it is that my experience with
the different filetypes is that BMPs are read/written immediately while PNGs
tend to take some time. Try to do a batch conversion with 100 images. 

> Another thing to consider is when will this apply?  Usually this slight slowdown
> would occur once at the begining of the program or level. While a splash screen is
> being displayed. Balance that with having the equivalent of keeping all your
> images ZIPped on disk the entire time the user has the game installed but is not
> playing it.
> 
A splashscreen would indeed typically be a large image which doesn't have to
load extremely fast, so PNG would do fine. Since this is about a series of
images I was thinking more about sprites, where speed is more of an issue.

> Also by taking that hit on speed at one point during startup you also buy the
> addition of transparency by color or by alpha channel, etc.

With BMPs you can use transparence by simply declaring a transparent color, as
in GIFs.
> 
> Anothing thing that had been mentioned was RLE BMP files. Problem is that RLE
> compression really sucks for most things (that's my professional opinion from
> having worked with RLE a lot :-)  Also, using it will make the BMP's incompatible
> with a lot of programs. But at least it's not quite as bad as "right-side-up"
> BMP files.

Yes, RLE is bad. I was trying to keep it at BMPs, but I might as well have
mentioned TGA, PCX (used quite frequently in older games at least) or GIF
(same). It depends on the colordepth you want to use.
> 

It looks as though I'm trying to prove PNG is a useless format which is not the
case. 
It's just that when someone asks a simple question about how to manipulate some
BMPs someone starts telling he shouldn't use BMPs at all, instead of giving a
simple answer. I don't think that is very helpful, I think it is more
something-I-can't-find-the-right-english-word-for.

Kind regards,

Remco


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.