Technology 4 Learning

Telephone1300 32 32 32

Emailt4linnovations@det.nsw.edu.au

Transcript of 'Save the forest with Makecode Arcade' video

This is the transcript for 'Save the forest with Makecode Arcade' video

Speaker 1:

Welcome to our MakeCode Hour of Code click and play event. Now this is an event designed specifically for the students, however educators can jump in on the fun and use this as a teaching resource. My name is Andrew Balzer, I'm a Microsoft learning delivery specialist for the State of New South Wales, and I'm here to help you learn, code and inform each other using Microsoft MakeCode Arcade. Now we're going to get started by sharing my screen, and you're going to see a lovely little PowerPoint deck, which you'll also have access to after the fact, which will be very helpful. So this is Microsoft MakeCode Arcade, which is gamifying the learning experience. And in today's one hour lesson we're going to save the forest with MakeCode Arcade.

So we're going to learn how to do some amazing computational thinking while gamifying the learning. Now firstly, I'd just like to acknowledge the traditional custodians of the land in which we e-meet today. I'd like to acknowledge the role of elders past and present and their future importance to Aboriginal Australia. Now today, we are talking about Microsoft MakeCode. What is Microsoft MakeCode? Well, it's a free, open source coding platform for creating engaging computer science learning experiences that support a progression path into real world programming. I love it because it's so visual, it's so friendly, it's like connecting Lego bricks together. Has some fantastic accessibility features built into it, and I feel like if you're an educator or a student that's learning to get into code or programming, this is one of the best places to start.

And we're going to focus on the Arcade section of Microsoft MakeCode, in which you'll be developing an arcade retro-style game that informs other students or audiences about environmental impacts, which is going to be really, really helpful. So today's plan, as stated, students will understand how to code with Microsoft MakeCode Arcade, they'll also learn about core programming and game development concepts. Students will explore the impact of forest fires and how that's going to affect not only just Australia but the global stage. And of course, at the end of doing our skill map you can earn a little certificate after completing the activity. Now this is a play and pause or click and pause click and play, depending on how you want to pronounciate it, event.

So in that instance I'm going to show you how to use Microsoft MakeCode Arcade. And if you're a student for example watching this in your own time, I encourage you throughout the video to pause the video, replicate my processes, and then play the video when you're ready. If you're a teacher or an educator showing this right at the front of a classroom, similar situation. I will kind of give these visual cues, waving my hands and verbal cues saying, "Please pause the video so you have time to check everyone's code and catch up to this point in the content." So it's really learning on demand in that regard, but do make sure that you pause the video and then click play when you feel like yourself or everyone around you is ready to proceed.

Now, we're going to learn about forest fires today, okay? And according to research individual efforts do make a difference even in the face of a bushfire or a wildfire, all right? Now wildfire's behavior is influenced by three main factors, the topography, so the lie of the land right? The hills, the slopes, the gradients, the weather of course, the wind speed, relative humidity. Does anyone know what humidity is? It's a great time to ask students around the room, or even ask yourself about some of these forms of terminology. And ambient temperature, and of course it needs fuel right? Fires need fuel, so vegetation or man-made structures in this regard. In the event of extreme wildfire behavior, extreme weather conditions are normally present, like heavy wind, gusty winds, like extended droughts, high winds, low humidity and high temperatures like we have here in Australia, right?

Of these factors fuel is the only one that we can influence. We can't influence the topography to an extent, we can't influence the weather to an extent, but fuel is the one. So whether near homes and communities or in the wild land, back country or central Australia in our regard. Now there is a lovely site, forestfirefacts.org, if you're a student that is curious or a teacher that's curious to learn more about some of these bush and forest fires. But today we are going to use Microsoft MakeCode Hour of Code to learn about some of these bushfires and forest fires.

Speaker 2:

My name is John, and I fly a single-engine air tanker plane for the United States Forest Service. Fire is a natural part of the forest ecosystem. Wildfires are healthy for a forest because they help to clear out dead trees and spur new growth. But forest fires can also be deadly, destroying wildlife habitats, polluting the air, and endangering communities. And too many fires burning at once release huge amounts of carbon dioxide into the Earth's atmosphere, contributing to global warming. A lot of things can affect how quickly a fire spreads, the health of the trees, the strength of the wind, or the dryness of the grass can all make fires rage out of control. And that's where I come in.

