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

Re: [pygame] Sprites



I will give all of these ideas a try,
Thanky you, every one.
Brian

Alex Holkner <aholkner@xxxxxxxxxxxxxx> wrote:
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.
> Brian

You could probably get away with using an 8-bit image for the pipe, with
a carefully selected gradient of palette indexes running from left to
right. You can then modify the image palette at runtime fairly quickly
and convert the surface to display format before blitting.

Alex.


All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine