def showStartScreen(): titleFont = pygame.font.Font('freesansbold.ttf', 100) titleSurf1 = titleFont.render('Wormy!', True, WHITE, DARKGREEN) titleSurf2 = titleFont.render('Wormy!', True, GREEN) degrees1 = 0 degrees2 = 0 while True: DISPLAYSURF.fill(BGCOLOR)
When the Wormy game program first begins running, the player doesn’t automatically begin playing the game. Instead, a start screen appears which tells the player what program they are running. A start screen also gives the player a chance to prepare for the game to begin (otherwise the player might not be ready and crash on their first game).
The Wormy start screen requires two Surface objects with the "Wormy!" text drawn on them. These are what the
render() method calls create on lines 3  and 4 . The text will be large: the
Font() constructor function call on line 2  creates a Font object that is 100 points in size. The first "Wormy!" text will have white text with a dark green background, and the other will have green text with a transparent background.
Line 8  begins the animation loop for the start screen. During this animation, the two pieces of text will be rotated and drawn to the display Surface object.