Microsoft MakeCode for

Similar documents
Microsoft MakeCode for

Introduction to Computer Science with MakeCode for Minecraft

Before displaying an image, the game should wait for a random amount of time.

Introduction to Computer Science with MakeCode for Minecraft

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

Scratch for Beginners Workbook

Computer with Scratch program.

ArbStudio Triggers. Using Both Input & Output Trigger With ArbStudio APPLICATION BRIEF LAB912

Let s start by making a pencil, that can be used to draw on the stage.

This tutorial will guide you through the process of adding basic ambient sound to a Level.

Introduction to Computer Science with MakeCode for Minecraft

GAME PROGRAMMING & DESIGN LAB 1 Egg Catcher - a simple SCRATCH game

COMPUTING CURRICULUM TOOLKIT

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Let s start by making a pencil that can be used to draw on the stage.

[Title] MINECRAFT CAMP. System Administrator s Guide

OZOBLOCKLY BASIC TRAINING LESSON 1 SHAPE TRACER 1

Introduction to Simulink Assignment Companion Document

Overview. The Game Idea

Pong! The oldest commercially available game in history

PHOTOSHOP BASICS: VINTAGE PHOTO FIXES

DESIGN A SHOOTING STYLE GAME IN FLASH 8

Introduction. The basics

Creating Computer Games

1. Click on Schedule Services in orange menu bar at the top of the screen.

Kodu Game Programming

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

Lesson 8 Tic-Tac-Toe (Noughts and Crosses)

Create a Simple Game in Scratch

To solve a problem (perform a task) in a virtual world, we must accomplish the following:

Sketch-Up Project Gear by Mark Slagle

Tasmanian Devil Model

Code Kingdoms Sandbox Guide

Star Defender. Section 1

Cutting out in GIMP. Navigation click to go to a section

GAME:IT Junior Bouncing Ball

04. Two Player Pong. 04.Two Player Pong

LESSON 04: ORGANIZE IT FOR PSE USERS COMPANION BOOK. Digital Scrapbook Academy. April 2018: Lesson 04 Organize It for Elements Users

Introduction to Turtle Art

Plot cylinder pressure against crank angle

Introduction to 3D Printing. Activity 1: Design a keychain using computer-aided design software

Table of Contents. Creating Your First Project 4. Enhancing Your Slides 8. Adding Interactivity 12. Recording a Software Simulation 19

Minecraft Hour of Code Adventurer: Answer Sheet & Teacher Tips

How to Make Games in MakeCode Arcade Created by Isaac Wellish. Last updated on :10:15 PM UTC

Importing an Image into LaserWorks

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Brain Game. Introduction. Scratch

INTERMEDIATE PHOTOSHOP: FAMILY PHOTOS

AEROPLANE. Create a New Folder in your chosen location called Aeroplane. The four parts that make up the project will be saved here.

Step 1 : Earth and Mars Orbit the Sun

Tutorial Three: Categorising ideas using the SuperGrouper tool In Kidspiration there are two basic ways to organise ideas in Picture View: links and

Game Design Curriculum Multimedia Fusion 2. Created by Rahul Khurana. Copyright, VisionTech Camps & Classes

Welcome to the Break Time Help File.

PHOTOSHOP STUDY GUIDE FOR CHAPTER A, B TEST

Activity Editing Bitmapped Images Chapter 3

Educational Technology Lab

J. La Favre Fusion 360 Lesson 4 April 21, 2017

Ableton Live 9 Basics

Ghostbusters. Level. Introduction:

SketchUp Training Notes By Professional CAD Systems Ltd Ph

AXIS Fence Guard. User Manual

PING. Table of Contents. PING GameMaker Studio Assignment CIS 125G 1. Lane Community College 2015

When you load GarageBand it will open a window on your desktop that will look like this:

Automatic data analysis

Google Earth 101. A lesson about the basics of the Google Earth program, and how to use it with the REAL storm surge visualization tool.

Autodesk Inventor Module 17 Angles

Pull Down Menu View Toolbar Design Toolbar

Activity Sketch Plane Cube

Module 2: Radial-Line Sheet-Metal 3D Modeling and 2D Pattern Development: Right Cone (Regular, Frustum, and Truncated)

1. Create a 2D sketch 2. Create geometry in a sketch 3. Use constraints to position geometry 4. Use dimensions to set the size of geometry

Levels. Chapter Nine PLAY VIDEO INTRODUCTION LEVEL MANAGER AND LEVEL DISPLAY DIALOGS LEVEL MANAGER DIALOG

Digital Photography 1

Excel Lab 2: Plots of Data Sets

GotSoccer works well with and recommends using Internet Explorer, Safari and Google Chrome.

Best case scenario for recording with the 8M MOTU sound card and Audacity

Jimi Hendrix Online Slot Touch Game Rules

1. Creating geometry based on sketches 2. Using sketch lines as reference 3. Using sketches to drive changes in geometry

Copyright 2017 MakeUseOf. All Rights Reserved.

ILLUSTRATOR BASICS FOR SCULPTURE STUDENTS. Vector Drawing for Planning, Patterns, CNC Milling, Laser Cutting, etc.

Photoshop Essentials Workshop

In this lesson we are going to create cartoon eyes and parent them to the head bone.

Once this function is called, it repeatedly does several things over and over, several times per second:

