[SDL] Downsizing resources

necronology at cox.net necronology at cox.net
Tue Nov 6 16:20:43 PST 2007


My opinion is that 110 MB is not at all an issue in a game but like was suggested you can load on demand and drop things you won't use again. I assume unlimited memory and cpu power until it's a complete game unless it runs poorly on my developement computer. After that I test it on a couple of minimum tartget spec computers and tweek from there if needed. 


---- Jeremy <jswigart at gmail.com> wrote: 
> Use texture compression if SDL allows you to. That's the only option other
> than downscaling, reducing how much you use, or load on demand, all of which
> have downsides and may not be an option depending on what you do.
> 
> On 11/5/07, Alberto Luaces <aluaces at udc.es> wrote:
> >
> > El Monday 05 November 2007 17:18:04 Miguel Pragier escribió:
> > > Alberto Luaces <aluaces <at> udc.es> writes:
> > > > El Monday 05 November 2007 13:42:52 Miguel Pragier escribió:
> > > > > At present, I work on 32 bits PNG images.
> > > > >
> > > > > The original 32 MB of PNG files, takes 110 MBs RAM, when the game
> > > > > runs..
> > > > >
> > > > > Would anyone know a way to downsize this consume?
> > > >
> > > > Load only an image when you need it, delete it as soon as you aren't
> > > > using it.
> > >
> > > Ok.
> > >
> > > In my games I have a lot of bonus ( jackPot-like ) animations.
> > > When I load my images just before the use, we experience a small delay.
> > > I read something about to shrink images resolution to 24 bits. Is it
> > > possible? Can I convert my images from 32 bits to 24 and keep the
> > quality?
> > > My plattaform is Windows, and the desktop is ~32 bit colors~.
> >
> > You can develop some more complex strategies, as loading the image for the
> > first time and not freeing its memory until you are sure it would not be
> > needed for a long time, what one would call a "cache". Maybe you have to
> > spend a little bit of memory for the possibly used graphics, but it
> > shouldn't
> > be necessary to reach that 110 megabyte size. You will have to think about
> > the trade off between the loading delay and the amount of RAM used and
> > adjust
> > the program accordingly.
> >
> > If your display is 32 bit, you win nothing converting your graphics to 24
> > bit,
> > as you (or the driver) will eventually have to convert them again to 32
> > bit
> > at blit time, so you will experience lower performance.
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >



More information about the SDL mailing list