The Forest Service uses planes called air tankers to battle wildfires by dumping fire-retardant liquid on the most dangerous parts of the fire. Computers and technology can also help combat forest fires by giving us important data about ground conditions, weather forecasts and satellite imagery.

Speaker 1:

All right, now it is our turn to code a program that can inform and hopefully prevent more forest fires or bushfires happening in this regard. Now there are a series of questions I want you to think about as you go through this activity today, and then we'll come back and reflect on these questions at the end. A great opportunity for the teacher to interrupt the lesson at any point in time, pause the video and run through some of these questions. Get a bit of a temperature of the class so to speak, witty witty pun pun. Does it sound like the risk of wildfires is getting better or worse based on that lovely little video that we just saw there? Name a way that technology is currently helping in the battle against wildfires or bushfires in that regard.

So again, great opportunity to pause the video and have a think about some answers to these questions, and then continue on when you are ready. Can you think of something that could be invented to help even more in the future? So what forms of amazing technology or ideas that you might have that could prevent bushfires or forest fires moving forward? Again, pause the video, have a think, have a chat with people around you. Now, once you've done that, you've thought about some compelling answers to these questions, we're going to explore the computer science-firefighting connection. Now there is a site I'd love for you to go to, you can pause the video and head on over to aka.ms/forestmap.

That is ak.ms/forestmap, and then resume the video when you have that loaded up in your browser and ready to rock and roll. Now when you have reached that lovely, lovely website, it will take you to our Save the Forest skill map. Now, what is a skill map in this regard? Well I'm glad you've asked, because I have one here ready to rock and roll. You'll be presented with this screen, okay? Now you will start at each piece of the puzzle, and we will go through and systematically work through learning the coding and programming progression plan by breaking it up into these bite-size pieces, okay? Every time we do an element of code and complete the activity we'll move on to the next activity, until right at the end we get our certificate, which is our lovely little trophy.

Now there are some instructions on the right-hand side and some learning outcomes, if you're a student or a teacher and you would love to have a look at some of the outcomes and what you are achieving, all right? But Save the Forest, the last few summers have been some of the hottest on record, and the forest service needs you to help keep fires under control. Use the blocks to code your air tanker and set up tech on the ground so the team can save the forest. Double click the first level to start. So we've got zero out of six to complete, zero out of one rewards achieved. So what you have to do is click on this lovely little puzzle piece that has the star, and then you can see here just a basic set of instructions on what this little activity consists of.

So we're going to set up our air tanker to make sure that we get everywhere we need to be. It's easy, it has sprites involved and it has movement blocks involved, and we can start the tutorial by clicking the start button. Now, that will load up our coding interface. Now, I'm going to walk you through this coding interface so you understand the graphical user input and layout, okay? So, the last couple of summers have been the hottest on record. Now if you're a student and you're struggling to read the text or even understand some of the terminology, you need some translation tools, you need some assistive tools, or you're an educator and would like to inform students of these lovely tools. The instructions have what we call Immersive Reader built into them.

One of the only coding platforms that have such an amazing array of assistive tools for students, so they can understand the literacy aspects of the instructions to help them do the computational thinking aspects of coding. Now all you have to do is look out for this lovely book with a speaker on top of it, and that will launch the immersive reader player. Now the immersive reader player allows the student, or you if you are a student in this regard, to tailor the learning experience. An assistive tool, okay? So down the bottom you have your play button, which will do text-to-speech.

Speaker 3:

The last couple summers have been some of the hottest on record, and the Forest Service needs you to help keep fires under control.

Speaker 1:

I use it all the time, solely because listening for someone to read that out helps me remember certain facts. However, next to that you can change the gender of the voice and of course the voice speed. So you can speed it up or slow it down, based on your needs. On the right hand side you have your text preferences. Now, I suffer from spacial crowding, so I like to increase the size of the text that's in front of me. And of course you can turn on or off the increased spacing, change the font, I know a lot of students like the Comic Sans Font. And of course if you see text better using a different array of themes, like for example I see white text on a dark background much better than dark text on a white background, I can just process the information more efficiently.

You can explore some of the themes here to help you understand what is on the page in that regard. Our second category over here, we have our grammar options. Now you can break the words up into syllables, turn on the nouns and the verbs of each word and of course if you're colourblind you can turn on the labels there as well, so N for noun, V for verb, okay? And of course our reading pane allows you to have a line focus. So if you get distracted or you do suffer from spacial crowding like I do, you can turn on line focus for just focus on a single line in one, three or five lines when reading. We also have a picture dictionary where you can click on certain words and see visual pictures of those words.

