[SDL] background / palette tricks
David Olofson
david at olofson.net
Wed Nov 7 04:36:22 PST 2007
On Wednesday 07 November 2007, neil at cloudsprinter.com wrote:
[...]
> this is an issue that can only be decided by playing around alot.. i
> dont want something to distracting from the gameplay, but i dont
> want something completley static and dull.. this is why perhaps just
> a simple slow pallete changing effect, so things are moving but not
> so in your face.
I see. Well, I think I'd try the "double buffered procedural texture"
approach first. It's pretty easy to get going, and it's the most
efficient way of rendering "free form" procedural effects at low
frame rates.
As to palette animation, I wouldn't go there; not these days...
Indeed; it's easy to do with SDL (create an indexed 8 bpp surface and
mess with the palette), but it's rather expensive to render, as the
blitter has to convert pixel by pixel, looking colors up in the
palette, converting them to the display pixel format. A hardware
implementation could be extremely fast, but I don't know if any SDL
backends support this, or if that feature is actually accelerated on
your average video card. Either way, of the widely used backends it's
pretty much only DirectX that offers any h/w acceleration at all, so
you pretty much have to make things work without acceleration anyway.
//David Olofson - Programmer, Composer, Open Source Advocate
.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'
More information about the SDL
mailing list