Your First Game
You have a cat that chases an apple. Somewhere between that and a game you'd actually play is a set of decisions: what's the goal, what's in the way, and how do you know when you've won. This project is those decisions, made by you, and built over the next week and a half. On the last day, the class plays them.
Overview
This is the second project of the unit. You'll design a single-screen game in your notebook, build it in Scratch with the game loop from the last lab, and add the one thing every game needs that you haven't learned yet: a variable to keep score. I'll teach variables partway through the project, and once I have, your game is required to use one.
Builds on: Forever Loops and WASD — your player's controls and your collisions come straight from Apple Chase. Starting from a copy of that project is allowed and smart.
You've got it when…
- Your game plan is in your notebook, and the game you built matches it.
- A player can pick up the keyboard, read your instructions, and play without you explaining anything.
- The game has a goal, at least one way to win or lose, and a variable the player can see on the stage.
- The project is shared and the link is turned in.
Collaboration & AI
Work: On your own. Play-testing each other's games is encouraged, and required on the days I say so. Building someone else's game for them is not.
AI — AIAS Level 1, No AI: Every block in this game should be one you can explain. What the levels mean.
Keep It Small
Before the requirements, a warning that comes from watching a lot of first games get built. Pick a single-screen game. One stage, one player, one goal. Think Pong, Frogger, Space Invaders, or whack-a-mole, not Minecraft. The games below are all reachable with what you know plus variables:
| Game idea | The player… | Collisions with… | You win or lose when… |
|---|---|---|---|
| Collector | drives a sprite with WASD | items that teleport when touched | the score reaches a number, or a timer runs out |
| Dodger | steers left and right | falling objects | lives run out, or you survive 30 seconds |
| Maze | moves through drawn walls | the walls (send you back) and the exit | you touch the exit |
| Catcher | slides a basket along the bottom | things dropped from the top | you miss three |
| Whack-a-mole | clicks sprites that pop up | the mouse pointer | the timer runs out |
A tiny game that works beats a big game that doesn't. You'll have time to add things once it works. You will not have time to make a broken big game work.
Your Mission
Build a single-screen game in Scratch that meets all of these requirements:
| Requirement | What it means |
|---|---|
| Keyboard or mouse control inside a forever loop | The player controls something, smoothly, the way the cat moved. |
| At least one collision that changes the game | Touching something scores, hurts, teleports, or ends the game. |
| A goal the player can understand | Collect, survive, escape, or reach something. |
| A way to win or lose | The game announces it (a say block, a backdrop, a sound) and stops. |
| At least one variable shown on the stage | Score, lives, or a timer. Taught in the Keeping Score With Variables lab; required once it has been. |
| Everything resets on the green flag | Positions, score, and lives all start over on every click. |
| Instructions on the project page | Which keys, what the goal is, in two or three sentences. |
Plan It First
-
Start a notebook entry titled Scratch Game.
-
Copy the plan below into your entry and fill in every row. Short answers are fine; blank rows are not.
Your game Title The goal (one sentence) The player controls… Keys or mouse? Sprites I need When the player touches _, ___ happens You win when… You lose when… Variable I'll show on the stage (fill in after the variables lesson) -
Sketch the screen below the table: where the player starts, where things appear, where the score goes. A rough drawing photographed and pasted into the entry is fine.
-
Show me the plan before you start building. If it has more than one screen in it, we'll talk.
Build It
Build in this order, and test after every step. Each of these is roughly one day; if you're ahead, good, and if you're behind, you know it early instead of on the last day.
| Day | Build this | You know it works when… |
|---|---|---|
| 1 | The plan, approved. Player sprite and controls in a forever loop. | You can drive the player around the stage. |
| 2 | The thing to collect, dodge, or reach. Its collision. | Touching it does what your plan says. |
| 3 | Variables lesson. Add your variable and show it on the stage. | The number changes when it should. |
| 4 | The win or lose condition. The game stops and says so. | You can win. You can lose. |
| 5 | Reset. Click the green flag five times in a row. | Every game starts clean. |
| 6 | A neighbor plays it without your help. Fix what confused them. | They finish a game and know how they did. |
| 7 | Instructions on the project page, share, and turn in the link. | I open your link and can play. |
Start from Apple Chase
Open Apple Chase in My Stuff, click File ▸ Save as a copy, and
rename the copy with your game's title. The controls and the first
collision are already done.
Stuck? Open for the debugging checklist.
- Is the script in the right sprite?
- Is the block you expect to repeat inside the forever loop's mouth?
- Does the touching dropdown name the right sprite?
- Is your variable set to its starting value under the green flag, or only changed?
- Click the stop sign, then the green flag. Does the game start clean?
Blocks worth knowing for a game:
| Block | Category | Good for |
|---|---|---|
| go to random position | Motion | Respawning an item somewhere new. |
| if on edge, bounce | Motion | Keeping things on the stage. |
| pick random 1 to 10 | Operators | Random speeds, positions, and timing. |
| wait 1 seconds | Control | Pacing spawns; slowing a countdown. |
| repeat until | Control | A loop that ends when something happens. |
| stop all | Control | Ending the game. |
| switch backdrop to | Looks | A win screen or a lose screen. |
| start sound | Sound | A point scored; a life lost. |
Share It
-
Click the orange Share button at the top of the editor.
-
On the project page, write two or three sentences of Instructions: which keys, what the goal is, how you win. Click Save.
-
Copy the project's web address and paste it into the assignment in Google Classroom.
Arcade Day
On the last day, every game goes on the projector and a classmate plays it while you watch. You don't drive and you don't coach; the instructions on the project page have to do that job. Afterward, we'll play each other's games at our own desks for the rest of the period.
Turn It In
- The link to your shared Scratch game, submitted in Google Classroom.
- Your Scratch Game notebook entry with the completed plan table and your screen sketch.
How It's Graded
This lab is worth up to 4 points. One score covers everything you turn in.
| Score | What it looks like |
|---|---|
| 4 — Excellent | A classmate can open your link, read the instructions, and play to a win or a loss with no help; controls run in a forever loop, at least one collision drives the game, a variable on the stage tracks score, lives, or time, and the green flag resets everything; and the notebook plan was approved first and matches the game you shipped. |
| 3 — Above Average | A playable game with a slip or two — a variable that doesn't reset, a win that's announced but doesn't stop the game, or instructions that leave out a key. |
| 2 — Average | The player moves and collisions happen, but there's no way to win or lose, no variable, or the game needs you standing next to it to explain. |
| 1 — Below Average | Apple Chase with a new name, or a plan with no working game behind it. |
| 0 — Failing | No shared link turned in. |