So for example if I click on start, you can see some pictures that are associated. Now it's not every word, it's most words, and I can listen to the pronunciation of that word.

Speaker 3:

Start.

Speaker 1:

Right? And lastly what I'd love to show is that we can translate over to 100 different languages right now. So if English is not your primary language maybe you'd like to turn it to Arabic for example, and have it read aloud.

Speaker 3:

[foreign language 00:13:48].

Speaker 1:

So that's the power of our immersive learning tools in Microsoft MakeCode. So if you do need them as a student or as an educator, do look out for the book with a speaker icon down the bottom left hand corner. Okay, let's get started. Now on the left hand side you will have your instructions where it will tell you what to do using colour-coded visual references, okay? I can see the immersive reader icon here on the screen, what step I'm up to, and then the instructions themselves. So I'm going to walk you through how to use MakeCode to code a very immersive but fun Save the Forest gamified experience here. So let's set the scene, shall we? Now it says here, "Welcome to the forest. Choose a tilemap to add a beautiful forest to your game."

Now if I follow these instructions here it says, "Under the scene category," which is the gray category, okay? So I can see they've colour-coded that for me to make it really easy to follow. "In the toolbox, you will find the set tilemap two block. Drag it to the empty on start container, okay? That sounds pretty straightforward. So I click scene, I click the set tilemap, and it says, "Drag it to the on start". And you'll hear a little Lego pop, like a sound, and that's when you know that that has effectively snapped in, when it's yellow like that and makes that popping sound, okay? So I just completed the very first step. Now it says here, "Having trouble finding the block you need? Look to the left of the instructions for the icon on the toolbox where your block lives".

And you also have a little hint system down the bottom here where you can click the little light bulb, and that will visually show you what you should be up to by the end of the detailed instruction. When we're ready we click next on the instruction pane, all right? Now we're up to step three. Click the empty gray square in your set tilemap two to toggle my assets, and select the tilemap called level one. So when they refer to the empty gray square, they're referring to this gray square here okay? Now, this is a great time to pause the video, make sure everyone can find their very first block, and then resume the video when you're ready to continue on, okay? All righty, let's continue on. Now I click that gray square there, all right? And it says, "Click on my assets," which is just in the top right hand corner here.

And we need to click the one titled level one. So if I hover over these assets, you can see here that's titled level two, and that's titled level three. So this one here is titled level one, just by hovering my mouse over that. Now if I click on that lovely little tile block, the lovely users at Microsoft MakeCode have already designed a little forest for us here. Now I can could go through and change this, and paint on this, and tweak this a little bit, but I would like to leave it as-is for this example. So I'm just going to click done down in the bottom right hand corner, okay? Now I've finished that lovely little example there, and you'll notice in the bottom right you actually have what we call the game simulator, okay?

Every time you do a little bit of coding that's going to update that game simulator in real time, to give you that visual feedback on what you are coding. Now if you'd like you see that in fullscreen, which I know a lot of students do, you can click this lovely fullscreen button, which looks like a square on the right-hand corner there, okay? That will show you your game simulator at maximum capacity. Now to minimise that as well, you can click the minimise button, right? Now we can take screenshots and do all sorts of wonderful things. But right now, we are going to focus on the coding elements. So let's click next, and it says, "Take a look at the game window," right? Which we just went through there to have a look at the scene that we just set up.

So, we can continue on. Now we need a hero for our game, a sprite as you will, to move around the screen, right? So a sprite now in this regard is an image, or a character, or something that represents an object on the screen, all right? So it says here, "Drag in the red category..." Sorry, it's the blue category even though they've got that as red. "Set my sprite to kind of player," okay? So don't be too confused about why that's red, I know there's another red category here. But trust me, it will be in the sprites category, and put it at the end. So we're going to click on sprites, and we're going to grab this red block called set my sprite, it wants us just to click it right there. Now there's a second set of instructions here. It says, "To choose your plane, click on the empty gray box and toggle my assets again," just like what we did with the forest map.

And we'll be using the fire plane right sprite. Now you can use something else if you want, all right? But again, now's a great time to pause the video if you're a student or teacher, gauge the room or your environment to make sure everyone is up to this step here before we select our plane, okay? All right, let's continue on. So I'm going to select the gray box, click on my assets again, okay? I'm going to click on fire plane right. Now you can pick any other plane that you actually want, okay? Like I could pick this red one, I could pick this helicopter one. It is asking for this gray one, right? But it also says here that we can recolour it, okay? So maybe I will do that, maybe I want a red plane flying around there, okay?

