Answers for "pygame windows"

7

how to create a pygame window

import pygame
pygame.init()
back = (192,192,192)
gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption('A bit Racey')
gameDisplay.fill(back)
clock = pygame.time.Clock()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    pygame.display.update()
    clock.tick(60)   
pygame.quit()
quit()
Posted by: Guest on October-09-2020
2

how to make a pygame window

import pygame 
pygame.init()

"""this is how to make a pygame window, the 500,500 is the size of the window
btw(it is your choice what the size is ) """

var = pygame.display.set_mode((500,500))

"""this is how to change the title of the window"""
pygame.display.set_caption('example')
Posted by: Guest on July-04-2020
0

pygame download

py -m pygame.examples.aliens
Posted by: Guest on January-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language