Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not...

13
Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP block Drag out a SKIN block Then select AGENTSMITH Press CTRL & D to bookmar k and save your work Then press Run X

Transcript of Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not...

Page 1: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Blockly MinecraftTask 1 ) Please copy the example task. Task by task.

Do not alter or personalise it in any way.

Drag out the SKYMAP blockDrag out a SKIN block

Then select AGENTSMITH Press CTRL & D to bookmark and save your work

Then press Run

X

Page 2: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Adding extra blocks

Copy this block pattern

Your blockly character needs a nickname – Call him Agent Smith

Use right click to quickly create additional blocks so that walking looks more realistic.

Now- Run the program

Your character takes small steps – try changing the step to 1 – steps are longer – but not realistic

What will happen if you use move -0.5?

Using the Minecraft blocks

X

Page 3: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Using arrays

A

B

Program B works slower why?

Example B

Example A

Page 4: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Using variables – creating an array!Drag in this VARIABLE block

Give the variable a name

Drag in this minecraft block

Drag in this list block

Duplicate it so that you have three copies. Add text phrases

Page 5: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Variables are usually defined at the start of a program

Drag and connect the quotes variable to the start of the program.

A variable which stores several distinct pieces of data is called an ARRAY. This array is in the form of a list.

If you press run – the array will not do anything. The data is simply stored in a memory location inside the computers RAM memory chip.

RAM CHIP

X

Page 6: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Lets create a path for Agent smith to walkDrag a loop block from the control menu

Set the loop to run 8 times

Use 108 degrees

Your program should look like this!

Run the program to test it

X

Press CTRL & D to bookmark and save your work

Then press Run

Page 7: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Make your character talkDrag and connect these communication blocks from the Minecraft fly out option menu

Type in Hello, World!This is a tradition that all programmers followWhen you learn a new programming language Print(“Hello, World!) is usually your first step.

X

Press CTRL & D to bookmark and save your work

Then press Run

Page 8: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Lets use the data array - QuotesDrag and connect this communication block from the Minecraft fly out option menu Drag and connect this Lists block

This command will pick RANDOM quotes from the data array and your character will say them on screen

Page 9: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Putting it all together

Agent Smith will now walk and talk randomly. E.g. b c a c b

Page 10: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

• Research • Lets google search and find some cool

phrases!

Page 11: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

No delay block!No problem!Lets make one using a stepping loop

Page 12: Blockly Minecraft Blockly Minecraft Task 1 ) Please copy the example task. Task by task. Do not alter or personalise it in any way. Drag out the SKYMAP.

Going random

Using random walks-numbers walk backwards+numbers walk forwards

Make Agent Smith unpredictable

Using random numbers in a loop creates interest.

Make Agent Smith dance