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

Re: [pygame] Update performance



 > 
 > Would it be even faster to just have the sprite return a padded rectangle? 
 > It's bounding box plus it's maximum movement per cycle added to each side. 
 > This would take care of getting a union of it's current place and the place 
 > it was just at (5 pixels to the left).  Does that make sense?
 > 

Yes, this would work well. Note however that rect.union() is a _very_
fast function - it costs you almost nothing to call it. Calculating
the padded rect in python may take longer.

-- 
------------------------------------------------------------------------
David "Futility [D!]" Clark  | Note: all persons, living and dead, are |
 silenus@telus.net           |  purely coincidental. - Kurt Vonnegut   |

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