← All stepsBobgame: make a Python game

Step 6 of 12

Write settings.py

Open bobgame/settings.py and type this in

WIDTH = 800
HEIGHT = 600
FPS = 60
BG_COLOR = (30, 32, 38)

BOB_RADIUS = 20
BOB_SPEED = 250  # pixels per second
SKIN_COLOR = (233, 189, 150)
HAIR_COLOR = (70, 45, 25)
ARROW_COLOR = (240, 80, 60)

Each line is a variable: a name with a value stored in it, like a labelled box. We write the names in CAPITAL LETTERS because they are settings that never change while the game runs.

Try changing a colour later and see what happens. Pick colours with any "RGB colour picker" on the web.