factory pattern if you leave out the pygame display flip()no shape is displayed this is because pygame draws the screen on memory buffer and then flips the whole image onto the active screen (which is what you seeevery time you update the displayyou have to call pygame display flip(to have the changes show up on the screen experiment with drawing different rectangles in many colors on screen the game loop the most basic concept in game programming is called the game loop the idea works like thisthe game checks for some input from the userwho does some calculation to update the state of the gameand then gives some feedback to the player in our casewe will just be updating what the player sees on the screenbut you could include sound or haptic feedback this happens over and over until the player quits every time the screen is updatedwe run the pygame display flip(function to show the updated display to the player the basic structure for game will then be as followssome initialization occurssuch as setting up the window and initial position and color of the elements on the screen while the user does not quit the gamerun the game loop when the user quitsterminate the window in codeit could look something like thisgraphic_base py import pygame window_dimensions screen pygame display set_mode(window_dimensionsplayer_quits false while not player_quitsfor event in pygame event get()if event type =pygame quitplayer_quits true pygame display flip(