Stage 9: Tune the Difficulty
Keep building in your saved Python Arcade project.
This stage is part of the same game you started in Setup. Do the work in your own remixed Trinket — it’s the workspace on the right of this page.
Your game should have scoring, lives, a timer, and a win or lose screen.
difficulty settings and playtest notes
how designers balance challenge and fairness
a game that feels fair enough for someone else to play
What we are building
Difficulty is a design choice. A good arcade game starts easy enough to understand, then gets harder as the player improves.
Step 1 - Group your tuning values
Find your settings and make them easy to change:
CANNON_STEP = 20
LASER_SPEED = 18
MAX_LASERS = 3
ALIEN_SPAWN_CHANCE = 0.03
ALIEN_SPEED = 2
GAME_SECONDS = 60
These are your balance knobs.
Step 2 - Add a difficulty ramp
Inside the game loop, after seconds_left is calculated, add:
time_played = GAME_SECONDS - seconds_left
current_alien_speed = ALIEN_SPEED + time_played // 20
Then change alien movement to use current_alien_speed:
alien.sety(alien.ycor() - current_alien_speed)
Step 3 - Playtest with a partner
Ask someone else to play for one minute. Do not explain everything. Watch what they do.
Write down:
- Did they know how to move?
- Did they know how to shoot?
- Did the game feel too easy, too hard, or fair?
- Did they understand why they won or lost?
Step 4 - Make one balance change
Pick one thing to adjust:
- Faster or slower cannon.
- More or fewer lasers.
- Faster or slower aliens.
- More or fewer lives.
- Longer or shorter game timer.
Run the game again after the change.
Why this works
Playtesting is how game designers find problems. If the player is confused, that is not their fault. It means the game needs clearer feedback or better balance.
Test your stage
- Another person can start playing without a long explanation.
- The game gets slightly harder over time.
- Your tuning values are easy to find near the top.
- You made exactly one balance change after playtesting.
Debug checklist
- If alien speed jumps too much, use
time_played // 30instead oftime_played // 20. - If speed never changes, print or write
time_playedtemporarily and check the timer. - If the game is not fun, change one setting at a time.