2. Algorithm to Code Background
Step 1: Drag out a text object and do
not name it.
Step 2: Create a new rule by clicking
the + button next to the text object.
Step 3: In the When menu choose
‘game starts’
Step 4: Create a new block by tapping
the + button next custom and name it
Background.
Step 5: Drag the background block
into the code area.
Step 6: Under this block pull out
‘Draw a Trail’ from the Drawing tab.
Step 7: Choose colour 6.
Step 8: Set the value to 3000 (so that
it colours the whole background).
Step 9: Pull out Change x by from the
movement tab and change the value
to 1.
3. Create a character for the
game
Step 1: Chose text object.
Step 2: Using emoji
keyboard select the 2
people emoji.
These characters are then
what the player controls
throughout the game.
Complete this process again
and create for controls for
left, right, up and down
using the appropriate
emoji's.
4. Algorithm for Control
Buttons
Step 1: Create a new rule for
the characters just created.
Step 2: Drag the when __is
tapped into the code area.
Step 3: Choose the left emoji.
So that it looks like this.
Step 4: This rule controls how
the character is moved. So
when the left button is tapped
we want to user to move along
the x axis to the left. Pull out
from the movement tab
‘Change x by __’. Then cause
we want it to move to the left
change the value to -25.
Complete this for all 4
controllers.
Right = Change x by 25
Up = Change y by 25
Down = Change y by -25
6. Algorithm to Change Size
Step 1: Click on the characters
and pull out ‘when games
starts’
Step 2: Because this action
will be paralleled to other
objects a block will be created.
Choose the + button next to
custom, called it Size.
Step 3: Pull out Set Size from
the looks and sounds tab into
the size block.
Step 4: Set the value to 150%.
Do this for all of the control
buttons as well. The block
‘size’ will only need to be
pulled out as the code will be
embedded in the block.
7. Now using the same algorithm
as we did to create the
characters. Add in all the
objects pictured. The junk food
and black objects will be used
as blocks that will end the
game if the character bumps
into them. Text was used to
create a start and finish line.
The fruit is what the character
must hit to win the game.
8. Algorithm for Invisibility
This is for when the character
bumps into the objects or junk
food so that they become invisible.
Since it affects the character all the
rules will have to made to the
character
Step 1: Add new rule.
Step 2: Choose When __ bumps
___. Add the character to the first
bubble and then a object or junk to
the second.
Step 3: Because this will be
paralleled onto all the object we
will create a block. Click the +
button and call it Invisible.
Step 4: Pull out from the Looks &
Sound tab ‘Set Invisibility.’
Step 5: Set the value to 100 so that
the character will become
completely invisible.
Complete this for every one.
9. Algorithm for Winning
When the character bumps the
fruit the player wins.
Therefore, we need to code it
that YOU WIN!!! Comes up
when the character bumps it.
Step 1: Add a new rule to the
character.
Step 2: Choose ‘When ___
bumps ___’. The add the
character to the first bubble
and the fruit to the second.
Step 3: Pull out ‘set text to’
from the Looks & Sounds tab.
Then change the text to – YOU
WIN!!!
Step 4: Change the colour to
number 8 (Red).
10. Algorithm to Move the Junk Food
Step 1: Choose When the game starts.
Then create a block called Falling.
Step 2: Pull out a set size into the block
and change the value to 250.
Step 3: Pull out a repeat forever tab under
the set size one, as we want this action on
loop continuously.
Step 4: Pull out the move forward tab
(this is so that the junk moves side to
side). Set the value to -900 (this makes it
go to the left first and so that it cross the
whole screen).
Step 5: Under this pull out flip from the
movement tab. So that the object flips and
repeats this the opposite way.
Then repeat this on both the fries and cake
emoji. The block will have the code
embedded so all the steps won’t need to
be repeated.
11. Algorithm for Spinning Junk Food
Step 1: Create a new rule for the
chocolate bar.
Step 2: Choose when the game starts.
Step 3: Create a new block called
custom.
Step 4: Pull out change size from the
looks & sounds tab. Set the value to
200.
Step 5: Pull out a repeat forever from
the control flow tab this will put the
action on loop.
Step 6: Pull out a set speed from the
movement tab into repeat forever tab,
set the value to 99999999.
Step 7: Now pull out turn from the
movement tab and set it to 99999999.
Create a rule for the donut and use the
spin block again.
12. This is now the game
ready to be played and
tested for any faults or
for improvements,
which could be made.