Learn Scratch 3.0 Class
Code Genius Penang is proud to support students learning Scratch 3.0. Our lessons develop logical thinking, creativity, problem-solving and coding confidence through engaging projects. We also assist students with school assignments, explain programming concepts clearly, and provide step-by-step guidance to help every learner understand coding and achieve better results. The course provided below is meant for Begineer Level Up to Intermediate. Each example are specially curated and broken down to pieces to help students to code the entire project. Lets get started with “How create a simple Football Game”
Learning Domains
The project integrates computational thinking with mathematics, game design and purposeful debugging. Each domain is revisited at increasing depth.
Algorithms & Sequencing
Arrange event, motion, sensing and control blocks in a logical execution order.
Events & Interaction
Respond to the green flag, keyboard arrows, mouse position and sprite contact.
Control & Decisions
Use forever, repeat until, if, ifโelse, wait and stop blocks to control game flow.
Coordinates & Angles
Connect x/y position, direction and angle input to a ballโs movement and trajectory.
Data & Operators
Store player input in variables and apply comparisons, arithmetic and random values.
Testing & Debugging
Predict, test, identify faults and refine scripts across successive project versions.
Game Design
Combine sprites, goals, feedback, challenge and reset behaviour into a playable loop.
Communication
Explain code choices, demonstrate the game and evaluate whether outcomes are fair.
13 Lesson Cards
Each card states the specific development made in that exercise and the concept students should learn from it.
Exercise-by-Exercise Learning Journey
Each card summarises what students build and the main programming concept introduced in that exercise.
Build the Core Interaction
Create the Cat and Ball, control the Cat with four arrow keys, and make the Ball respond when the two sprites touch.
Events, forever loops, conditions, keyboard input and collision sensing.
Test and Refine Interaction
Rebuild and test the initial sprite interaction while checking movement values, placement and reliable collision behaviour.
Testing, debugging and understanding simultaneous sprite scripts.
Make the Ball Follow the Mouse
Change the Ball's response so that it moves to the mouse pointer whenever it touches the Cat.
Mouse input, dynamic positioning and condition-driven movement.
Collect and Store an Angle
Ask the player to enter an angle, store the answer in ballAngle, display it and reset the value.
User input, the answer reporter and variables as temporary storage.
Turn Input into Motion
Extend the angle-input interaction by making the Ball move 100 steps after receiving the player's answer.
Sequencing instructions and connecting input with a visible action.
Map Angle to Coordinates
Use an input from -100 to 100 as the Ball's y-coordinate while sending it towards a fixed x-coordinate.
Cartesian coordinates, signed numbers and input-controlled trajectory.
Add a Goal and Score Detection
Add a goal-post sprite and make the Ball announce a goal whenever it touches the target area.
Success conditions, sprite layering, target sensing and feedback.
Introduce a Moving Goalkeeper
Add Avery as a goalkeeper and make the sprite glide continuously between random vertical positions.
Random values, continuous movement and creating game difficulty.
Decide Goal or Miss
Move the Ball towards the target and announce either a goal or a missed shot based on sprite contact.
Repeat-until loops, comparisons, collision tests and game outcomes.
Polish Goalkeeper Movement
Improve the goalkeeper's random vertical glide while maintaining the complete goal and miss rules.
Concurrent processes, timing, play-testing and game balance.
Add Defensive Collision Logic
Give the goalkeeper specific Ball-contact behaviour and controlled vertical movement towards a target position.
Nested controls, defensive collision and coordinate-based movement.
Create Directional Goalkeeping AI
Generate a random direction and use if-else logic to make the goalkeeper move above or below its current position.
Random variables, branching, comparisons and arithmetic operators.
Complete the Playable Game Loop
Add a kick animation, timing delays and position resets so that the penalty game can be played repeatedly.
Animation, state reset, integration, final testing and replayability.
Teaching Sequence, Main Focus and Expected Outcome
The table is horizontally scrollable on tablets and converts into labelled stacked rows on small phones.
| Exercise | Teaching sequence | Main focus | Suggested teacher activity | Expected student outcome |
|---|---|---|---|---|
| 1 | Foundation Set up sprites โ code arrow movement โ sense contact โ give feedback. | Events, loops, conditions and keyboard control. | Model one arrow-key condition, then ask learners to construct the other three. | Cat moves in four directions and Ball responds when touched. |
| 2 | Foundation Predict โ run โ observe โ locate a fault โ adjust โ retest. | Testing, debugging and scripts running in parallel. | Introduce a deliberate wrong movement value and let students diagnose it. | Student can explain and verify the interaction independently. |
| 3 | Interaction Detect Cat contact โ target mouse pointer โ compare with spoken feedback. | Mouse input and dynamic positioning. | Ask students to predict where the Ball goes before running the script. | Ball relocates to the live mouse position when triggered. |
| 4 | Data Ask question โ read answer โ store variable โ show value โ reset. | Input and variable lifecycle. | Use a trace table for the value of ballAngle at each block. | Student stores, displays and resets a user-entered angle. |
| 5 | Data to action Trigger interaction โ obtain input โ perform 100-step movement. | Sequence and causeโeffect. | Let students reorder two blocks and explain the behavioural change. | A successful interaction produces a controlled Ball movement. |
| 6 | Mathematics Define input range โ set target x โ map answer to y โ test values. | Coordinates, signed numbers and trajectory. | Test โ100, 0 and 100; sketch the three expected paths first. | Student predicts and controls the Ballโs finishing position. |
| 7 | Game rules Add goal โ set sprite layer โ sense goal contact โ report success. | Success conditions and visual hierarchy. | Discuss why touching a target is a useful Boolean game condition. | The game reliably recognises and announces a goal. |
| 8 | Challenge Add goalkeeper โ choose random y โ glide โ repeat continuously. | Randomness, loops and moving obstacles. | Compare narrow and wide random ranges and evaluate difficulty. | Goalkeeper moves unpredictably and increases challenge. |
| 9 | Outcomes Move to target โ test goalkeeper contact โ test goal contact โ stop. | Repeat-until, comparison and competing results. | Draw the decision flow and test one goal and one save. | Each shot ends with a clear goal or missed outcome. |
| 10 | Refinement Run full game โ adjust glide timing/range โ replay โ evaluate fairness. | Concurrent processes and game balancing. | Invite pairs to record three timing values and select the fairest. | Student tunes motion parameters based on play-test evidence. |
| 11 | Defence logic Set x โ move y โ test Ball contact โ stop or continue to target. | Nested control and defensive collision. | Step through the goalkeeper script block by block using a trace. | Goalkeeper reacts consistently when it intercepts the Ball. |
| 12 | Autonomy Generate direction โ compare with zero โ choose branch โ glide y ยฑ 20. | Random variables, ifโelse and arithmetic operators. | Have students explain the positive and negative branches in words. | Student builds and explains simple autonomous goalkeeper movement. |
| 13 | Integration Animate kick โ resolve shot โ wait โ reset positions โ replay and review. | State reset, timing, integration and final debugging. | Use a final checklist: controls, kick, defence, result, reset and replay. | A complete, repeatable penalty-kick game is demonstrated and explained. |