Finish your game plan (Google drive – classroom)
Decomposition means breaking a problem or situation down into simple pieces. When we are programming, we need to break the game down into simple bits that we program one at a time.
Start with one part of your plan, eg how the main character moves.
Break it down:
Animation, eg walking
Draw two or more costumes
Example walking animation
Make them swap all of the time when the greem flag is pressed.
Controls
Arrow keys
Left – change x by -5
Right – change x by 5
Up – change y by 5
Down- change y by -5
Point int the right direction
Left – point in direction – left
Right – point in direction – right
Rotation style: Left-right
Now choose another element of your plan to work on
Break it down…
Think…
We are going to plan and create a Greek themed game using Scratch.
Think about some of the stories you have learned about – Greek gods or heroes.
What stories could you make a game about?
Games could include
Action – running, jumping, fighting, climbing, flying
Questions
Choices
Mazes
Characters (sprites)
Animated (costumes)
Variables – lives, strength
Controls
Main character
Other characters
Other sprites
Screens (Backgrounds)
Title
Instructions
Level 1
More levels
Tasks
Go to Google classroom to find the planning sheet
Start filling it in
Include sketches of characters using drawings
Go to Scratch to remind yourself of how it works
Comment any “How do I …?” questions on Google Classroom
LF1 Finding work
Log into j2e – my files
Click on your scratch project
Sign in: stm-ab15
LF2 Movement controls
Scratch cat script
Make Scratch move up, down, left, right when you press the arrow keys:
Events – when up arrow pressed…
Up = change y by 5 ; Down = change y by -5
Test it out by trying to get past the Egyptian god!
LF3 Choosing coordinates
Look at the Egyptian God script – can you work out how it works?
RH-click on the Egyptian god and duplicate to get two more – one for each level
Change the x y numbers so they patrol left and right
TIP
move it to where you want it
select motion blocks (they will have the correct numbers for x and y)
Test the game – make sure it is just possible to get past by going into the tunnels
LF 4 Use drawing tools
Stage – Backdrops
RH click to duplicate (If RH click doesnt work Shift-click)
Edit the second backdrop to make a new level
LF5 Makes sprites interact
Scratch script
Add blocks so that, when Scratch touches the door, the background changes
Clue: forever, if, touching baddie, next background
Make a new set of blocks so that, when Scratch touches a baddie, it returns to the start position
Clue: forever, if, touching baddie, got to…
How can we make Scratch only move when it is not touching the walls?