Snakes Pygame: Difference between revisions
Content added Content deleted
imported>Jesstess |
imported>Jesstess |
||
Line 45: | Line 45: | ||
Use [http://www.pygame.org/docs/ref/image.html#pygame.image.load pygame.image.load] to load the background. You'll need to re-display the background on every tick of the game, just like we currently do with the solid color using <code>game_surface.fill(BACKGROUND_COLOR)</code>. |
Use [http://www.pygame.org/docs/ref/image.html#pygame.image.load pygame.image.load] to load the background. You'll need to re-display the background on every tick of the game, just like we currently do with the solid color using <code>game_surface.fill(BACKGROUND_COLOR)</code>. |
||
Test your changes by re-running the game and observing that your custom background is used. |
|||
=== 4. Set a key repeat speed === |
=== 4. Set a key repeat speed === |