Day 14: Platformer Review
Thursday, April 2nd, 2026
Work Session
Use this starter code only if your code is not working.
Create an Objective Sprite
An objective is something the player collects for points — a coin, star, gem, key, etc. Create a new sprite and draw your collectible. Keep it small (about 20-30 pixels) so it fits on a platform.
Place the Objective on a Platform
Position your objective sprite on a platform that the player will need to work to reach. It shouldn’t be easy — make the player jump across platforms to get there.
Add a Score Variable
Create a variable called score (for all sprites). Set it to 0 when the green flag is clicked.
Detect Collection
On the objective sprite, add code to detect when the player touches it. When collected, the objective should hide, and the score should increase by 1.
Reset the Player
After collecting the objective, teleport the player back to a starting position (e.g., go to x: -200 y: -100). This forces the player to navigate the platforms again.
Respawn the Objective
After a short wait, show the objective again in a new (or the same) position. The loop continues — collect, reset, collect again.
Closing
Share your game with a partner and play each other’s games. What do you like about your partner’s game? What would you change about it?
Here are two from first period.
And second period.
Standards
- MS-CS-FCP.4.2 — Utilize the design process to brainstorm, implement, test, and revise an idea.
- MS-CS-FCP.4.5 — Implement a simple algorithm in a computer program.
- MS-CS-FCP.4.6 — Develop an event driven program.
- MS-CS-FCP.4.9 — Develop a program that makes a decision based on data or user input.