Nothing Special   »   [go: up one dir, main page]

8-Bit Maze: Information and Communications Technology 27 May 2021 Minutes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

INFORMATION AND COMMUNICATIONS TECHNOLOGY 27 May 2021

Practical Quiz 50 minutes

8-bit Maze

A. Description
In this Practical Quiz, we will make a maze game. The gameplay is, when the box moves through the maze
and reaches the end of the maze, it will move to the next level. This game has 2 levels. Each game will be
timed, and the fastest one will be used as a reference to beat the game. Let us make it.

B. Concept
There are four parts to this maze game.

First there is the Opening Dialog to display the game


title and start button.

Second, there is a core part, namely the game part.


Here the user can play the maze game which is
moved using the arrow keys on the keyboard (up,
down, right, left). Users are struggling to break the
record for the fastest time.
Every time the box touches the line, it will return to
the starting point.

[Next Page] 
Next is a maze that increases in level and must be
completed by the user

The last one is the closing part, here is the


information that the user has ended the game and is
shown how much time it will take to finish the game
and displays the fastest time in this game.

C. Component Needed
1. Sprites
No Sprite Costumes Sounds
1 Bit No sound is
added

To create the Bit sprite, you need to create your own via the
Paint feature (in Scratch).
You need to make one costumes, namely Bit.
Costume Head is made using Rectangle. The bit size is 4x4
squares, and make sure it is in the middle of the editing area.
The costume color can be adjusted to your own creations or it
can be made almost the same as shown in the picture.

2 Obstacle L1 L2 No sound is
added

You need to upload image L2.png for second obstacle or next


level.
You can download at moodle, below the question.

[Next Page] 
No Sprite Costumes Sounds
3 Button2 No sound is
added

You can find it in sprite library.


You need to add the text "Start" on the button.
After editing Button2-b's costume, you need to place it under
the text "Play again?" (Backdrop “The End”. If the Opening or
Closing sprite is displayed, Button3 will appear just below the
text or maze image.

4 Next Level No sound is


added

You can find it the Scratch file.


Nothing needs to be changed

2. Backdrop
No Backdrop Explanation Sounds
1 Start Dance Funky
The display that the user will get when Sounds during
starting the game. the opening
and closing of
the game.

Garden
Sounds during
2 Game game play.
As a maze background

3 The End
The display that the user will get when he
has finished the game.

3. Variables
a. My time  to count user time play the game.
b. Best time  to save the best time can achieve on the game.
c. Level  to adjust the level that the user has passed.

4. Broadcast
a. Start  to call bit sprite to play the game.
b. End  to call up a completed game state.
Point: [10]

[Next Page] 
D. Working Steps
1. Backdrops
Give instructions to the backdrop:
a. First, create your own instruction block to set the sound to play. Select “My Block” from the My
Blocks tab. Type “Sound” then select and click “Add an input”. Label the number input “name”, then
“Add a label” with text “duration”. Add another input called “time”.

Point: [2]

b. Now that you have a block definition in your scripts area, recall the pattern that we used to adjust
the sound to play and the duration. name is used to determine the sound name and time is used to
determine the waiting time. The code would look like this:

Point: [3]

c. When green flag clicked, it will execute new block Sound “Dance Funky” duration 5 seconds.
d. When receive End message, it will execute new block Sound “Dance Funky” duration 5 seconds.
e. When receive Start, it will execute new block Sound “Garden” duration 16.5 seconds.
Point: [6]
2. Bit
a. First create your own instruction block to set up control of movement and direction. Select “My
Block” from the My Blocks tab. Type “Key”, then select and click “Add an input”. Label the number
input “arrow”, then “Add a label” with text “direction”. Add another input called “degree”.

Point: [2]

b. Now that you have a block definition in your scripts area, recall the pattern that we used to adjust
the movement and direction of the snake. Arrow is used to determine the button pressed and
degree is used to determine the direction (angle) of movement of the snake. The code would look
like this:

Point: [2]
c. When the green flag clicked, the sprite will be hidden.
d. When receive End message, the sprite will be hidden.
Point: [4]

[Next Page] 
e. When receive Start message
1) Show
2) Go to x:0 and y:0
3) Forever
a) Change color effect by 1 (this will create a colorful look)
b) Key up arrow direction 0 (create this instruction from your new block)
c) Key down arrow direction 180 (create this instruction from your new block)
d) Key right arrow direction 90 (create this instruction from your new block)
e) Key left arrow direction -90 (create this instruction from your new block)
f) If touching Next Level (sprite)
 Change Level (variable) by 1
 Go to x:0 y:0
g) If touching Obstacles (sprite)
 Go to x:0 y:0
h) If Level = 3 (find equal symbol in operator) then:
 Broadcast End
Point: [15]

3. Obstacle
a. When the green flag clicked, the sprite will be hidden.
b. When receive End message, the sprite will be hidden.
Point: [4]

c. When receive Start message


1) Set Level variable to 1
2) Show
3) Forever
 If Level = 1, then (find equal symbol in operator)
 Switch costume to L1
 Switch backdrop to Game
 If Level = 2, then (find equal symbol in operator)
 Switch costume to L2
 Switch backdrop to Game

Point: [10]
4. Button2
a. When green flag is clicked
1) Set Level variable to 0
2) Switch backdrop to Start
3) Show
Point: [3]
b. When receive End is received
1) Set Level variable to 0
2) Switch backdrop to Start
3) Show
Point: [3]
c. When this sprite clicked
1) Broadcast Start
2) Hide
Point: [2]
5. Next Level
a. When green flag is clicked
1) Hide variable Best time
2) Hide variable Level
3) Hide variable My time
4) Set My time variable to 0
5) Hide
Point: [5]
b. When receive End message
1) Show variable Best time
2) Stop other scripts in sprite
3) Hide
4) If My time (variable) < Best time (variable) then
 Set Best time to My time (variable)
Point: [5]

[Next Page] 
c. When receive Start message
1) Hide variable Best time
2) Show variable Level
3) Show variable My time
4) Set My time variable to 0
5) Show
6) Forever
 Change My time variable by 0.1
 If Level = 1, then (find equal symbol in operator)
 Set size to 17%
 Point in direction 180
 Go to x:-140 y:76
 If Level = 2, then (find equal symbol in operator)
 Set size to 17%
 Point in direction 90
 Go to x:-112 y:160 (depend L2 image size)
Point: [15]

6. The game is running successfully Point: [4]

Total Point: [95]

[This is Last Page] 

You might also like