CS50 in Arabic Session 1 Project (Option 2): Sketchnote Catch (High-Speed Ideas)
Welcome to your first project challenge! In this option, you’ll be putting your reflexes to the test by building a fast-paced catching game. You are a creative mind trying to capture every "Sketchnote" and idea falling from the sky, and your goal is simple: catch as many as possible before they hit the ground as the speed keeps increasing.
This project will help you master horizontal movement, falling physics, and how to use variables to scale difficulty. Let’s get coding!
Resource:
If you need help finding specific blocks or understanding exactly what each one does, check out Scratch Reference: This is an interactive tool built specifically to help you search, filter, and understand every single Scratch block. If you’re ever unsure which block to use for your logic, this is your best friend!
Follow these steps to build your game. Remember: the goal isn't just to finish, but to understand how the logic works!
Step 1: Choose Your Characters (Sprites)
In Scratch, every object is a "Sprite." Open the Sprite Library and pick your cast:
- The Collector: This is the character you control to catch the ideas.
- Suggestions: A bowl, a basket, or a person with their hands up.
- The Sketchnote: This is the "Idea" falling from the sky.
- Suggestions: A lightbulb, a star, or a gold coin.
- The Backdrop: A clean workspace for your ideas.
- Suggestions: "Boardwalk" or a custom dark minimalist background to make the gold ideas pop.
Step 2: Programming the Collector (Horizontal Movement)
The Collector only needs to move left and right along the bottom of the screen.
Blocks you will need:
When Green Flag ClickedForeverloopSet x to [mouse x]ORChange x by [ ]with arrow keys.
The Logic:
- Option A (Easy): Use the
Set x to [mouse x]block inside aforeverloop. The basket will now follow your mouse cursor perfectly. - Option B (Keyboard): Use
if <key [right/left] pressed?>tochange xby10or-10.
Step 3: Programming the Falling Ideas
The "Ideas" need to fall from the sky and reset once they are caught or hit the ground.
Blocks you will need:
Go to random positionSet y to [180](The very top)Change y by [Speed](The falling movement)If <y position < -170> then(Checking if it hit the floor)
The Logic:
- When the game starts, go to a random position at the top (
y = 180). - Inside a
foreverloop,change yby a variable calledSpeed. - If the sprite hits the bottom (
y < -170), send it back to a random position at the top.
Step 4: The Score & The "Difficulty Warp"
This is where the game gets challenging. We will use Variables to track your score and the falling speed.
- Variables: Create two variables:
ScoreandSpeed. - Reset: Under the Green Flag,
Set Score to 0andSet Speed to -5. - Catching: Add a script:
If <touching [Collector]?>, thenchange Score by 1, play a sound, and send the idea back to the top. - Scaling Difficulty: To make it harder, add a separate script:
Forever->Wait 5 seconds->Change Speed by -1.- Note: Since the item is falling down, making the number more negative (-5, -6, -7...) makes it fall faster!
Step 5: Make it Your Own (Creative Choices)
To make your game unique, try adding one of the following features:
- Visual Polish: Use a bright gold color (like #ECA400) for your lightbulbs to make them stand out against a dark background.
- Penalty: If an idea hits the floor (
y < -170) before you catch it,change Score by -1. - Multiple Ideas: Right-click your Idea sprite and click "Duplicate." Now you have two items to catch at the same time!
Checklist for Submission
- Does the Collector move smoothly?
- Do the ideas fall from random spots at the top?
- Does the Score increase when you catch an idea?
- Does the speed increase the longer you play?
Session Recording
If you need to review any part of the explanation while working on your project, you can watch the full recording here: Watch the Session on YouTube
In this session, we covered the foundations of Computer Science, the Binary system, and how to take your first steps with Scratch.
Remember: "Programming isn't just about writing lines of code; it's about the art of solving problems." Can't wait to see what you build!
Member discussion