0% found this document useful (0 votes)
21 views6 pages

Scratch Game: Catch Healthy Foods

Uploaded by

gridima2410
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views6 pages

Scratch Game: Catch Healthy Foods

Uploaded by

gridima2410
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Scratch 331.

1
SeRATCH Settings File Edit Scratch Project Tutorials 2Debug

Code Costumes uSounds

Motion
lives3
foodpick
This is the code for
move 10 steps score 2
Logka the 'bowl' sprite
tum 15 degrees
99 tox0 -130
oun

n 16 degs
Eyant
y ght arow prese?tien
Change x Dy 10
Contre o0 1o andcm position

ef anow - peset?
Sensoa lox160 130
change x ty -10

Operato jice CS lo adom postion

Variables glide1 secs lox-160 y -130


Stooe
My Dlocks Sprite Hoef 130
point in dnctn 90
Show GO O Size 200 Directlon

point towards mouse-poinler


BackdropE

2
change xby 10
Boul Dot

set xto-t60
Spdtet
cange yby 10

set yto130)

Trending videos ENG 1133 AM


Steve Hartman H Q Search IN xD 6/19/2025
Scratch 331.1
Settings File - Edit Scratch Project Tutorlals ?Debug

Code Costurmes uSounds

lives 3
Motion
foodpick3
neove Sat Aoe
Look
move 10 steps This is the code for 'apple' sprite. score
ae
tum C 15 degre
Sounc go to x pdom200 o 200 In my game, different food items fall
from the top of the screen one by one.
515dgees The player moves a bowl using the left
and right arrow keys to catch them.
Control random poston Cange yby5 Catching healthy foods like apples and
watermelons increases the score.
toucing BoM
Sensing go to x165 -165 However, catching unhealthy foods like
cCange sore donuts and muffins reduces the score
Operators de1 secs to andom posion ide and also takes away a life. The player
starts with three lives, and the game
Nest tlem
Variablas secs to xc 165 -165 ends if all lives are lost or if a healthy
food is missed. Each time a food is
Stage
My Blocks caught or missed, the game randomly Sprite Apple 165 165
polt in diecton 90
yposin 60 selects a new item to fall, keeping it fun
Shc Stz 50 Direction 90
and unpredictable.
point towaros mouse-pointer teadost Game Ovet
Backtrups

change x ty 10
oot Apple Wateemolon Donut Muflr

set xto 165

Sprtet
change yby 10)

set yio-165

ENG 11:35 AM
Q Search IN * D 619/2025
Scratch 3.31.1

Settings File Edit Scratch Project Tutorials 2Debug

Code Costurmes u Sounds

lives 3
Motion
osle
foodpick3
move 10 sters score
Look This is the code for

Sounc
tum 15 degrees pk dom200
200 180 'watermelon' sprite
15ges
Control random poston ciange yby5
touching Dot
Sensing 0 lo x147) -90
Cangesoe
Operator lde1 secs to random postion

Nst en
Variablas secs to xc147 90
Stage
My Blocks Sprite Watermelon 141

polit in diecon 00
y poaion -160 Show O Sze 50 Direction 90

point towaros mouse-pointer beoancadGame Cvet - Backtrups

stop

chaige xty t0 Eoof Apple Watomelon Donut Muflr

set xto 147


Sprte
change yby10)
set ylo 90

ENG 11:40 AM
Q Search IN GxD 6/19/2025
Scratch 3.31.1
Settings File Edit Scratch Project Tutorials 2Debug

Code Costurnes u Sounds

lives 3
Motion
otle
foodpick 3

10 steps e This is the code score Z


Lookcr
lox pokan200 200Y80 for 'donut' sprite.
tum 15 degres
Sound

5osgees
change y by
Control random poston
outg Boat7n

Sensing go to x172 -165

Operators i e 1 secs to andom poslion


tacat t em
Variablas secs to x 172 -165

Stage
My Dlocks
Sprite Donse 112 1y 165

polnt in diecton 90 y poaion 160


50 Direction 90
point towards mouse-pointer -
Backtrups
broad Nost em

change x ty 10)
Acle Watemelon Donut Muffr

set xto 112


Sprte1
change yby 10)

set yio-165 hide

ENG 11:41 AM
Q Search IN
Scratch 331.1

Settings File Edit Scratch Project Tutorials 2Debug

Code
Costurnes u Sounds

lives 3
Motion
otle weni ove stat n foodpick3
move 10 sters de
This is the code score2
Lookcr
o tox pokom for 'muffin' sprite
tum C 15 degree
Soune show

bam 16 dgees
Cange ytby5
Control random postson
Iotng Boat

-164
Cange scoebyt
Sensing

Operators de1 secs to random posion


beoadcast Net lem

Variablas secstoxx43 16)

Sprite Mdtio
Stage
43 164
My Blocks
polnt in diecon 90 y poticn -160

Sho O Siz 50 Direction 90


point towaros mouse-pointer
badcaNt hen Baccdrops

change xty 10 Acle Watemelon


9 Donut Mutir

set xto43

Sprte1
Change yby 10

set yio164

ENG 11:42 AM
Q Search IN xD 6/19/2025
Scratch 3.31.1
Settings File Edit Scratch Project Tutorlals 2Debug

Code
Costurnes u Sounds

lives 3
Motion
osle
foodpick3
move 10 steps
This is the code for 'controller' stripe.
Look
score2
tum C15 degrees I made this sprite to control the overall
Sound functioning of the game. The problemn is that
15 deges in the 2nd section starting from 'when i
receive foodpick', in the if <> then else code,
whatever item's tagi put under else, that
Control random poson item is the only one that keeps falling again
toodoickO
and again. the code is supposed to
Sensing randomize the number of food items falling.
the foodpick variable's count changes in the
Operators lie1 secs to andom poslion toodoio2) preview at the right side but the food item
falling doesn't change.
Variablas secs tox36 20
toodgix)
My Blocks Sprite Spritet 1
polit in drection 90)
Show O 100 Direction 90
point towards mouse-pointer -
Backtrups

chage xty 10 Bout Acle Watenelon Donut Muffir

set xto 36

Sprtel
change yby 10)

set yio 28)

ENG 11:44 AM
Q Search IN

You might also like