Skip to content

Instantly share code, notes, and snippets.

@Exodus111
Created January 8, 2013 15:37
Show Gist options
  • Save Exodus111/4484734 to your computer and use it in GitHub Desktop.
Save Exodus111/4484734 to your computer and use it in GitHub Desktop.
Pygame gist for dirty sprites.
chimp = Chimp()
fist = Fist()
allsprites = pygame.sprite.LayeredDirty((chimp, fist))
allsprites.clear(screen, background)
# mainloop
rects = allsprites.draw(screen)
pygame.display.update(rects)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment