MINECRAFT MAKECODE

minecraft.makecode.com 

TERMONOLOGY

The following terms are important Programming terminologies to understand:

Algorithm, Block-based programming, CamelCase convention, Commenting code, Commenting out, Compound logical operator, Control structure, Function, Loop, Pseudocode, Variables.

TASK

MINECRAFT HOTKEYS

1. The ESC key (top left of the keyboard) enable the user to pause and leave the Minecraft game

2. The t key activates the console at the bottom of the Minecraft game window which is where commands can be entered

3. The e key activates the inventory

4. The space key when double clicked allows the player to fly

5. The right-click on an agent allows the player to see the agents inventory 

MINECRAFT ESSENTIAL COMMANDS

There are a number of / (slash) commands, settings, special features of the Education Edition and general know how that is required to use Minecraft effectively. This link is a good start to learning or updating what you might already know. These commands can be used in the Minecraft Console which is accessed by pressing t.

education.minecraft.net/support/knowledge-base/commands

​TASK

COMMAND WORKSHEET(Access by making a copy of the read only doc)  

CODING - USING MAKECODE

​MAKECODE

MakeCode is a blocky language and it can be used to make Mods for Minecraft. Mods allow the player to run code inside Minecraft to spawn, build, plant etc.

The mod can be saved and used over and over by typing a keyword into the console. MakeCode was developed by Microsoft and can be used in other programming environment such as robotics or electronics.

​In the Minecraft MakeCode PXT (Programming eXperience Toolkit) there is a tutorial which we will use to create our mods. When organising your screen it may be useful to place the MakeCode window and Minecraft window side-by-side as shown. 

MOD FOLDER

MOD TUTORIALS

To learn about the MakeCode language, there are many tutorials. 


These create fun and exciting events in your Minecraft world. 


Click for tutorials.


Some of these tutorials are called:

Agent move                    Super digger

Agent build                     Fast forward

Chicken rain                   Billboard

Mega jump                     Compass rose

Flower trail                     Spleef etc... 

EVENTS

An event in computer science is an action or occurrence that is detected by a computer.

For example, when someone clicks the button on their mouse, it generates a “mouse click event” for the computer. In real life, there are also events that might be associated with an action, like cause and effect.

​Here are some examples:

Event                                                           Action

It starts raining                                             People open umbrellas  

The bell rings                                               Students go to class

The power button is pressed                       The computer turns on

The mouse button is clicked                        An application opens

Unplugged Activity: Events and Handlers

Activity: Last Stand at the Alamo!

How has your Minecraft coding experience related to each of the thinking hat colours?

Do the Six thinking hats reflection activity (Access by making a copy of the read only doc)

CO-ORDINATES IN MINECRAFT ARE 3D LIKE (X,Y,Z)

In Minecraft, it’s important to know where you are in the world, where your agent is, and where all kinds of things from diamond mines, to woodland mansions, to underground spawners are. In Survival mode, it’s even more important to be able to get back to a safe place when the sun starts to go down, or to remember the location of points of interest so you can find them again if your inventory is full and you need to come back.

To find your World Position and your Agents World Position: press F1

An overview of coordinates absolute and relative


Unplugged Activity: Classroom Coordinates

Activity: Minecraft Moving Company 

VARIABLES 

PSEUDOCODE

What is pseudocode? 

That is a good question and now that you are familiar with modding it's a good time to learn about pseudocode. If we ask the 

wikihow,com website this is what they say.

"Pseudocode is an informal tool that you can use to plan out your algorithms. As you begin to write more complex code, it can be hard to keep an entire program in your head before coding it. Think of pseudocode as a step-by-step verbal outline of your code that you can later transcribe into a programming language. It is a combination of human language and programming language: it mimics the syntax of actual computer code, but it is more concerned with readability than with technical specificity." www.wikihow.com/Write-Pseudocode 

​Do the Minecraft Pseudocode Worksheet (Access by making a copy of the read only doc)  

Make a Crop Farm.

​Watch the Farming with the agent MakeCode video.

Try out the techniques shown in the video.

TASK

Write pseudocode for this crop farm:

Extension 

​Code your pseudocode. Remember to save the MakeCode files. Give the file a descriptive name.

MAKECODE DOCUMENTATION

​MakeCode has a website that can be used to help you understand how the MakeCode Programming Language works. 

Try minecraft.makecode.com/docs This worksheet helps you to understand what you have been doing in some of the programming exercises you have been doing.

Open the worksheet here (Access by making a copy of the read only doc)

This worksheet uses sensing of the environment to help the Agent to climb a wall

Open the worksheet here (Access by making a copy of the read only doc)

Extension learning: Add some string output to the Minecraft screen to explain what the agent is doing. Use a 'say' command.

PROGRAMMING STRUCTURES WORKSHEET

These worksheets help you to understand what you have been doing in some of the programming exercises.


Open the Programming structures worksheet (Access by making a copy of the read only doc)


Open the Climbing the wall worksheet (Access by making a copy of the read only doc)

Extension learning: Add some string output to the Minecraft screen to explain what the agent is doing. Use a 'say' command. 


Sensing Worksheet: This worksheet is about detecting different types of blocks.

Open the Sensing worksheet (Access by making a copy of the read only doc)

Test Cases Worksheet: This worksheet is about testing your program to make sure it does what it's expected to do.

Open the Testcases worksheet (Access by making a copy of the read only doc)

WORK

Review the work done in this topic, and find the three best examples of work. They should be finished and have comments.

​They should have instructions for the user especially if materials are required for the Agents inventory.


Check the three programs work well and have comments, descriptively named variables, and instructions for the user.​ 

Minecraft MakeCode tutorial by M.Williams & G.Smirk  2018