Coding with Minecraft 3: Coordinates

Содержание

Слайд 2

LESSON A: Introduction to Coordinates

LESSON A: Introduction to Coordinates

Слайд 3

WHAT WE’LL LEARN The difference between relative coordinates and absolute coordinates

WHAT WE’LL LEARN

The difference between relative coordinates and absolute coordinates in

real life and Minecraft
The importance of coordinates
Code a compass rose in Minecraft with coordinates
Слайд 4

WHY ARE COORDINATES IMPORTANT? To know the location of:

WHY ARE COORDINATES IMPORTANT?

To know the location of:

Слайд 5

COORDINATES Tell a program where an action should take place A

COORDINATES

Tell a program where an action should take place
A 3-dimensional position

(X, Y, Z) in Minecraft

+Y Up

-Y Down

-Z North

+Z South

-X West

+X West

Слайд 6

A HANDY TIP Use this to remember X, Y, Z axes

A HANDY TIP

Use this to remember X, Y, Z axes

Слайд 7

ABSOLUTE WORLD POSITION Based on distance from the world origin Minecraft

ABSOLUTE WORLD POSITION

Based on distance from the world origin
Minecraft world origin:

(0, 0, 0)
Visible in the game when you press F1
Player world position: (3, 98, 0)
Move around to see the values change!
Слайд 8

RELATIVE PLAYER POSITION Based on the player’s current position Player’s current

RELATIVE PLAYER POSITION

Based on the player’s current position
Player’s current position is

always: (~0,~0,~0)
Relative player position: (~X,~Y,~Z)
Not visible in the game
Слайд 9

TO CALCULATE RELATIVE POSITION

TO CALCULATE RELATIVE POSITION

Слайд 10

IN REAL LIFE The earth’s geographical origin point, Null Island is

IN REAL LIFE

The earth’s geographical origin point, Null Island is at

0o N 0o E
Mount Everest is at 27o N 86o E
The Empire State Building is at 40o N -73o E


LET’S CHECK IT OUT bing.com/maps

Слайд 11

LET’S DISCUSS What are the values for X, Y, Z for

LET’S DISCUSS

What are the values for X, Y, Z for the

world origin?
Is the world origin an absolute or relative position?
Is (~0, ~0, ~0) an absolute or relative position?
Слайд 12

CODE WITH COORDINATES Create a compass rose Use relative player positions

CODE WITH COORDINATES

Create a compass rose
Use relative player positions
Point to the

four cardinal directions
Change the code to make it unique
Слайд 13

LET’S DISCUSS What other ideas do you have to use positions

LET’S DISCUSS

What other ideas do you have to use positions when

coding?
What’s the difference between absolute world position and relative player position?
Слайд 14

LESSON A What we learned today Why coordinates are important The

LESSON A What we learned today

Why coordinates are important
The difference between

absolute and relative positions
Calculated both types of positions from a world map
Coded with an on chat command and relative player positions to create a compass rose
Слайд 15

NEXT TIME Turn our classroom into a Minecraft world More coding

NEXT TIME

Turn our classroom into a Minecraft world
More coding with coordinates

to copy and paste any part of the Minecraft landscape where you want
Слайд 16

LESSON B: Coding with Coordinates

LESSON B: Coding with Coordinates

Слайд 17

Pretend our classroom is a Minecraft world to calculate relative and

Pretend our classroom is a Minecraft world to calculate relative and

absolute positions
Code with relative and absolute positions
Copy and paste any part of the Minecraft landscape, like buildings or whatever you want

WHAT WE’LL LEARN

Слайд 18

REVIEW COORDINATES What’s absolute world position? What’s relative player position? +Y

REVIEW COORDINATES

What’s absolute world position?
What’s relative player position?

+Y Up

-Y Down

-Z North

+Z

South

-X West

+X West

Let’s do an unplugged activity!

Слайд 19

LET’S DISCUSS Does the absolute position of an object with a

LET’S DISCUSS