So I've just recoloured my fire plane. And you can make all forms of modifications to your plane in the MakeCode Artistic Pixel Editor, and this is what you've seen right here. But don't get too carried away, right? Great opportunity to pause the video if you'd like to modify your artwork, make a really cool plane. However, when you're ready do click the done button and we will continue on. Now, we have placed a lovely plane sprite... So I'm going to click the light bulb, make sure my code looks very similar to their code. Looks good, looks very good, and we're going to click the Next button. Now, I am going to bring up my game icon here, my game simulator by clicking the big enlarge button, and I can see my plane on the screen.

However nothing's happening, right? Can't control it using the controls, nothing is moving. So it says here, "Instruction number six, we need to get the sprite moving by using the controller block here." So we're going to click and drag my sprite with buttons to the end, and then click next. So now we can actually move our plane around, okay? So by clicking the little joystick you can see we can fly our plane around the screen. We've coded a forest, a plane, and now the joystick functionality, okay? So again, pause the video, make sure that you have those three sets of coding blocks in there, and then click continue. Now we do have an issue with our code right now, if I fly my plane all the way down to the bottom it goes off the screen, I can't see where it is going. So what we need to do is put in a follow with camera sprite, all right?

So, "Did you notice the air tanker flies off the screen when you go too far?" Yes I did. So to keep your sprite inside, drag the camera follows sprite block, it's making me thirsty saying that word all the time, sprite, at the end of the on start, okay? So I'm going to click on scene, okay? And then I'm going to click camera follows sprite, all right? And it says, "Don't forget to play with your project after each step to make sure the changes have been made." Now again, great opportunity to pause the video, test out your program. But what we've done right now is that we've coded a level using the set tilemap two, we've added a sprite to become a player using the set my sprite to player, we've added a control my sprite with controls or buttons, and then we've added a camera follow that sprite around the screen.

And what you'll evidently get is this lovely plane that can fly all over the forest, okay? Even fly backwards, very talented plane. You can explore where these potential forest fires will pop up. Now if I click next, we're off to a great start. "When finished click the done button," so I'm going to click that done button there, all right? It says, "Click the second icon, burning issues. Use loops to add random fires to your map." Excellent, so we've designed a map, we've designed a plane, we've got a camera following our plane around, and now we're going to use loops to start the fires, just for educational purposes and coding of course. Nearly four out of five forest fires are started by humans, in your game they'll be started by code.

Okay, and don't forget about Immersive Reader there as well. I click okay, and you can see here that our code is all intact from our last mini activity. Now it says, "Try your game." We just did that in the last lesson, we flew around, we've checked to make sure the camera was working, all right? And we went through each line of code and explained what each one was doing there, so I'm going to click next. Now thinking ahead, we're going to add four flames. But thanks to our repeat loop, we only need to write code once. That's the beauty of loops, it can loop four times rather than us having to put four sets of code in that are the same. So we're going to the green category called loops, and drag the repeat four times loop at the end of the start.

So let's grab the repeat four times like that, and put that to the end of the start right there. Now anything we put into this repeat four times loop will obviously run four times within this little container, okay? So we're going to go and create spreading fire on random tile with image that is selected, okay? We're going to put that into our loop, because we want that bit of code to run four times, all right? And don't forget to pause the video to make sure that you and everyone else is up to this point, okay? So here it is, create spreading fire on random with image. All right, but what do we put in there? Let's check the light bulb to make sure everything looks the same. Looks good to me.

All right, they look very comparable, and let's click next. All right, in the create fire random with image block click the first gray icon, it says here, and select a tree. So what we're asking this to do, as you can see, we're saying, "Create spreading fire on random tree," with the image of what? Hmm, I think you can figure that one out. So it's click tree, so it's going to select one of these random trees that are on our map, okay? It says here, "Click the second checkered square and select the tree on fire block." So let's do that there as well, so there's our tree on fire block, select that. So this code is actually running four times over, because it's going to select a random tree from our map and then replace it with the image of a tree on fire, okay?

