Racey – Initial Setup

Create a Project Folder

Add a new folder where you save your school work and call in Racey

Run VS Code, then open the Racey folder you created.

Now create a new file and call it racey.py

Add the following code to your code file

import pygame
##########################################################
##                                                      ##
##      Replace this with Code from Step FIVE-A         ##
##                                                      ##
##########################################################
 
pygame.init()
 
display_width = 800
display_height = 600
 
gameDisplay = pygame.display.set_mode((display_width,display_height))
 
pygame.display.set_caption('Racey')
 
##########################################################
##                                                      ##
##      Replace this with Code from Step TWO-A          ##
##                                                      ##
##########################################################
 
clock = pygame.time.Clock()
 
crashed = False
 
##########################################################
##                                                      ##
##      Replace this with Code from Step TWO-B          ##
##                                                      ##
##########################################################
 
while not crashed:
 
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            crashed = True
 
##########################################################
##                                                      ##
##      Replace this with Code from Step TWO-C          ##
##                                                      ##
##########################################################
 
    pygame.display.update()
    clock.tick(60)

Run your code

You should see a window like the one below with a title of Racey