For some reason, my enemy objects start clumping together in one bar even though they have an acceleration added to them. They are supposed to fall and then disappear but they don't. P.S: I was using lists for the Rect part. I just switched the list to a Rect and it broke. Code:
import pygame, sys, random
pygame.init()
SCREEN_RES = sw, sh = 500, 500
SCREEN = pygame.display.set_mode(SCREEN_RES)
GAME_STATE = True
BACKGROUND = (255, 255, 255)
ENTITIES = []
while GAME_STATE:
SCREEN.fill(BACKGROUND)
for i in pygame.event.get():
if i.type == pygame.QUIT:
sys.exit()
ENTITY_RECT = pygame.Rect(random.randint(0, 475), -25, 25, 25)
ENTITIES.append(ENTITY_RECT)
for i in ENTITIES:
pygame.draw.rect(SCREEN, (0), i)
if i.y != 525:
i.y += 0.2
else:
ENTITIES.remove(i)
pygame.display.flip()