And you can see here, see how you only had to add one block into the loop to make something happen four times, we do. How many fires would start if you changed the loop to run three times? How many fires would start if you changed it to run five times? What happens if you put 50 in there, hmm, right? Maybe you'll have 50 fires, maybe, just maybe. So if we run our program we should be able to fly around and count four fires. So, let's have a look right there, all right? One, two, three, four. Perfect. Now this is a great opportunity to modify our code, let's run this 50 times, see how many fires appear on our map. You've guessed it, 50 fires have started all over the map, okay? Let's change that back to four.

So you can play around with some of these looping functions to see how they operate. Now we need to create some crackle, some sounds, all right? So when each fire's created we want to make it sparkle using effects... Oh sorry, FX, I was going to say, I'll make the crackle as we go through later on. But we're going to click on on fire created at location block. So that is in the blue category, okay? On fire located at location, created I should say at location, right? It now says, "Drag the spray effect at location into the empty on fire at location block." Okay, change the effect from spray to fire. So again, if you ever, ever, ever need that visual reference, do click the light bulb, I use it all the time.

So we need to go to our scene block, we need to grab the start spray effect at location, click that one in there, and change the spray to fire, okay? And you can play around with some of these effects, see what happens during your coding event. So maybe for example I select hearts, what do you think will happen when the fires start? Let's have a look, all right? So, there's my plane. So, fly through here, you can see these little hearts firing out of the trees, right? We don't want that, we want fire or sizzle or crackle to appear. So what it wants us to select, change the effect from spray to fire. There's fire, so let's have a look at what that looks like. Okay, yeah, so there's the sizzle effect coming up on our game, I can see that right now.

So now we're adding some effects into our code. Great opportunity, stop the video, make sure everyone is at the same point. You're going to hear me say that a lot, that's okay. That is a click and play or play and pause kind of style, all right? So I will remind you all the time. And that's it, we have now created our very first loop. It's going to run four times, 10 times, 15 times, up to you. And we've also created a special effect on those fires that are created at locations, okay? So let's click done, and let's keep moving on. We are almost there, halfway in fact. So now we need to add a water hose to our plane, so we can keep our fires under control. Let's click start, load this one up. How exciting, right? Learn how to code. Now when a fire gets large enough it can create its own weather system and bring its own rain.

I didn't know that until I actually did this coding event myself. Until that happens, teams rely on fire trucks and aircraft to keep wildfires and bushfires from getting out of control. So, let's add some water and a spraying hose to our game. Now, you should be able to find four fires or how many times you ran that loop on your map by testing out your game. Now let's start with drench that fire, let's add some code that sprays when you hold down the A button. So we're going to make it a bit more interactive. We need to go to the orange controller block and drag the on A button pressed, okay? So there it is right there, on A button pressed. And when I say A button I mean the A button as in the alphabetical A, not any button, okay?

And then change from press to repeat, all right? Now the problem if we don't change this, when you press it it'll shoot water out, that's it, done. You'll have to keep pressing it. You don't want that, right? We just want it so we can hold it in, all right? So we're going to hit the repeat button, so we can just hold that button in, it's going to spray water, okay? So it says down here, "Find it too hard to keep A pressed as you play? Try using the space bar on your keyboard." There's a good little tip, space bar does emulate the A button in this regard, okay? Now grab a spray from my sprite using block, and then snap it into the empty on button A pressed. Sure. We're going to click the blue sprites, and you can see right now the blocks are getting more and more, right?

It's getting a bit more crowded, so you have to pay attention because there's a lot more coding blocks that are starting to come out of the woodwork, out of the forest in that regard. So we're going to click on the spray from my sprite, we're going to put that into our on A button, repeated. So when they press that A button it's going to run that bit of code, okay? Now we need to click on the gray category, just like we've done in the past, we're going to click on my assets here. We're going to click on the little blue water icon. Now you can draw whatever you like, you can change the colour, right? But when we hold the space bar or the A button it's going to shoot those little blue squares that simulate water.

So, let's test our game out. So here we are, here's our lovely plane. You do have to just wait a second until the controls load in, right? When they're gray it means it's not going to be active. And then as we fly our plane around using our keyboard, if I press the A button, this button here, oh, look at that, you can see the water spraying, those little blue crosses are spraying. But I do have a problem here, the fires aren't going out. So I move around and spray all the water, or press the space bar button, the fires, they're not going out. Before the water can weaken you fire, you have to set the fire's strength. That makes sense, all right? Now, this is a great opportunity to pause, make sure your code looks exactly like mine looks on the screen there.

