Anonymous user
Snakes Pygame: Difference between revisions
→3. Give the game a better background
imported>Jesstess |
imported>Jesstess |
||
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>.
Test your changes by re-running the game and observing that your custom background is used.
=== 4. Set a key repeat speed ===
|