import pygame, sys from pygame.locals import * import random RanPos = random.randint(1,800) RanPos2 = random.randint(1,600) RanPos3 = random.randint(1,800) RanPos4 = random.randint(1,600) pygame.init() screen = pygame.display.set_mode((800,600)) background = pygame.Surface((800,600)) surface = pygame.Surface((20,20)) surface.fill((255,255,255)) surface2 = pygame.Surface((20,40)) surface2.fill((255,255,255)) while True : for event in pygame.event.get() : if event.type == QUIT: pygame.quit() sys.exit() screen.blit(surface, (RanPos,RanPos2)) screen.blit(surface2, (RanPos3,RanPos4)) pygame.display.update()