Skip to main content

layeredupdates.py

A thin extension to pygame.sprite.RenderUpdates to allow user-defined layering of sprites.


Andy Sommerville
(aksommerville)
I got tired of trying to control my sprites' relative layers with an OrderedUpdates, so I wrote this alternative. It works just like Ordered- or Render- Updates, but each sprite must have a "layer" attribute. That's an integer describing its position relative to other sprites. Lowest is drawn first. Where two sprites have the same layer, the one whose bottom is highest is drawn first.

Links

Home Page
http://aksommerville.googlepages.com/soct.html

Releases

layeredupdates.py 1.0 — 13 Sep, 2007

Pygame.org account Comments