Hi decided to try doing the collision just using rect for now this is my code for it . It runs but does not detect a hit when the two sprites collide . Any help would be much appreciated .
I have edited this post to include the mask code . If I replace .image with _rect or .mask
the code will not run . Help needed please .
Quote:image1=pygame.sprite.Sprite()
image1.image = pygame.image.load("picy.png").convert_alpha()
image2 = pygame.sprite.Sprite()
image2.image = pygame.image.load("picy1.png").convert_alpha()
title = pygame.image.load("aba2 title.png")
image1_rect = image1.image.get_rect(topleft=(x,y))
image2_rect = image2.image.get_rect(topleft=(x1,y1))
image1.mask = pygame.mask.from_surface(image1.image)
image2.mask = pygame.mask.from_surface(image2.image)
screen.blit(title,(0,0))
screen.blit(image2.image,(x1,y1))
screen.blit(image1.image,(x,y))
pygame.display.update()
I have edited this post to include the mask code . If I replace .image with _rect or .mask
the code will not run . Help needed please .