Does the absolute position of an object with a permanent

place change?
Does the position of an object relative to your position change as you move around the classroom?
Слайд 20

MINECRAFT MOVING COMPANY Use on chat commands, coordinates and block operations

MINECRAFT MOVING COMPANY

Use on chat commands, coordinates and block operations
Copy

and paste entire portions of the Minecraft landscape
Слайд 21

LET’S DISCUSS In Minecraft, what keyboard shortcut shows your players world

LET’S DISCUSS

In Minecraft, what keyboard shortcut shows your players world position?
How

do you easily duplicate blocks in the MakeCode coding workspace?
Слайд 22

LESSON B What we learned today Calculated relative and absolute positions

LESSON B What we learned today

Calculated relative and absolute positions in

our “Minecraft” classroom
Coded a tool with relative and absolute positions to copy and paste parts of the Minecraft landscape, like buildings or whatever you want
Слайд 23

NEXT TIME Spawn and herd sheep with code Take a short quiz

NEXT TIME

Spawn and herd sheep with code
Take a short quiz

Слайд 24

LESSON C: CODE WITH COORDINATES AND MOVING OBJECTS

LESSON C: CODE WITH COORDINATES AND MOVING OBJECTS

Слайд 25

WHAT WE’LL LEARN Calculate and code a four-sided pen in Minecraft

WHAT WE’LL LEARN

Calculate and code a four-sided pen in Minecraft to

herd sheep that we spawn
Check our learning progress with a quiz
Слайд 26

AUTO-FARMER Spawn sheep Use an on chat command to build a

AUTO-FARMER

Spawn sheep
Use an on chat command to build a pen with

coordinates
Think of
X as length
Y as height
Z as thickness of the pen wall

+Y Up

-Y Down

-Z North

+Z South

-X West

+X West

Слайд 27

LESSON C WHAT WE LEARNED TODAY Used coordinates to calculate and

LESSON C WHAT WE LEARNED TODAY

Used coordinates to calculate and code

a pen to herd sheep
Took a quiz
Слайд 28

NEXT TIME Your independent project Think about how you could code

NEXT TIME

Your independent project
Think about how you could code with coordinates

in a new way to change the Minecraft landscape
Слайд 29

LESSON D : GET CREATIVE WITH COORDINATES

LESSON D : GET CREATIVE WITH COORDINATES

Слайд 30

WHAT WE’LL LEARN Take what you’ve learned about coding to the

WHAT WE’LL LEARN

Take what you’ve learned about coding to the next

level
Create your own MakeCode project that alters the Minecraft landscape in some way
Слайд 31

INDEPENDENT PROJECT Purpose: Create one or more commands that alter the

INDEPENDENT PROJECT

Purpose: Create one or more commands that alter the landscape

in some way
Your project should:
Use coordinates in some way
Alter the landscape by using code
Be creative and original
Слайд 32

IDEAS TO CONSIDER In a set area, replace all blocks of

IDEAS TO CONSIDER

In a set area, replace all blocks of a

certain type with something new (for example, replace all grass with lava)
Create an “instant swimming pool” filled with water or lava
Create a way to instantly tunnel through a mountain or portions of the nether
Create a way to literally “move mountains”
Make a rainbow
Improve the Minecraft Moving Company activity so that you can enter a height for the upper coordinate rather than having to actually stand there yourself
Experiment with the Mask and Mode menus on the clone block
Слайд 33

AN EXAMPLE

AN EXAMPLE

Слайд 34

MINECRAFT DIARY ENTRY How did you come up with this idea?

MINECRAFT DIARY ENTRY

How did you come up with this idea? What

problem are you trying to solve and why?
What did you decide to alter in the landscape?
What does your program do?
Describe how your program alters the landscape.
Include at least one screenshot of the result of your program.
Слайд 35

To apply our new coding skills with coordinates in original and

To apply our new coding skills with coordinates in original and

creative ways
Created your own MakeCode project to alter the Minecraft landscape

LESSON C What we learned today