[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Dirty Rectangle Processing
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Dirty Rectangle Processing
- From: "Lenard Lindstrom" <len-l@xxxxxxxxx>
- Date: Sun, 30 Apr 2006 21:53:34 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Mon, 01 May 2006 00:54:20 -0400
- In-reply-to: <445474E7.5060000@comcast.net>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On 30 Apr 2006 at 1:27, Kamilche wrote:
> I worked up a small example to illustrate the dirtyrect
> processing method I mentioned earlier.
> If you can make this faster, post your results here!
> Note that all sprites have an alpha channel that must be maintained.
>
One clue to boost performance is to understance that attribute lookup
is expensive. For instance, instead of having a loop that iterates
through sprites and calls their Draw methods, keep a list of bound
Draw methods and iterate through that.
Lenard Lindstrom
<len-l@xxxxxxxxx>