Temperature check, check the person next to you, check the teacher, get the teacher to check you, and then hit play when you're ready to continue on, okay? Now we need to set the strength of fire at location to five on the on fire created location. Now we already have an on fire created location block, we're just going to add to this block here, okay? So let's click on the sprite's category, and we're going to find the set strength of fire. Look at that, it's right down the bottom, okay? Right down the bottom there. So let's drag that up, we're going to set the health, if you will, of the fire to five, okay? And now that each fire that starts has a strength of five, we can weaken the fires each time they've been hit with water.

We have to code that to happen, otherwise they'll just stay on fire, we'll shoot water at them, nothing will happen. So, let's make that happen through code. We're going to go to our scene category, and drag an on sprite of kind of player overlaps at location onto the work pane. So let's click scene, look for on sprite, it's this big one here, of kind of player overlaps something at location. So, let's put that one down there. And this is really, really important, we don't want our plane to overlap the fire, to put the fire out. We don't want to crash our plane into the fires to put them out, that would just make it worse. So we're going to change this from player to water, we want the water to touch the fire to weaken it, not the plane.

So do make sure you change that, from plane to water, okay? Now we need to check the checkered square, that was a poor choice of words, Mr. Balzer. Click the checkered square, and you're going to choose what happens with the overlap, okay? So, when the water overlaps what? It's going to be the fire, we want the fire, all right? When the water overlaps the fire, okay? Click our little light bulb, make sure that is lining up. Now this one is probably a little tricky part here, we need to snap a destroy sprite, okay? And the reason we need to do that is because when the fire, or the water I should say, overlaps the burning trees, we need them to disappear. So we're going to destroy that sprite, we're going to destroy that image, okay?

So we're going to go up to sprites, we're going to grab this destroy my sprite, just click it in there. But, that's not all. What it's going to do is destroy the plane, we don't want to do that. We want to destroy the sprite, right? So you need to click and drag, and just drop that in there. Very important that you do that, all right? Because that means it will destroy the sprite that has been overlapped, okay? That's basically what that is doing. If you leave this, my sprite here will destroy the plane. You don't want to shoot the fire then your plane explodes, don't want that to happen, okay? And now we need to do one more thing to weaken the fire, every time it overlaps we need to change the strength of the fire by minus one.

So if we click on the sprites category, we go to change strength of fire, just down the bottom here. We're going to put that in our block, and what happens when water overlaps the fire? It's going to decrease its health by one. Now, great opportunity to ask yourself or the class, what was the health of the fire in the first place? Does anyone remember? What did we set it to, what part of our code did we set the health to? I'll give you a little hint there on the screen, all right? So we're going to have to hit it how many times? Hmm, right? Maybe five? All right, so right now the fire's strength reaches zero, nothing happens. Let's change that. So drag on fire destroyed at location container into the empty workspace, so let's do that.

On fire destroyed at location, so it's just this big blue one. Let's put it right down the bottom here. And it says here, "To clear the sparks from an extinguished fire add the clear all effects at location." So we're going to go to scene, clear all effects. Now this is starting to get pretty straightforward, isn't it, to do coding? Very easy with this block-based visual coding, okay? So that looks pretty good. Let's make sure I didn't make any mistakes, that looks fine, let's click next. Now, let's test this out. I think it's time that we should test this out. We've done a lot of coding just now and then. So here's our plane, wait for the controls to load in, all right? Here they are. And then we're going to fly our plane here.

Now there's some fire, I'm going to hit it with water, right? Let's hit that with water there, if I can. So I can see, I'm just kind of whacking it with water, so that looks like it's working quite good all right? However, our fires aren't getting extinguished yet, okay? So we're going to have to continue coding along. Look at that, look at all of that. So that's working absolutely lovely. All righty. So to show that fire has finished burning, set the at tilemap column and row category to the on fire destroyed at location. Now you may have to keep pausing this at this point in time, because we're starting to add more and more code okay? Some students, or yourself may get a little lost, hence why you should just stop the video and just make sure that your blocks are similar in colour and nature to my blocks, okay?

So let's go to that gray category, click the set at tilemap, so this one right here, into the on fire destroyed, okay? And then it wants us to change the checkered square to a burnt tree, all right? So we need to visually change what the sprite looks like, we're going to change that to a burnt tree. So on fire destroyed at location, clear all the effects, and then when the health obviously reaches zero because it's destroyed, change the tree to a burnt tree. Now, what was happening when we tested it? Well, we're hitting the fire and extinguishing it. But we wouldn't change the image, so even though the fire was gone it was still there, because we didn't set the image to change to give us that visual reference that we have extinguished the fire.

