[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Sprites
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Sprites
- From: Brain Murphy <brianomorchoe@xxxxxxxxxxx>
- Date: Sat, 5 Aug 2006 10:21:54 +0100 (BST)
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 05 Aug 2006 05:22:02 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TopBzvnP+EeBiWQ4YAqVXI91Hfr6ltTUqdcXo9ZuVCaoIXd8ixqR0bIL4sn1dsOxdpe2gm8jfwt96/yBdtHfEzKLsC9rupZb4Bh0gObymgyG9vssmGDDDVsEHq1Cawe/ujyQ7jGKv+1YDTa2rFOtedM5JW1fbmbN9lFZbPUthAw= ;
- In-reply-to: <02bb01c6b858$a7b704a0$0201a8c0@grropteron>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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.