SlideShare a Scribd company logo
1 of 12
Started off with a blank project in the Hopscotch app for iPad.
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.
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.
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
The project screen
should now look
like this.
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.
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.
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.
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).
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.
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.
This is now the game
ready to be played and
tested for any faults or
for improvements,
which could be made.

More Related Content

What's hot

5 combining images and applying filters
5 combining images and applying filters5 combining images and applying filters
5 combining images and applying filtersMarty Sison
 
Keyboard shortcut - Phím tắt hệ điều hành windows 10
Keyboard shortcut - Phím tắt hệ điều hành windows 10Keyboard shortcut - Phím tắt hệ điều hành windows 10
Keyboard shortcut - Phím tắt hệ điều hành windows 10Sơn Đặng Thái
 
Paths, Masks And Blend Modes
Paths, Masks And Blend ModesPaths, Masks And Blend Modes
Paths, Masks And Blend ModesShan
 
Solve An Inequality Graphically
Solve An Inequality GraphicallySolve An Inequality Graphically
Solve An Inequality Graphicallyyelir92
 
Visual Basic Calculator
Visual Basic CalculatorVisual Basic Calculator
Visual Basic CalculatorSpy Seat
 
Calculator 1
Calculator 1Calculator 1
Calculator 1livecode
 
Scratch - Rock, Paper, Scissors
Scratch - Rock, Paper, ScissorsScratch - Rock, Paper, Scissors
Scratch - Rock, Paper, ScissorsSara Gibbons
 
Watercolor Painting Effect
Watercolor Painting EffectWatercolor Painting Effect
Watercolor Painting Effectshalace09
 
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIDesign a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIعبد الجليل جايا لي
 
Strawberry recolortut
Strawberry recolortutStrawberry recolortut
Strawberry recolortutbalermm
 
Calculator 2
Calculator 2Calculator 2
Calculator 2livecode
 

What's hot (12)

5 combining images and applying filters
5 combining images and applying filters5 combining images and applying filters
5 combining images and applying filters
 
Keyboard shortcut - Phím tắt hệ điều hành windows 10
Keyboard shortcut - Phím tắt hệ điều hành windows 10Keyboard shortcut - Phím tắt hệ điều hành windows 10
Keyboard shortcut - Phím tắt hệ điều hành windows 10
 
Paths, Masks And Blend Modes
Paths, Masks And Blend ModesPaths, Masks And Blend Modes
Paths, Masks And Blend Modes
 
Solve An Inequality Graphically
Solve An Inequality GraphicallySolve An Inequality Graphically
Solve An Inequality Graphically
 
Visual Basic Calculator
Visual Basic CalculatorVisual Basic Calculator
Visual Basic Calculator
 
Calculator 1
Calculator 1Calculator 1
Calculator 1
 
Scratch - Rock, Paper, Scissors
Scratch - Rock, Paper, ScissorsScratch - Rock, Paper, Scissors
Scratch - Rock, Paper, Scissors
 
Watercolor Painting Effect
Watercolor Painting EffectWatercolor Painting Effect
Watercolor Painting Effect
 
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIDesign a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
 
Strawberry recolortut
Strawberry recolortutStrawberry recolortut
Strawberry recolortut
 
Calculator 2
Calculator 2Calculator 2
Calculator 2
 
Modul 1 Scratch
Modul 1 ScratchModul 1 Scratch
Modul 1 Scratch
 

Similar to How to code a simple side-scrolling game in Hopscotch

Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditBibekPandit2
 
Macromedia Flash Player Practical file
Macromedia Flash Player Practical file Macromedia Flash Player Practical file
Macromedia Flash Player Practical file varun arora
 
We are going to learn to program!
We are going to learn to program!We are going to learn to program!
We are going to learn to program!jenloudun
 
Run and jump tutorial (part 3) behaviours
Run and jump tutorial (part 3)   behavioursRun and jump tutorial (part 3)   behaviours
Run and jump tutorial (part 3) behavioursMuhd Basheer
 
UE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorialUE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorialJustin Plowman
 
BGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfBGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfTNGanesan
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2Kobkrit Viriyayudhakorn
 
Power pointlabs quick tutorial
Power pointlabs quick tutorialPower pointlabs quick tutorial
Power pointlabs quick tutorialDa Huang
 
How to start a simple animation.
How to start a simple animation.How to start a simple animation.
How to start a simple animation.TOA
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming Kobkrit Viriyayudhakorn
 
Intro to Inventor with MugTree
Intro to Inventor with MugTreeIntro to Inventor with MugTree
Intro to Inventor with MugTreekrysia
 
Mac OS Lion Tips and Tricks
Mac OS Lion Tips and TricksMac OS Lion Tips and Tricks
Mac OS Lion Tips and TricksMike Glennon
 
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxPractical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxChantellPantoja184
 

Similar to How to code a simple side-scrolling game in Hopscotch (20)

Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek pandit
 
Botones
BotonesBotones
Botones
 
03 whack a-witch!
03 whack a-witch!03 whack a-witch!
03 whack a-witch!
 
Work flow
Work flowWork flow
Work flow
 
Macromedia Flash Player Practical file
Macromedia Flash Player Practical file Macromedia Flash Player Practical file
Macromedia Flash Player Practical file
 
Make a match3
Make a match3Make a match3
Make a match3
 
We are going to learn to program!
We are going to learn to program!We are going to learn to program!
We are going to learn to program!
 
Run and jump tutorial (part 3) behaviours
Run and jump tutorial (part 3)   behavioursRun and jump tutorial (part 3)   behaviours
Run and jump tutorial (part 3) behaviours
 
Owl Clock
Owl ClockOwl Clock
Owl Clock
 
UE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorialUE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorial
 
BGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfBGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdf
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
 
Power pointlabs quick tutorial
Power pointlabs quick tutorialPower pointlabs quick tutorial
Power pointlabs quick tutorial
 
How to start a simple animation.
How to start a simple animation.How to start a simple animation.
How to start a simple animation.
 
Maya
MayaMaya
Maya
 
3 d effect
3 d effect3 d effect
3 d effect
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
 
Intro to Inventor with MugTree
Intro to Inventor with MugTreeIntro to Inventor with MugTree
Intro to Inventor with MugTree
 
Mac OS Lion Tips and Tricks
Mac OS Lion Tips and TricksMac OS Lion Tips and Tricks
Mac OS Lion Tips and Tricks
 
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxPractical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
 

Recently uploaded

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

How to code a simple side-scrolling game in Hopscotch

  • 1. Started off with a blank project in the Hopscotch app for iPad.
  • 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
  • 5. The project screen should now look like this.
  • 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.