[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] RenderUpdates.clear() bug



Shandy Brown wrote:
I was saying earlier on IRC that "I would think RenderUpdates should be smart enough such that if a
sprite is removed from it, it clears that rectangle on clear()"

So I took a look at the code, and it looks like it INTENDS to do that,
but it doesn't work.
strange. i assume you're on the latest pygame-1.5.5 too? there was a small fix recently to RenderUpdates, but i'm not sure if its what you are experiencing.

RenderUpdates _should_ handle all the details of killing sprites for you. that's what makes it so handy. i believe if you change the order of your code a little it will work better. call "clear()" before calling "kill()" on your sprites.

still, i want to get RenderUpdates working so the ordering of calls is unimportant. i'll get to it at somepoint, but i'll be happy if someone can beat me to a patch :] it sounds to me like your option #1 would work best.

1 - add a RenderUpdates.clear() method exactly like RenderClear,
except it doesn't empty self.lostsprites


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org