Web Graphics Chapter 7 Review

Scratch Coding And Geometry

Tutorial: Gradient Noise Reduction

J. La Favre Fusion 360 Lesson 5 April 24, 2017

Lesson 2 Game Basics

Making Your World with the Aurora Toolset

NMC Second Life Educator s Skills Series: How to Make a T-Shirt

Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Geometer s Sketchpad Version 4

VACUUM MARAUDERS V1.0

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

SolidWorks Design & Technology

EC-3: Capacitors and RC-Decay

Revision for Grade 6 in Unit #1 Design & Technology Subject Your Name:... Grade 6/

Using Audacity to make a recording

Autodesk AutoCAD 2012: Fundamentals. Elise Moss. autodesk authorized publisher SDC PUBLICATIONS

UCL Micro:bit Robotics Documentation

Transcription:

Microsoft MakeCode for Lesson Title: Make it Rain! Introduction/Background: An "event" in computer science is an action or occurrence detected by a computer. For example, when someone clicks the button on their mouse, it generates a mouse click event for the computer. Microsoft MakeCode uses an event-driven programming model where user code is triggered as a response to an event. Examples of events in MakeCode for Minecraft include: In Microsoft MakeCode, there is a special event called the On Chat Command which is a useful way to teach students about functions. In computer science, a function is a way to group commands together. For example, the function of Waving might group the following commands together: Raise hand Move hand left Move hand right Students can type the name of their On Chat Command functions into the Minecraft game to execute, or run that function. 1

Lesson Steps: In this lesson, we will use the On Chat Command to make it rain in Minecraft. Step 1 From the Player Toolbox drawer, drag and drop the On Chat Command block onto the coding Workspace. Step 2 Rename this command to rain 2

Step 3 From the GamePlay Toolbox drawer, drag and drop the Weather block onto the coding Workspace. Notice that when you place the block onto the coding Workspace, it becomes disabled (turns grey with hashmarks). This means this block won t run in your current program. That is because it is not associated with an event. Step 4 Drag the Weather block under the On Chat Command event Step 5 Using the drop-down menu, change the weather to rain Step 6 In your Minecraft game, press t to open the chat screen. Type rain and press Enter. You should see it start raining in Minecraft! 3

Lesson Extension: Functions can also have Parameters, or arguments. These are values that are passed into the function. For example, the function of Waving might include a parameter that specifies which hand to wave: Waving ( right ) Raise ( right ) hand Move ( right ) hand left Move ( right ) hand right Waving ( left ) Raise ( left ) hand Move ( left ) hand left Move ( left ) hand right Let s try adding a parameter to our On Chat Command, and make our Rain function more exciting by making it Rain Cats and Dogs. Or, in the Minecraft world, let s make it Rain Ocelots and Wolves! Step 7 From the Mobs Toolbox drawer, drag and drop the Spawn Animal at Position block onto the coding Workspace. Step 8 Drag the Spawn Animal at Position block under the On Chat Command event 4

Step 9 Use the Animal block drop-down menu to select an ocelot Step 10 Right-click on the Spawn Animal at Position block to open the context menu, and select Duplicate to copy the block Step 11 Drag the second Spawn Animal at Position block underneath the first 5

Step 12 Use the Animal block drop-down menu on the second Spawn Animal at Position block to select a wolf Step 13 Our Rain function will now spawn 1 ocelot and 1 wolf at the Player s position before making it rain. Let s use a parameter and a loop to spawn multiple animals. From the Loops Toolbox drawer, drag and drop the Repeat block onto the coding Workspace. 6

Step 14 Position the Repeat loop under the On Chat Command block, and drag the 2 Spawn Animal at Position blocks inside the Repeat loop Note: make sure to keep the Weather block outside the Repeat loop Step 15 Click on the blue cog/gearwheel icon in the On Chat Command block, drag and drop a number parameter block under the Command Arguments block. This will create a number parameter for our Rain function. Click on the blue cog/gearwheel icon again to close the Parameters menu. 7

Step 16 From the Variables Toolbox drawer, drag and drop the number block onto the coding Workspace. Step 17 Drag the number block into the Repeat loop block 8

Step 18 Let s change the position where our Ocelots and Wolves are spawning. Right now, they are spawning at the Player s position at ~0 ~0 ~0. From the Positions Toolbox drawer, drag and drop a Pick Random Position block onto the coding Workspace. Step 19 We want our animals to spawn 5 blocks above our Player, and at random locations 10 blocks all around our Player. Set the values of your Pick Random Position block according to the following: Working with positions can be tricky. The Positions blocks use X, Y, Z coordinates to represent directions in the game, where: East = Positive X-axis West = Negative X-axis Up = Positive Y-axis Down = Negative Y-axis South = Positive Z-axis North = Negative Z-axis For more information, please see the Positions reference documentation 9

Step 20 Right-click on the Pick Random Position block to open the context menu, and select Duplicate to copy the block Step 21 Drag and drop the 2 Pick Random Position blocks into the Spawn Animal at Position blocks. Your completed program should look like this: Step 22 In your Minecraft game, press t to open the chat screen. Type: rain 4. You should see it start raining 4 ocelots and wolves all around you in Minecraft! Now try typing different numbers into your Rain function: rain 40, or rain 400. 10