KEMBAR78
Calling Function - No Parameter | PDF | Software | Computing
0% found this document useful (0 votes)
12 views8 pages

Calling Function - No Parameter

The document provides a step-by-step guide to create a game called 'Chase the Apple' using the MakeCode Arcade editor. It includes instructions on setting up the project, designing sprites, and implementing game mechanics such as movement and scoring. The guide emphasizes using various blocks for background color, player and food sprites, and handling sprite interactions to enhance gameplay.

Uploaded by

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

Calling Function - No Parameter

The document provides a step-by-step guide to create a game called 'Chase the Apple' using the MakeCode Arcade editor. It includes instructions on setting up the project, designing sprites, and implementing game mechanics such as movement and scoring. The guide emphasizes using various blocks for background color, player and food sprites, and handling sprite interactions to enhance gameplay.

Uploaded by

Deepa Gayathri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Activity – Chase the Apple

Create the activity on Arcade using the MakeCode editor in the URL
https://arcade.makecode.com

Step 1: Create a
New Project by
clicking on ‘New
Project’. A dialog
box ‘Create your
project name’
appears.

Step 2: Name the


project as Chase
the Apple and
click on ‘Create’
Button

Once the project is


created, the editor
screen is visible.
Step 3: Click on
the “Scene” block
type and drag
the “set
background
color” block to
the “on start”
block.

Click on the grey


color oval to open
the color palette
and select a
background color.
The selected color
is reflected on the
Game Simulator
window.

Step 4: Click on
the “Sprites”
block type and
drag “set
mySprite” into the
workspace as
shown.

Note: This will


create a
new Player
character for the
game.
Step 5: Click on
the grey square in
the “set
mySprite” block
to open the Sprite
Editor. Use the
color palette and
design tools to
draw an image on
the canvas or
choose from the
Gallery or My
Assets.
Click “Done” whe
n finished.

Here the player is


chosen from the
Gallery.

Step 6: Click on
“Controller”
block type and
drag “move
mySprite with
buttons” to the
“on start” block.

Note: This will


allow you to move
the Player sprite
around the screen
with the arrow
keys. Check it out
in the Game
Simulator
Step 7: Click on
the “Sprites”
block type and
drag “set
mySprite2” into
the workspace as
shown. Rename
mySprite2 to
Apple as shown.

Note: This will


create a Food
sprite-Apple for
the game.

Step 8: In “set
Apple” block,
click on the
“player” kind to
open the menu of
different kinds.
Select “Food” as
Apple sprite kind.

Step 9: Click on
the grey box from
“set Apple” block
and select
the Gallery view.
Scroll to find the
image of a small
Apple and select it
to load into the
image editor.
Step 10: Open
the “Sprites”
block type and
drag the “on sprite
overlaps
otherSprite” bloc
k onto the
Workspace

Step 11: Choose


“Food” as kind as
shown

Step 12: Open


the “Info” block
type and drag
“change score”
into the “on sprite
overlaps
otherSprite”
Step 13: Click on
the “Sprites”
Toolbox drawer
and drag the “set
mySprite
position” block
into the “on sprite
overlaps
otherSprite” block
on the Workspace.
Select “Apple”
from the drop
down.
Step 14: Open
“Math” block type
and drag
two “pick
random” blocks
onto the
Workspace. Drop
one into
the x coordinate of
the “set Apple
position” block,
and the other into
the y coordinate
replacing
the 0 values as
shown.

Note Arcade game


screen
is 160 pixels wide,
and 120 pixels
high.
Step 15: Click on
the “Info” block
type and drag
“start
countdown” block
into the “on sprite
overlaps
otherSprite” block

Note: This is to
restart the
countdown each
time.
Output:

You might also like