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

Re: [pygame] Sprites



Thanks.
Brian

Glen Wheeler <adsl5lcq@xxxxxxxxxx> wrote:
From: "Peter Shinners"
> On Sat, 2006-08-05 at 01:03 +0100, Brain Murphy wrote:
>> Is it possible to change the colour of a sprite starting at one end
>> and finishing at the other? so if I have a pipe, and want the pipe to
>> change to green or red or whatever, could I have it start the change
>> at one end and finish at another?
>> Is there a tutorial were this type of thing is posted?
>> I am really interested in this but am stuck at no were.
>
> [..]
>
> If possible, do this at init time, and keep a range of images with the
> colors you want. Bit if the images are large it could quickly eat up
> your memory.
>

This is what I would do. Take your image, perform all the manipulations
you need to beforehand, and then save these in some data structure. It adds
a bit to loading time, and some memory (not much if you are careful) but the
framerates are unreal.

>[..]

Glen



The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider.