lundi 16 janvier 2017

Pygame Window Not Responding

I am trying to make a game in Pygame where he objective is to start the game but the start button keeps moving whenever you touch it but the window will not respond. I am not finished with the code yet because I tested it and it didn't work. Here is my code so far:

import pygame
import random
import time
pygame.init()
display = pygame.display.set_mode((800,600))
pygame.display.set_caption('BEST 3D PLATFORMER FPS GAME!')
clock = pygame.time.Clock()
pygame.display.update()
clock.tick(60)
display.fill((255,255,255))
def newposition()
    randx = random.randrange(100, 700)
    randy = random.randrange(100,500)
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pass
        if event.ty
    button = pygame.image.load('start.png')
    display.blit(button,(randx,randy))

pygame.quit()
quit()




Aucun commentaire:

Enregistrer un commentaire