I am making a very simple game where the bird (player) has to dodge the rock and if it gets hit by the rock you lose. I am trying to use pygame.sprite.collide_rect() to tell if
def checkCollision(sprite1, sprite2): col = pygame.sprite.collide_rect(sprite1, sprite2) if col == True: sys.exit()
should be
def checkCollision(self, sprite1, sprite2): col = pygame.sprite.collide_rect(sprite1, sprite2) if col == True: sys.exit()
since it's a method bound to an object.