[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Effecient way to 'darken' a surface?



Include instructions to the player to slowly squint his eyes until you say stop.

Failing that, one quick optimization you might be able to get away with is not altering the color every step, but perhaps by 8 or more steps at a time.  I'm not sure if that would be not smooth enough a color transform for you, though.

Also, you make no mention if you are transforming tiles or just one large bitmap.  If you are color transforming tiles, then you could probably just alter the colors of the source tiles and then blit them, as opposed to blitting first, then altering.

Kinda hard to tell what would work for you without knowing what the overall application is.


--
Andrew Ulysses Baker
"failrate"