To add the location where the new burnt tree should appear drag the red location value from on fire destroyed, okay? So what it wants us to do is drag this one at the top, not the bottom one, into here, all right? Just these little categories here. Now you may have to zoom in using the zoom button, I'm just going to go all the way down here. And it wants us to replace this here, okay? So we're going to set the tree to be at the location where the fire was destroyed. Now let's test it out, shall we? Here's our plane, and there's our controls, let's extinguish one of these fires. There it is, one, two, three, and where's my last... There it is, four. Yay, our fire program, our plane works, right?

It works, we've done some amazing forms of coding here. I'll put it onscreen just so you can follow, especially this last part, okay? Down the bottom here can be a little tricky, so I'll zoom in. Now you can rewind, don't forget, rewind to see those instructions again at your own pace. But so far so good, we are almost there. Let's click next and then click done. All righty, so one, two, three, we're up to this one here. We have two more to go, let's have a look, let's have a look at spreading the fire using our code. So lots of things affect how quickly the fire spreads in this activity, you add variables to change the danger levels. Okay, so conditions such as weather, environment, drought, winds and health of vegetation can cause fires to spread more quickly.

Let's simulate those conditions in our game. Now this one's just a quick one, okay? So first we need to drag the health of fires to seven, at the top of the on start container. So we're going to set the health of fires to seven at the top here, and that's the purple block under the game category, okay? Now on your own, can you find out what blocks set the strength of wind and the dryness of the grass, and add them to the stop? The start, I should say, category. We're adding three variables to the game to make it a bit more difficult, so if we click the game category you can see, we can set the health, and you can see the dryness and the strength of the wind, all right? So let's do... Oh sorry, I said set health of trees, I should say, not fire.

We already have strength of fire. So set dryness of grass to three, and set wind levels to three. So we're adding some conditions to our game to make it a bit more difficult. Now it says here, "Drop an on-game update container into an empty area to run code each time the game updates its status". Sure. So I'm going to click on the purple category, on game update, let's just put that down the bottom here. Now it wants us to grab an update fire spread, which is this one here. Now it's quite visual, using this tutorial, using the forest map, because not only do you have the visual indicators on the left hand side, the emergence of learning instructions, but also the video that you're utilising today and the light bulb to make sure that your instructions match up.

So, let's test our game. Did you notice your fire's now spreading to other nearby parts of the forest because of the wind? Does it get out of control too quickly? Try experimenting with your variables, increase the health of the trees to make the game easier so they burn slower, increase the dryness of the grass or the strength of the wind to make it harder. So let's see what happens with our new bits of code. Look at that, I can see it spreading, I can see all of it spreading. Now the wind is only set to three, so it's spreading not too fast. What happens if you increased the wind speed? So maybe if I change that to 10, let's see what happens, right? Reset our game, let's have a look here. Game has started, there's our fire. And you can see here, oh, look at that, look at that fire spreading, and spreading, and spreading, and spreading, and spreading, the wind is picking it up, right?

Getting out of control very, very easily. Now once you've put out all the fires click the done to keep moving through the skill map, how to add a heads-up display. So we're almost there, this is our very last bit of code. So thank you for getting this far in the video, hopefully you're having a lot of fun, you're coding, you're designing, you're learning, that's the most important thing. And do remember to keep pausing the video, and use my visual references. So lots of things affect how quickly fire spreads in this activity. You add variables to change the fire danger levels. Okay, we just did that, so let's continue on. Computer science is more important to firefighting than ever before, add some technology to keep your pilots updated.

Now, we can do that, we can do that. Let's add some technology to help our firefighters, okay? So let's start by adding a heads-up display. So it says here, "Try your game," we just did that, all right? You should also have three variables, we do have that, you can see them up here, okay? Can you remember which lines of code that create each action? Yes I can, right? So you should at this point be able to explain what each one of these major blocks does, right? And if you don't raise your hand, talk to your colleague, ask a teacher, get someone to help you explain what one... What is being executed, I should say, under each one of these major lines of code, okay? Now we need to add a heads-up display that will help the pilot see how many fires are burning at the moment.

