Skip to content

Instantly share code, notes, and snippets.

@Exodus111
Created January 8, 2013 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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