Lecture Slide 3.2.1 - Beetle in the Maze

Слайд 2

Beetle in the Maze

In this activity you will make an animated game

Beetle in the Maze In this activity you will make an animated
in PictoBlox where beetle needs help to come out of the maze without touching the boundaries.

Слайд 3

Setting up the Stage

Setting up the Stage

Слайд 4

Setting up the Stage

Right below the stage, you will see a purple button

Setting up the Stage Right below the stage, you will see a
with a bear on it. Take the cursor over it and select Choose a Sprite; the sprite library will open.
Select the beetle sprite from the library.

Слайд 5

Setting up the Stage

Now, there are two sprites: beetle and Tobi.
Right

Setting up the Stage Now, there are two sprites: beetle and Tobi.
click on the icon for Tobi (below the stage) and click on the delete option.

Слайд 6

Setting up the Stage

Click on the purple colored icon which says Choose a

Setting up the Stage Click on the purple colored icon which says
Backdrop.
Select the maze backdrop from the library.

Слайд 7

Giving the Beetle Its Moves

Giving the Beetle Its Moves

Слайд 8

Interfacing evive with PictoBlox

Connect evive to your laptop/PC and open PictoBlox.
In PictoBlox,

Interfacing evive with PictoBlox Connect evive to your laptop/PC and open PictoBlox.
go to the menu and click on the Boards Select the evive.

Слайд 9

Interfacing evive with PictoBlox

Once you’ve selected the board, click on the Connect

Interfacing evive with PictoBlox Once you’ve selected the board, click on the
tab and connect the board.

Слайд 10

Upload Firmware

You have to upload the firmware into the device before interacting

Upload Firmware You have to upload the firmware into the device before
with it.
Click on Upload Firmware button.
Once you successfully uploaded the firmware you will see evive logo on evive display.

Слайд 11

Giving the Beetle Its Moves

We will control the Beetle movement using Navigation

Giving the Beetle Its Moves We will control the Beetle movement using
Key of evive.
The beetle must move in the direction we push the key.
navigation key is in state () ? block checks if the navigation key is in one of the four particular directions. The direction for which you wish to check is your choice and can be chosen from the drop down on the block.

Слайд 12

Giving the Beetle Its Moves

Write the code to move the beetle in

Giving the Beetle Its Moves Write the code to move the beetle
up direction & test:
Try to make the code for other directions.

Слайд 13

Giving the Beetle Its Moves

For ‘down’, set the direction as 180.
For ‘right’,

Giving the Beetle Its Moves For ‘down’, set the direction as 180.
set the direction as 90.
For ‘left’, set the direction as -90.

Слайд 14

Sensing the environment

Sensing the environment

Слайд 15

Sensing the environment

Now, it’s time to write the script for safely taking

Sensing the environment Now, it’s time to write the script for safely
the beetle to the end of the maze.
Make the code to initialize the game, so that every time game starts at one position.

Слайд 16

Sensing the environment

Now we will add the condition when the beetle touch

Sensing the environment Now we will add the condition when the beetle
maze, it will go back to its original position.
Using the color picker, pick the maze color.

Слайд 17

Sensing the environment

Now we will add the condition to end the game.

Sensing the environment Now we will add the condition to end the
Game ends when the beetle touches the apple.
Using the color picker, pick the apple color.
Game is complete now. Play!
Имя файла: Lecture-Slide-3.2.1---Beetle-in-the-Maze.pptx
Количество просмотров: 40
Количество скачиваний: 0