So there's a little hard box that they've added here, it's black, and we're going to click on the show fire HUD to yes. So which one does show fire HUD look like? This one here, okay? Show fire HUD to yes, and we're going to add that to the end of the on start block, right here. Now we need to test our game, let's have a look. Okay, so you can see at the top right hand corner now we have a number of fires starting, okay? We're up to 15, 18, 21, 23, obviously our wind strength is still set to 10, so it's getting out of control. But at least now we can see a visual count, all right? Is it easier to know that there are still fires left? Absolutely, using the HUD. Now we need to anticipate how quickly fires will spread using the danger level.

So again, we're going to click on the HUD, and we're going to change the set danger level HUD to yes, so that's this one here, okay? Let's add that one to the bottom of the on start there. Now the crew needs to know the progress of the fire at another HUD to share information about how much of the forest is still healthy. So grab the show forest hub to yes, and put it at the end of the container to see how much of the forest remains, all right? So very similar to what we just did, but this time we're grabbing the show forest HUD, not show danger level HUD, okay? So you should have three there now, all right? Three of them. And now we can see how quickly we're making progress, but the colours of the fires mean they don't seem to represent the forest.

Well, you can customise them in the next step, so let's have a look. Ah yes, so you can see the health of the forest is going down as the fires increase. I can try and put them out as I fly around in my game, okay? Now we are almost there, hang tight, you're doing great, doing absolutely fantastic. It says here, "Take a look at the rest of the blocks in the HUD category, and use as many as you can to customise your screen". All right, so let's change some of them. Now you can have a look at some of these, like set the burn meter to red, set the colour of the healthy forest metre to pink, okay, right? Change the labels of the HUD. I will let you experiment with some of those, start to modify your code and change it to make it individual to you, all right?

So that's it, that's it right there. So the fire's spreading too quickly, try reducing the wind or the dryness of the grass. What happens when you bump the numbers all the way up to 10? Well, I left them on 10, let's change them all the way back down to one. And that's it, congratulations, you're done playing, all right? So let's have a look at our game here. We've coded a lot of different elements in this Save the Forest, while learning about very important forest facts, and bushfire facts, and wildfire facts. And as a plane, I've set my fire strength and my wind strength to one, so I can go through and try and extinguish as many fires as I possibly can, I've got eight left. I'm going to go through and try and put all of them out.

There we go, "You saved 93% of the forest," woohoo. Using those HUD elements gives us that technology as a firefighter to understand the situation, okay? And that's our winning score, 93. So I'm going to click the done button right here, and we have finished. Congratulations, you've coded your very first save the forest event, okay? Now you can claim your reward, which is a lovely certificate. Obviously this was a Microsoft MakeCode that we launched last year, but you can do it in any year that you want. It's still very relevant as it was last year to what it is today, okay? And of course you can go back and rewind the video, modify your code, pause the video to make sure everyone's on the same speed.

So I can click claim my reward, you can see I have this lovely Save the Forest badge, and I can sign in to keep that badge right there. And my next reward is my certificate of completion from completing this MakeCode Arcade title right there. Isn't that fantastic, right? And of course there are plenty more lovely programs that you can dive into on Microsoft MakeCode. So that's our session for today, there are some questions I do need to ask you after we've finished coding. I'd love you to share your game, take a walk around the room if you're doing this with a class, right? Or maybe just reflect if you're by yourself, in what ways are others similar to yours or what ways could you modify your code, in what ways could your code or others be different?

What did you discover about putting out fires? I know I learned a lot, I know a number of variables can affect a fire, I know that if you don't control one of those elements, such as fuel, and topography, temperature, and climate, fuel, all play a role. Did you read any words today that you've never heard of before, and what were they? What do you think they mean? So, a great opportunity to stop, think, ponder, discuss. And who tried things while coding that weren't written in the instructions? Did you go off the path, and start to explore, and do your own little elements of coding? Now, if you loved that activity and you're interested in making more gamified learning education experiences, do check out MakeCode Arcade, so arcade.makecode.com.

We have plenty of skill maps there, plus plenty more tutorials for you to learn how to do computational thinking and game-based learning. And this PowerPoint deck of course will be available so you can access all of these lovely resources, bushfires and climate change information, Microsoft MakeCode Hour of Code, resources, the forest map if you'd like to do that again, and more templates to learn about MakeCode. We have an educator guide for teachers, if you're a teacher, teacher resources and how to work together and MakeCode Arcade into PowerPoint files there for you. But thank you so much everybody for joining us in this click and play event on teaching you how to code Save the Forest from bushfires and wildfires through Microsoft MakeCode. My name is Andrew, pleasure being here, and we'll see you very soon again in the next one. Bye-bye.

[End of transcript]