Scratch 3.0 Programming Masterclass: Learn by Creating 11 Funny Games | Dr. Chris Mall 30,000+ Students | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Scratch 3.0 Programming Masterclass: Learn by Creating 11 Funny Games

teacher avatar Dr. Chris Mall 30,000+ Students, C# | Flutter | Scratch Instructor

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

24 Lessons (4h 2m)
    • 1. Welcome to Scratch 3.0 & How It All Works

      2:52
    • 2. Getting Introduced in Scratch 3.0 Environment

      5:59
    • 3. Blocks and Commands in Scratch 3.0

      2:37
    • 4. Sequential Programming with Scratch 3.0

      3:29
    • 5. Learn Loops with Scratch 3.0, Building the "Ghost Effect"

      3:07
    • 6. The Most Popular Arcade in Scratch 3.0: "The Snake Game"

      1:19
    • 7. Coding the Head of the Snake Game in Scratch 3.0

      6:16
    • 8. Coding the Body of the Snake Game in Scratch 3.0

      9:46
    • 9. Coding the Apples of the Snake Game in Scratch 3.0

      4:50
    • 10. Coding the "Game over" functionality of the Snake Game is Scratch 3.0

      8:50
    • 11. Developing Scary Shark Game in Scratch 3.0

      16:04
    • 12. Adding more functionalities in Scary Shark Game and finishing the Game

      14:25
    • 13. Building Helicopter Game in Scratch 3.0

      9:27
    • 14. Building Racing Car Game in Scratch 3.0

      8:47
    • 15. Building Crossing the Road Game with the Crab in Scratch 3.0 - Part 1

      13:08
    • 16. Building Crossing the Road Game with the Crab in Scratch 3.0 - Part 2

      21:33
    • 17. Building the "Witch Game" with Geometry and Informatics

      14:14
    • 18. Building an Algebra Game Solving Mathematical Polynomial Equations.

      23:16
    • 19. Building "Collect the Garbage" Game in Scratch 3.0

      13:35
    • 20. A Glimpse to Scratch 2 and Spotting the Differences with Scratch 3

      2:46
    • 21. Creating a simple mini project.

      9:03
    • 22. Starting with setting up the scene of Arkanoid

      18:15
    • 23. Creating the first scripts (ball, paddle and bricks).

      16:42
    • 24. Creating variables, messages and finishing the game.

      11:45
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

309

Students

2

Projects

About This Class

In this course you will be able to develop 11 different games (including the great Arcade Arkanoid Game) in Scratch programming language. For the development of this game, is used Scratch because is an educational programming environment that is has an easy graphical interface that it will allow us to drag and drop the right blocks of coding.

I promise you that it will be a funny and exciting course that it will motivate you to learn coding in more depth.

Scratch 3.0 is a free programming language and online community where you can create your own interactive stories, games, and animations. Using Scratch, users can create online projects and develop them into almost anything by using a simple block-like interface. When they are ready, they then share, and also discuss their creations with each other. Scratch was developed by the Lifelong Kindergarten group at the MIT Media Lab. Scratch is designed to help children (ages 8 and up) learn to utilize their imaginations, practice common sense, and, most importantly, to interact with computers.

Scratch is the best educational programming software for kids available today. With Scratch, you can create games and interactive art projects all while having lots of fun!

This course uses the amazing Scratch program developed by MIT to teach coding this course is meant for:

- Everybody that is interested in learning to code, from kids to adults,  Scratch was developed by MIT to teach people to code. It is the best way to learn to code that I have been aware of in my lifetime.

- Anyone interested in teaching beginning programming as a career or business.  Teaching kids to code is becoming big business.  Want to start your own coding academy school or get a position as an instructor?  They all use Scratch programming, learn Scratch here from a University programming instructor.

- Anyone that already knows how to code that wants to learn from Scratch Programming and build some fun games. Why did we get into programming in the first place? Because its fun and Scratch is super fun!  No matter your level, you will have fun and learn from Scratch.  I know I did and that is what the people at MIT intended.

Meet Your Teacher

Teacher Profile Image

Dr. Chris Mall 30,000+ Students

C# | Flutter | Scratch Instructor

Teacher

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Welcome to Scratch 3.0 & How It All Works: the programmers off tomorrow. Are the wizards off the future? It's the closest thing you can get to give magic power this strange for century. According to game, You'll so welcome tothis scratch 3.0 complete masterclass in codings endgames. This course is designed to get you ready to learn scraps and goading with a complete massive last from eight to said, they will learn everything you need for stress programming and game development with a three step process and step by step examples. So my name is crystals, and I will believing you through this course. I called the busy in programming software and game development, and I can guarantee that scratch 3.0 is a great programming language that you should learn . I designed the scores for anyone who is interested in learning scratch programming and want to create impressive games easily. So by the end of this course, you will be able to develop your own games in scratch 3.0. Build them and serve them with your family and your friends. So the real question is widely land scraps, because scratch means that you will learn by having fun. You will in front of mental coding will and computational thinking. And you will manage to create your own games and in directive stories without public scolding will also be able to upload them and serve them with your friends and your family . So we're going to use a three step process for developing a new game in scratch, a three step process that he has to do with. Learned the basics off programming, learn scratch 3.0 and start goading with step by step. Examples. So what does this matter? Class include? It includes fundamentals of coding. How to think in coding. Learn scratch 3.0. Create games, Variables. How to Our points, a timer Thief statements, loops used to D graphics use libraries and heroes. Sir, your games and, of course, have a little fun. So the deal student of this course is anyone who is looking to improve his skills in creating games or students that they won't relent, scratch and make magic things happen. Show the Aviall student of scores. There are no requirements necessary control. It will only be asked to be open minded and credit learned. So feel free to buy this course, and I'm really excited to start together and see you mustard Scratch what 2. Getting Introduced in Scratch 3.0 Environment: Hey, guys will come back. I'm here to tell you that the new scratch is finally here. Scratch 3.0, Released just on the second of January in 2019 and eighties, the third and current major version of scratch. It is a complete redesign and to re implementation of scraps written in a thimble. Five. It features a new modern look and design with the states moved back to the right like scratch 1.4 that we really liked. So it was released just two days ago. Just on generally 2nd 2000 ending. So many blokes are indifferent daughter. Let's start creating a new project in scratch so that you can take all the new features. First of all, please, looking please signing to your account because you will see that there are a lot off new features. Onley, if you're are looked in inside scratch environment. So signing and let's start together you will see that all blocks are in different order and in different colors and are right here. So as you can see, many blocks are in different order. Event blocks specifically are the core off the scratch to control blocks, so control blocks are a little bit lighter than the old event. Blocked more blocks. He has been renamed Toe back my blocks. And is this aid off? Light red. You will see right here so you can click on the block to learn more about it. I can click right here and use it instantly to my gut, to the local scratch. Right here. So we have a new paint editor and a new sound editor. Now it is much easier to customize the costumes. As you can see, I can have a huge tail right here. You can see my cat now, or I can have also a huge said. It is very easy toe customize my costume and have a branching you got right here. You can also use the sound editor. Okay? And you can use you can a rowboat you something or something like that. You can dream to where you want shorter or have something figure. Okay, You can also hurt sound. Every my favorite is the robot and where you can change the sound to whatever you might want. So there are a lot of extra options, but the most important is that you can now make and play projects on tablets and play them all forms. You cannot edit projects on mobile phones, but you can play your projects on mobile phones and tablets like having ah, great, like giving mobile ups games for mobile. So this is really awesome. This is something. I think that it is really extraordinary. So we have also several exceptions. I'm sure for this, for the touching Boolean, including any AIDS March position and lifted. Furthermore, we have a lot of new phones. Son, Sheriff, sheriff time. So you can right here. Go and write something. Ah, I can use here my pen. And while writing right here you contains the fund toe hunt. Writing to Marker took care, Lee toe big. So do her more Chinese funds and Japanese and Korean forms. So vector painted or is now the default editor. The video sensing blocks is an extension, and you can see a lot of new extensions like texture, speeds translate microbe. It is a new extension that is really, really wonderful, and we will see in the new in the next lectures and, of course, Lego Mindstorms. If you would like to do some robotics with scratch 3.0. So pick aboard and Lego are not supported anymore. So we have also They're decent off a Polish button that you will see. And let's start right now by creating a new project, a new game here in scratch. Three Born Djourou. 3. Blocks and Commands in Scratch 3.0: Hey, guys will come back now. In this lesson, we will see how we can use all these commands in order to be able to program all the sprites that we cannot right here. So the default sprite of scratch is this cute cut. And actually, we have nine different categories off commands. This means that we have commands that he has to do with motion, like move 10 steps or 10 15 degrees to the right term, fitted degrees to the left goat running position. We have looks that he has to do with everything that he has to do with the looking off this cut or off it spread right here like saying something Fake eggs sampling, shooting the costume from costume 12 costume to, for example We can see right here This is cost him two off off the scat or next costume. The it is two costumes and it is ah, like working in this scene. We can sheets backdrop, go back to one or backdrop to our backdrop next backdrop or previous backdrop, weaken states size by 10 or, by my understand, the third of his for category has to do with sounds like sound event when the flag is clicked to start the game or when space depressed within the different things we have controlled. Like waiting, repeating forever. If something happens, then we would like to do what some commands right here. If it happens or if it doesn't happen, so we can use if else command. Wait until something happens or repeat until something other happens. So we have. If statements and loops right here the commands right here we have sentencing. We have also operators variables and blocks that we could create right here. For example, make a block. Ah, the label or at the need put, we can create a block right here. 4. Sequential Programming with Scratch 3.0: So the first thing that you can do is actually something very simple. So we can go to the events, drag and drop this command when flag isg leaked and then go to villa looks and say Say hello for two seconds and then say What is your name? But I don't want just to save is But I would like Toa ask this So I would go to the ask. I will go to go to sensing what's your name and wait and I would like to say so two looks say hello and take the answer. So I would like to go to the operators and join hello and go to the events. I'm sorry to it. Ah, sensing and take the answer right here. So I will leave a space. Hello, John or Hello, George and Dragon Dope back here. So if I'm going to click now, the command, the flag the first command will be executed so the cat will say hello for two seconds. Then the second command will be executed and then the third command will execute it. So I have a small example for sequential programming right here. So hello. What's your name? My name is Bristol. So I will write Krista's. Hello, Krista's. So here you can do. Ah, you can do some examples. And right? How are you? And then say for two seconds. Oh, I see. I am also fine. So here she asks. The cat asks our you and then whatever you reply right here, it will answer. Always see, I'm also fired so you can do some examples right here with sequential programming. What does he condone? You is actually start another program. So here I will name it. Sequence still programming, sir. Save it. Okay. 5. Learn Loops with Scratch 3.0, Building the "Ghost Effect": so I will create and u example where I will use again this cat and I will use the loops actually. So I will go to the event drag and drop when flags clicked and then go to sense to the control and use Very Ah, repeat 10 times I will take this to 20 times. I will go to the looks and I would like to change Ah effect but not color effect. I would like to change the ghost effect by five and wait floor zero for in two seconds and then I don't like toe duplicate this one and chains effect. My mind was five. And I would like to do these actually, um, another 20 times. So let's start right now. As you can see, a have a small ghost effect right here I give Ah, Have you? I used this repeat command that it will repeat 20 times the thes two blocks The 1st 1 and the 2nd 1 These blocks both won our actually repeating 20 times. These two months attains the ghost effect by five waits. Jure opens seconds and then again, it ST discourse effect by minus five and it weights 0.2 seconds. So I have the ghost effect right here. Ghost effect. Save now and share it. Try using loops. Carrie. Cost effect. Very nice. 6. The Most Popular Arcade in Scratch 3.0: "The Snake Game": Hey, guys will come back now Invest. Listen, we will create the game Snake. You probably have played this game. Ah, actually, to play, use the arrow keys to direct a constantly moving snake toward apples that appear on the screen. So Ah, the more apples, the snake, it's the longer the snake gets and the harder it becomes to keep the snake from grassing into itself on the edges off states. So, actually, you can slow down the game and the game is over when the snake grasses. Ah. So before we will start coding, let's right to play this game first. Apple 2nd 3rd 4th Okay, this is my high school one to on list sons. Okay, so let's start goading. Maybe it's easier for you. 7. Coding the Head of the Snake Game in Scratch 3.0: So first of all, go to the resources off this lesson and download the game. The snake game so downloaded and you will see that we have three different sprites. Right here We have the head of the snake, the body of a snake and an apple. So we will go to the head of the snake and we will start our game by going to the event, dragging and dropping when flag is clicked. We would like when flag is clicked to go somewhere right here to the center. So it's time A new game start. The snake will start from here. So I will go to the looks category. I'm sure it to the motion it agree, and I will drag and drop this Goto x miles 20 and why minds seven. And I would like always to point in the direction down. So it's time it will start exactly from this point. So I would like to Hughes affordable a viable score as you can see and set scored 20 So it's time the game starts. The snake will go right here will point in this direction as it is right now. And the score variable will be initialized with zero. Then I would like forever the snake to move. So I will go go to the control, drag and drop the Forever block and then drag and drop into the mosques. The move 10 steps block from the motion category The move 10 steps block. So if I'm going to start the flag right now, we will see that it takes right here and it stops So it's time. Exactly. So I go stop it right now I started and stop it. And then I will add a few commands that he has to do with Ah, the Vanska degree. So when not space but up borrow is pressed, I would like to point in that direction in ah, in the direction Let's go to the motion category Point in direction Exactly. I would like to point in the up direction. So this is zero degrees all right. Duplicated four times because I will use up borrowed down narrow right arrow and left arrow . So I duplicate four times exactly point in direction. All right, Aru to the right lift Aro to the left down aru down Very nice. So keep him going to start it right now. And you can see that I have the head off the snake and I can sayings the direction with the arrows. I will stop it if you would like to have something easier. And the only thing you have to do is chains with 10 steps. 25 step, for example. And then the snake will move much slower. So I will prefer the seven steps. Okay, Now its okay. So with the script, we set the starting point and the starting direction right here. And then, Ah, we said the player scored 20 which will create, were required to create for all sprites a variable named score that we already head. And then Ah, we, ah want the snake to never stop moving. So our program includes a forever move and move seven steps loop. So this is the first and the main script. We have four more screens that are short scripts and handle the players controls the directions correspond to the up, down, left and right. Arrow keys. So next, um, you can off course after creating all of these, click the green flag to test the code so far and make sure that the arrow keys correctly direct this naked. It was naked in all four directions. Up, down, left and right. Then click the red stop sign And don't forget to save your program. 8. Coding the Body of the Snake Game in Scratch 3.0: So now we will go to the baddest bright, and we will start holding the body. Strike the body Sprite show that we want to grow with its apple. If it's so, we will start right now. Holding it with the first thing that, uh, we I would like to do is the body sprite toe. Always follow the heads Sprite and generate clones off itself. So I will go to the events category and dragon robe when flag is clicked. And I would like Ah, toe sweets cost him. So I would go to the looks category Sweets, costume, toe costume one. Exactly. Because you will see that body. Ah, if you go to with you Because, Jules, that body, actually his two costumes cost you one and costume too, and you will see the chains right here. So I would like to change costume to caution one here to the code and then forever to go to the shed, wait for, uh, zero point one second, for example, and create a clone off itself. So I would go to the control and I will take the Forever block. Exactly. I will go to the motion and the go to, But I would like to go to head, wait for wait for zero point 0.1 seconds and then create a clone off itself. So create a clone off myself right here. This is the first scrip. So? So the regional body Sprite goat runs enter the when green flag fly clicked block in script . So as the head Sprite moves around the states, the body stride creates a trail off Batic loans in its path. So now we would like to create a second script that the body will clone the batter clones ran under. When, uh, we start as a clone in the street, So I will choose exactly this one. When I started as a clone, I would like to point, go to looks and point to a specific direction. So, uh, show it to the motion category point in direction. But I would like the direction to be, ah, to be bridal. So I will go to the operators and choose the peak random, but pick random between zero and ah, 900. Ah, and, uh, 270. So I would like actually to take this run and right here 0 to 3 multiplied by 90. This is damn Coach. I don't want, for example, something like 252 or 364. I'd like to give either 0 9100 and 80 or 270. So I will use this run, speak, ride up from right here and multiplied by 90. So I will take all these and I will put it right here. So then I would like to wait for 0.1 seconds and then two suites costume to costume too. So go to the looks category and take this one Streets caused him to costume to then wait Ah , for some seconds. But these second should be actually something that he has to do with the score. So I would like, eat cloned toe, wait for certain time based on the score. Valuable. So I will have Ah, wait. Right. I will go to the control. Take Victor. Wait. Command, Wait. Go to the control. I'm sort of through the valuables to the operators last. I will take this run. The, uh the division right here. And I would like toa take the score variable and divided by five. So it will wait for, Ah, a few seconds right here. And then I would like to delete these clones so I will go to the controlled and delete this clone drag and drop it right here. So actually, it's Apple increases the score valuable as the score variable increases the amount of time a Batic alone weights before the letting himself also increases. This bean let this longer weight makes the street look longer because more Batic loans remain on the states. So the more apples snake it's the longer the snake jets. So when score is set to zero, the weight is zero seconds. Wen score is set to one. The white is one divided by five seconds, or 0.2 2nd when score is too is too divided by five or 0.4 seconds. It's point added to score, adds another 0.2 seconds off time, resulting in a longer and the longer snake. So as the snake gets longer, the difficulty off the game really skills up. So a to this point, click the green flag to test the code shofar, make sure that the body clones for a trailed behind the snake that gets longer as the snake . It's more apples. So leak to the green flag. Play the game. Okay. The nobles. 11 to elf. I was like, Right here. 14 15 16. Okay, that's enough. 9. Coding the Apples of the Snake Game in Scratch 3.0: So So let's start with coding the apple. So click to the apple and go to the control block. Take go to the events and Suri take They went Flag is clicked I would like to set Ah set the size So go to the looks and set size to 50%. Then go to the events I would like forever to give a specific became forever If the snake that's is the up then the score should be increased by one. This should be taken from their and should be appeared somewhere else inside the screen some were randomly It's time that these eaten by the snakes So I will go to the events and I, uh to the control I go to take the forever to mount forever block I will take also they if block if go to ah sensing If that sink not too much pointer but the head If apple Ah, If you hear it, that is the apple Then I would like to change score by you on and then go to X And why I would like to pick a random number So go to the operators category and beak Rodham, you will see that. Actually, if it is going from somewhere, right here it is the X between minus 220 and the apple 200 and 30. Also the way. It's from minus 100 from 170 toe minus 170. So I will use to the speak random, and I will type right here. Minds 220 to 220 and minus 160 toe 160. So I think now it's OK. So this gold makes the apple sprite disappear when the snake that is it and then reappear elsewhere on the states. So the new position is picked from random robbers like, for example, rolling their dice. The script adds. Want to the score viable each time the heads pride That's his apple sprite. So as you can see right here nice. The last thing that I would like to do But before doing it, actually click toe this spring flag, as I did to test the code so far, move the steak around, tweet the apple. And when the snakes. Yet that is the apple. Make sure that the apple moves somewhere else. So the score viable should also increase by one. It's time the snakes head that's is the Apple show. Click Red Stop sign and don't forget to save your program The next lesson. 10. Coding the "Game over" functionality of the Snake Game is Scratch 3.0: Now I would like to add one final thing to detect whether the snake grasses into itself or a wall. So when the snake crosses into itself or the AIDS is off the states, we want to run their. When I receive the game over cold, the hits by it will say, Oh, church for two seconds and then stop the program. So instead of writing the same, go twice. Let's put the code for all grasses under when I receive a game overs block. So that either Ah, crass skin broadcast game over and ran with school. If you want to change the code, you just need to change it in one place in the when I receive game over screen. So ah, we will go to the code off the heads bright, and we will go to, uh, the controls. I'm sorry toe the event. When I receive, I will adhere game over. When they receive, game over, say for two seconds and stop everything. Go to events to the control and stop everything. So I will go then back right here. Well, after the move seven steps, I will add two if blog's so I will take this run and I would take this right again because I have to. If statements, if the kid that sees ah, that's is the EDS So if dad sees the EDS then I would like to broadcast game over. So go to the control of events broadcast game over and wait. So this is the first thing. And the second thing is when they said that's is itself. So when it that's is actually the shed, go to the control When, uh, I'm sorry, that senses when it touches color I will choose this color right here and then broadcast Broad Just game over, broadcast game over and wait. So using the touching color block, we test for the condition when the snake that is its own body. So make sure you use the color. Hey, we used in costume to for this condition. So let's go through here and double click switch cause him to costume too. So I will go back to the shed and changed Tishrin, Take this and click right here. Now it's a cave. So ah, we will also check with the next statement test the horizontal and vertical boundaries off the state when the snake crosses them the same game over protest it sent. So let's hope the player is quick enough. 12 forward crossing. Otherwise the snake will be history. So Ah, we, uh will start right now. We will pull it too. Who's here? Green flag To test the code. So far, Try crossing new go and eaten into the snake's body on purpose to make sure that the grass detection works. So if your snake appears to be grassing even though it's not touching itself or the edges, try increasing very wait time from 0.1 to zero point you two or larger. Also, be sure that the game mover code doesn't run. If the snake isn't grassing into anything, then, uh, try to play the game. Okay, let's change it. Also here, let's go to her body and sayings zero point. Okay, Lets right again, Nowitzki. Okay, let's change it to zero point for to be sure. No, it is great. Nice. Very, very nice. So this was the game. I hope you had a little fun. Actually, we read a game using as you consider it here. If statements using loops and using event driven programming where now borrow each breast. We point in specific directions. So I hope you had a lot of fun. Save the game. Share it with your friends and your family. Play the classic game snake using the arrows off your que burst. So now it's a king. So I'm looking for two senior and then 11. Developing Scary Shark Game in Scratch 3.0: So let's start right now by creating a brand new game in scratch. 3.0 so I can click To start creating it is very important to sign in to log in to scratch. So please go right here and signing with your user name and password. If you don't have user name and password, then police read this there to scratch. Because if you can if you're scenting, then you can. Sir, your project. You can save your project in inside your cloud host in scratch so you can then use it again . Open it and use it s o. I will start right now by creating a new game show. You can click here, file on your file. Them scratch will create a brand new project. And I will name this project vis carry shark game. So I would have a very scary shark that will eat other Feess inside the ocean. And it's time Ah, that the shark eats another fees. Then the score will, uh will increase. Ah, but if ah, he uh if up our face is eating funnel by the shark, then we're going to lose one life. So let's start right now. I will not use of his scut so you can go right here. Click this ex battle and the cat who disappear. So then go right here and add a new sprite. So I will choose a sprite. I will go right here. As you can see, there are a lot off Sprite. Actually, there are categories right here. And also you concerts right here. What do you want to you? So I will add a sark. I will add this SARC eso if you can go your mouth right here and over above V months, then you can see all the any medicines that are included inside this sprite. So I will use these shark right here. And then I will try toe add back states to my game. So I will go here to the back group. I will click right here and exactly the same way. There are a lot off backdrops. I There are also categories right here. So you can see what you would like to use. I will use Um I will use something like a ghostwriter. You see no ocean. Okay, this is perfect. Other water one. So I used underwater run so This is my shark in underwater, so I will start right now. Ah, my SARC will move Ah, with my mouth. So I go tell tow this shark. But when the flag is clicked so go to the events and then drag and drop when flag is clicked then go to looks Go to looks and use the ah the no sorry. Here the looks and drag and rope. So so the shark will be in the States. And then I would like to change. Ah, to shit sighs do 50 percent, so Oh too. So now it is a small shark right here and then I would like to say that forever if drug if drag and drop if if the distance with distance the seas If the decent So go to sensing, descends to mouse pointer and drop it here If the distance to march born there is greater than 10 So go to operators and choose these. Run and drag and drop it right here. And then get the instance to March Pointer right here is greater than 10. Then go back to motion and ST and point your words, mouse pointer Exactly! Right here and then I would like to move, Move 10 steps. So let's go and see where we did. As you can see, wherever is my mouse. The SAARC is going towards my mouse. Okay, so I will stop it right now and then I will go. And odd another sprite. That will be a fish. So let's type here fits. I will add this run. So I add this face and I want a smaller face. So I will. Ah, I who use this friend? No, Sorry. I will change the size right here. Toe 50. So this is a smaller face and then I go program it so that it can sh ream inside my ocean. So I will tell to my face that when to the events when the flags clicked then forever go to control forever When go to motion I would like to turn turn, but not 15 degrees. I would like to turn and I will use Ah I will use the I will use. I could go right here to operators and peak random from mine was 15 to 15 degrees and then go back to motion and click moves. I will move. Not that then I will use something smaller. Eight steps, for example. And then if on Ed's bounds. So let's right right now. And I will see. Okay, you can see that My Feess. It's moving fast. So even would like to have something that will move. Uh, not so fast. Then go and change. Then toe five steps, for example, and try again. Then it you will see that the face is not very eyes not moving very fast. So what I'm going to do right now? If I would like to change the behavior of the shark that when is close to his face, he will open smile and eat fits fits. So I will stop my dame From now I will go back to the Cirque and I, uh well ST a little bit my code right here. So I go program the face. I will click to the face to have some additional commands right here. So we think the behavior off the face. I will click to the events and I will click another when our flag is clicked. So I will have to separate behaviors for this face. I will use a variable. I will use a viable that I will name it Score for all strides when score is zero. When I would like to, uh to bitte schoen Sure, I'd like First of all, when ah flags click to set Viable said score 20 can Then forever, forever I will go to control forever if the feast Now go to sensing If the face that she's SARC So please click shark right here If, uh face started shark then I would like to to broadcast message one But I would like to change the message and do it face he didn't This is a message face eaten so it will be broadcasted this It will broadcast this 52 message And then I would like to change the score saying to the score Ah, by 10 Jane's score by Dan They didn't like to ah disappear because this face easy then by the shark So I would like to go to looks and then I would like to be hidden So then it will wait for maybe two seconds. So control No, no, I would like to coat looks so I will go to the events and then Ah, I'm sorry to the control And then I will wait for two seconds and I will go to X who will be, for example, minus 200. But I would like to be in a random position. So I will go back to the operators and click pick random, drop it right here to the way and pick Rodham from minus 180 to to 100 and taking minus 180 to 180. And then I would like to be sown. So go back to motion and click to, uh, sure, it looks and click to So So no, let's go. Game started and up. Score increased by 10 and this is again a face score is 20 at 40 50. Okay, so let's go back. I would like to ah had another face. I would like to add at, um a toxic face that if the shark eats this face then ah, the SAARC loses. We lose inside the game in the game. So Ah, we will use that shark who will use a toxic face. And we're glad some more feces inside our ocean. So always way. We will go on with all these in the next lesson. So I'm looking forward to seeing you in the next election. 12. Adding more functionalities in Scary Shark Game and finishing the Game: Hey, guys will come back so let's go on and add a toxic face. I will add a sprite. Go right here. Click to face. Ah, maybe this Feess this face is Ah, something from here. And we can go right here to the costumes and things because you to, uh, to this face. So I will change Also size I will use 60% of this So, uh, this is a toxic face and also I tend Ah, go to the name and 10th the name too toxic face. Okay. So actually, I would like to take all this code from the face so I will drag this gold and uncle drop picked to the toxic face. And also I will drag all this gold and drop it against the toxic face. So if I'm going to toxic face, I want to see that the code is copied. Actually, it is right here, so my toxic face will be moved will move inside my ocean randomly. But also I would like to change this behavior so that if ah shark, that's is the face then I would like to change the message to a new message that is shark he's poisoned. I'm sorry. Poisoned SARC is portioned present. Then saints score by minus uh 30. I would like also to Dublin. Kate Out. No, not on this. Okay, bring back. And I would like to delete off this gold and thus ST, I will create I would create a new viable. So I will go here. Two variables I will make a variable. I will name it lives and I will change lives by minus one. So in revivals I will change lives by mimes one. Then it will behind it. Because also the face is it in. So all the other is exactly the same. So? So Ah, this is what it happens. So, um let's ride to check it right now. So my life is minus one. I will change it. I will make Ah a small change right here. So I will go back to my shark and I will say that when flag is clicked, I will make another scenario right here. Well, flag is clicked. I would like to make set lives 25 So forever. So for ever go to control forever. I will take if lives are equal to zero. So operators If lives are equal 20 then broadcast. I would like to broadcast a message that good game is over. So the game is over and I will create another. Ah, another sprite right here. I will paint and I will write Game over. I will change here too, can't writing. I will. I will change the color and maybe something smaller. You can also try Pixel, for example, would like or martyr. And um tell is also good. I will use Mark your rights here. So this pride when I receive Jame over then I'd like to b show inside my game. But when flag is clicked when police so to be hidden. So so now to K. I will make a small modification. I don't like here that the score is ah reduced by 30. I will change it by 10 because I don't want to be very hard. I would try right now. So here it is. My score is 10 is against zero. No, it's then it's 20 30. My life's too the left one and finally game over. So I will make a very small modifications room. I would like to, um to change that uh, to change the behavior off the shark so that when it eats a symbol face, it gets bigger and when it's a toxic face gets smaller. So I will go here to control and I will say short events. And I will say when I receive face eaten. Then I'd like to, ah, chains, sweets, costume to shark toe a and then wait here. Zero boy, three seconds. Streets cost from eight, then to I'm sure his feats. So right here Sweets goes to a so so first of all streets costume to be that opens its mouth, then wait for 0.3 2nd and streets costume to do point A and also chains chains size by 10% . But ah, I will GOP duplicate all this gold. And I will say that when when I receive Cirque, it's poisoned. Then I would like to do exactly the same things, but I would like to change the size by Myers 10. And then I would like to say for two seconds. Oh, I save being poisoned. And finally I would like to add one last command that when I receive game over, then I would like to be hidden. And this one is something that I will cope it also to the face and I will cope it also to the talk success. So when all of this received game over, then they should be sitting. So let's start right now. Oh, I should be in portioned. Okay? It wasn't again. So no, it's, uh, again. It's bigger. Well, again, it's bigger figure. The shark is getting bigger and vigor. No, it is a really stark and the game is over. So this is your game. I think it's a really wonderful game. You can save it right here. Save now. You can also share it. Share your game with your friends and your family. Scary shark game. You can use instructions like dry to avoid the toxic face and eat as made me face normal. Face us you can. So it's your project is now shirt. You can use these scary. Be careful with the shark is really scary. So this is it, and I'm looking forward to seeing you in the next lessons with new games in scratch, 3.0 13. Building Helicopter Game in Scratch 3.0: Hey, guys will come back. So first of all, go to the resources off this lecture and try to download this. Ah, this game. Actually, you will see that varies a helicopter. And we would like to go to the next building from the yellow building to the blue beating. So what I would like to do is to program with helicopter to go right here. But without without actually Ah, I think these ah without touching these clouds. So, first of all, I will start right now, I will click toe my helicopter and I will say when flag is clicked. Then go Go to where it is right now. As I said, it takes the dimensions off where my helicopter is right now, automatically So exits minus 147. And why is 35 and then I would like Forever, Forever is something that is not used in programming into the rope. It is used in games, but not in programming. Because in games I would like a lot of things to be done forever as long as I play one game . So I would ugly use this forever. Command and tag will say if if I could go to control if these helicopter if these hot copter that sees ah dot sees color I will use scholar yellow. So if that's his color yellow I would like to stop the sound Stop all sounds So if I actually duplicate this if not touching So I will go to control I will take then not no, I will go to the operators if not start sink with yellow when I don't want to stop the sounds I want to change Why? So I will go to the motion I would like to change the way by minus one because it means that a tease on the sky and the gravity will actually Ah, we'll go. Uh will hold Ah, the helicopter to the ground. So I have to change. Why? By Myers One So I will use this right here. So the 3rd 1 will be to take these run duplicated But I will change it a bit. I don't want to. That's anything I would like to take if ah if the key up Aro is pressed. So if the up arrow expressed I would like to change Why by three and finally I will duplicate again. And if g right arrow expressed, I would like to change X by three So ST eggs by three. So I will take it right here. And finally I will be the winner. So I will duplicate this. Okay? Not always. I will take this off if I'm going to Thats color blue. I would like to to say you won and stop everything. So I will take Stop. All right here and to Iran. Not here. I will bring it. Be careful right after this If and also I would like to check forever. So I will use another run. Another scenario where flag is clicked forever forever. Beef Helicopter that sees so senate Think da cheese color this one. I would like to go back right here where it is right now. So motion, Go two x And why? And see dry Jim. So let's start right now. I reflected the flag and as you can see, my helicopter is going right here and I'm going to land it. And Taiwan, if I'm going to click again up again, try again right again. Right here. Perfect. So I like this game. I hope you also like to this game. And of course, you can name it as you want. You can save it and you can also share it. You can also click right here. And as you can see, the project is now shared. You can tell it to your friends or to your parents or to your students how you can play this game. So, Dr the helicopter to the Blue Bay Link. We found that sink the clouds and you can copy the link and then send the link to your family and your friends something that is really cool. And we will see to the next lessons is how you can play this game from your mobile phone. So and from your tablet, Of course. So I'm looking forward to seeing you in the next lesson. 14. Building Racing Car Game in Scratch 3.0: Hey, guys will come back now We will try to create a racing car game a simple two day racing car game. We're here, We have our racing car and we would like to be right here without without touching the red color without going out off our road. So in this Ah, in this game you will learn how to use the if statement, as we call it in programming encoding wiggle program this car so that it will go according to our keyboard toe our arrows in the keyboard so that we can drive this car until the exit point right here So you can go toe The resource is off this lecture and download this racing car project. And then we will create this game with step by step examples. So let's right right now clicking to this car. I will name it car. So I will go right here to the events and I will say when flag is clicked Then I could like forever to check if beef key up arrow he's breast. Then move actually chained. Why by one So I will go be I will duplicate these command and I will respond Oak entire will duplicate again. I would like to hear before blocks because I have a borrow I have down narrow. I save right arrow and I have left r o. So as you can see, I would like to change. Why by one. But if I'm going to press the down arrow, I would like to change wide by minus one. Then, right arrow. I don't would like I don't like I don't want to change why, but I want to change X by one and then taint X by minus one. So let's right now. As you can see, I have a simple game right here. I can actually change this 22 so that it is a little bit faster, but this so I will say it service and I will add one more if condition. I will say, if my car, that's his color. The scholar. As you can see, I can actually click here and click the color that I want to touch. If my car that's is this color when I would like to say to say so, Say you lost and then I would like to go back in the beginning. So go where it is right now. So I will take my car to the beginning and you will see. But when he's in the beginning, ex and why she have to Specific fights minus two zero a 208 and minus 110. So these will be my starting point. And there my car will be after that. Sing the red color. So let's start right now to see where we did. Okay? I'm going up. Left up. Right up. I lost. So again, this is the beginning. I lost. Okay. So finally, I would like to create. Okay, I will change the backdrop. So I will go back toe the first but ground backdrop one. So I will Right here. I will create at Lime. I was right here, actually. And I will choose the black color. So I will create a black exit point Something legless. So I go back, go back to my code and then I will go back to my car and I will do a gate. This So if I That's this time this color right here, say you want and then start from the beginning. So let's start right now. I will try to win, and I will. I will start right now. Okay. Oh, this is a mistake. So when my flag is clicked, my car is going right here. It is not too easy because the car is big and the road is not very easy, You see? Uh, okay, So I want Of course you can say you couldn't make some modifications, for example, to give a message right here or the car tow be disappeared or anything else you might like . So I'm looking forward to seeing you in the next lesson. 15. Building Crossing the Road Game with the Crab in Scratch 3.0 - Part 1: Hey, guys will come back now we will create a brand new game. The purpose off this game is to make the crab across the road avoid ink all the vehicles on the road So we will start creating this'll game. Actually go to the resources of this re lecture and you can download their road, the crab and vehicles all these vehicles and the grab is something that you can also use to be the spreads that are available. Ah, let available here too, to the scrap from those crowds. Actually, here it is the crab. And also there are a lot of vehicles that you can use drugs are that you can use to create this game. But I think it is more convenient actually to download Ah, this game without the court, of course, from the resources and start together creating the game coding the game. I am sure that after creating this game, you will understand in depth how it is, uh, how we can cold weaken program any different version off these games, you will understand all the if loops all the ah reputations loops, um, all the statements that loops the logic off this game and you will be able to create similar games. So let's start right now. So if you can see we have five vehicles Vehicle number one, number two, number three, number four and number five. So Ah, I will start with vehicle number five. Risk are right here. But I want all the cars, all the vehicles in this game to have exactly Ah the same scenario toe execute exactly the same code, the same command. So I will start with coding this car right here and I will start. We've when ugly will go to the events when flag is clicked I would like to hide. So I will go to ah looks and I will take a heightened Blawg guidebook drag and drop it right here. When I would like to go to the front layer, I would like to go to the front later So I will go to the mushroom and idle twos. The block Go to the front later. Actually, it is in the looks noting the motion So I will drag it and bring it right here. And then I would like to do forever so will go to the control forever. I would like to set Ah ve eggs. So as you can see, the car is doing these motion right here. So v y ah is exactly the same. And only the X dimension is What is that? The one that is changing. So I will take. I will go to the motion and I will take the block that says set X to. And I would like Toby something right here. So something right here is minus 175. I want to be right here before the start so that it is not shown. So I will type right here, minus 290. Don't worry. If it is, it is something more or less because I would like to be somewhere right here. Um And then the car will start coming. So it is not so important if you have something, something girls. Right here. So I would like to wait for a few seconds. I will go to the events and I'm sure to the control and here. Wait. But I don't want I don't want to wait for a while. Second every time I would like to bring here. Ah, something random. So I will go to the operators and peak random from one 25 seconds. So ven, I would like the vehicle to appear in my game to be sown. And then I would like to start to start a sound. Um okay. Sounds Julia sound. I would like to choose the sound from a car So he's the car passing sound and we can hear it. We can hear it. So I will go back to that to the code and idle Jews start sound car passing when I would like to repeat some code So I will go to the control and I will take Repeat until not this repeat I don't want to repeat a specific gold for a lot of times. I would like to repeat until something happens. So I would like to repeat until ah, the exposition is greater than this limit. So I will take the greater right Here is great. Van and I will take also in the motion I will go to ah take the exposition. So the exposition is more was on My car will go right here so as I can see right here is ah one tolerant 95. So I will type right here. 250. So that I am sure that this car will be right here is 250. So I will type 200. Ah, 70. Very nice. I would like to change X to change X by and here I will use. I'll use a variable that I will call it car Spit. So here it is, the car speed. So I will taint X by car spit. And then I would like my vehicle Toby hidden again. So I will go to the looks, looks category and drag and rope right here. The hide command. So finally I would like to check Ah, to check the number off lives. I will have some lives. It's time that my crab ah doesn't manage to go to the opposite and is actually crust by vehicle. Then the lives should be reduced by run. But if the lives are equal to zero, then everything should stop. So I will go to the control and idle chains. I will choose if if I will go to the operators so that I can use the equal symbol equal to zero, and I will go to variables and drag and drop lives. So if lives are equal to zero then I would like to hide So I will go to looks category drag and drop hide And I would like to stop these script. So I would like to go to V, uh, controlled and choose Stop But metal I would like to stop this script. So the C's, my blawg the sea is something that I will cope it to all my vehicles. I will take it and cope. Eight Tow vehicle number four I will also go, Pete. Toe Practical number three I go copy tow vehicle number two and I will go beat two Vehicle number one. So I will now click to the flag. And here are my five. As you can see, I have a small bag right here. Two Vehicle number five. I will go back and I will change. 270. 250 I would write again. Okay, now it's perfect. You can see I have the speak rodham 15 seconds. So these, uh these means that eats car Well, a year in a different position because it has toe wait from 1 to 5 seconds. So I will go now, I will stop and I will go to the crab and I will start coding my crab. But this it's going to eyes going to happen in the next lesson show. I'm looking forward to seeing you in the next lesson with coding the crab and finishing this game. 16. Building Crossing the Road Game with the Crab in Scratch 3.0 - Part 2: Hey, guys will come back now. We will start coding the scrub so that we will be able to handle this crab so that it can across the road. So I will start with the control. Ah, with events. I'm sure e and I will say when the flag is clicked. I would like to ah, the crab to be shown in the game so I would drag and drop the command. So and then I who use their forever command forever I would like to go to Ah, where it please right now. So go right here. So go to, uh, motion and I will use this command. So goto ex And why? As you will see again these X dimensions right here in this white images right here. So it's time my crab will start from exactly this position. And I like to set set, um, set chains level zero. So the idea is that I have different levels. The level off difficulty will increase its time. My crab modest cross the road so the difficulty will ah will be increased and it will. It would be more difficult for the player to cross the road so initially the chains level variable will be set to zero and then I would like to repeat so I will go to their control And I would like to repeat, but not specific times. I will choose this Repeat until block repeat. Until and here I would like to say that this crab should do some things until ah, vehicle, uh, thats is my crab actually crosses my crab. So I would like to repeat until ah unto I will go to San Sink that think vehicle one. But as you will see, I have five different waggles so I could use the operator. Or so I will use dotting vagal one. Or that's think very go to or touching vagal three but veces something. Ah, that as you can see, that's in vagal too. This is something that I could not use more or conditions. So what I will do is take off the starting vehicle to and I will use multiple or conditions . I will go to the operators, drag and drop right here. So now I have three slots or I will drag and drop right here. So now I have four slugs and now I have five slots. So I will use this block. And I would like to add one final or Kardashian in case my crab manage ist go right here. I'd like to check if Ah, my grab is chatting this color. So I will use I will double gate this up. I will do public eight fees. Not here. Okay, I dropped it right here. So that sing vehicle number two or chatting vehicle number three or chatting vehicle that Think vehicle number four or that sink vehicle number five or chatting color. And here of, like, to click here and then here and use the scholar right here. So all these Oh, I would like I would like to take this block and use it right here. So I would like to repeat to repeat, until all this happens. All of his heaven. So if now, Vicky, are these breast So the control Go to the control dragon, drop if block and then go to sensing and use this key breast key up arrow is breast. Then chains. Why then chains? Why? By 40 this is Ah, reach 40 is as you'll see now, why minus 161. But if my crab is going toe. Be right here. Then it would be minus 100. Ah, 100 and 11. So it is about 50. But I think it would be a little bit more difficult to use change. Why? By 40? Because if I'm going to use 50 and then it will, I will need only 23456 clicks to go to the next side. But if I'm going to use 40 then it would be something right here. Here, here. So it will be more Ah, more up arrows breast to go to the opposite. So if you're going to use something like 30 or 20 it will be even more difficult. So it's up to you to customize it for how difficult you would like this game to be. I would like to go here, change. Why? By 40. And then I would like to wait for Ah, 0.2 seconds. Something very small right here. 0.2 seconds. And I would like to Dublin Kate, actually this gold, the if code so that I will use it for the down arrow. I will change. Why, by Miles 40 and I will wait again For zero points to a second, I will double ic eight these again saints down arrow to right arrow I will used chains Jane's X this time. So I will go to motion ST X Change eggs by 14 Gen Wait 0.2 2nd and then duplicate all this if statement so that we can use it for the left arrow if G left our east breast, then attains eggs by minus 40 and wait 0.2 seconds. Okay, I think it is. OK, we have one last thing. If ah, if my crab manages to go to the opposite, we the car speed should be increased and the level variables should be increased. So I will use another if statement right here, I will go drag and drop these if statement and uh, no, I'm sure I will take off angle, use the if then else statement and I will explain to you why I'm doing this. I will use this if then else statement and I will say if ah, my crab is stotch ing the color from the opposite side right here from the opposite side. Then I would like to chains the car speed by to and Sein's the level by one else. I would like to repeat 10 times not right here, but in the else else I would like to repeat 10 times I would like my crab to be hidden. So I will go to the looks category. Take the hide command drag and drop it right here. I would like to wait for 0.2 seconds and then Toby sewn again. So it will go to the looks category. Exactly. And then wait zero point two seconds and then and then read. Use the lives by mine was one. So this means that my car is no touching this color. So this means that it is touched by one of these vehicles. So actually it will be hidden shown hidden soul he didn't solve for Europe on three seconds for 10 times. And then, uh, the lives will be reduced by one. So if lives are equal to zero, I will go to the control. I will take the if block Be careful. It is outside this Cfl's block and I will say that if lives I will go to the operators. If lives are equal to zero. I will take this equal 20 Then I would like my crab Toby hidden So I will go to the looks category. Take the hide command and stop this screamed You go to the control stop. Not so fast, these script So no, I have one final game over right here. One game over Sprite. And I would like when when the flag is clicked to wait for 0.1 seconds and then ba hidden go to looks category drug and drug We hide command and then forever go to the control forever if lives are equal to zero. So if take the viable lives And I would like to take the operator equal Tau zero if lives are equal to zero then to be shown go to looks category drag and drop. So ah, you can use that weight They wait Ah, one second or you contain this toe. Five seconds, Dr. Three seconds. Then go to ah the control and stop these script. So I think now it is okay. But I would like to go here to the States, to the backdrop states and see that I have set the car speed to two This is my initial Caspit. I have three lives and I have a level equal to one. So you can actually go to variables and issues. Ah, use the car. Spit viable. Ah! And the level variable are only the level variable what you would like? I will take it, drag it and drop it right here. Level and the life. Horrible, if you would like. And the life's rideable. So this is the car speed, the lives and the level. And now I think my game is ready. I will click to this flag. Okay, Go back to the crab and take that. Weise, if that's in color, is not is not inside. Very beat until Ah, the repeat on a deal block. So these, if that's in color, should be should not be right here, but should be right here. You should have to block church. This is the If Blawg. And this is the repeat Blawg. So now your crabs to be okay. I saved three lives. Level one car spit is too. And as you can see, here are the five vehicles. And now I'm going to cross the road easily. Level is to car speed is four. So I will go on and level is three. Car spit it. Six game going to be Carter now more difficult to cross the road. Ah, I lost. So my life's have to Now, Caspit, it's six level is for no lives. One Okay, level seven cars. But is 14 is very difficult right now. I will try and lives are zero. So this is the game. I think this very cool game and it is something that you will have a lot of fun by playing this game by creating this game. And I'm really happy for developing this game together. So I will go back. I will show again this I will name this game. Vic crab racing. No. The crab, uh, crossing, crossing very road game. So I can also file save now this game. And then I can serve this game with anyone who doesn't like toe play this game and I won't write some instructions, right? Try to cross their road with these crazy grab, avoiding all vehicles. So with was, I think a great game and time looking forward to seeing you in the next lessons 17. Building the "Witch Game" with Geometry and Informatics: Hey, guys will come back. No, this is a very special lecturer because we will have some mathematics. We will have, of course, Informatics. And of course, Google Cave kind of a game. So what we will try to do in this game is actually to program the sweets that has to go dogwoods. This line and C will stop when his an equal distance between house A and cows be. So if I'm going to give house a somewhere right here and cows be somewhere here, then if I'm going to click to this flag battle event Ah, the sweets will go. We'll go and deal. The distances are equal as the two diseases are not equal than continues to these straight line right here. So when the distance is equal between cows run and charged to see stops and says that the two distances are equal. So actually, what we will try to do is to program this weeds so that say will stop when the distance from House one and House two is equal. So this mean this means that actually ah, see, the wits will be in the point d How's Iran is in the point a and house to is here. This means that we have, Ah, a straight line here in the point d And, uh, if we're going to give a right angle between the A and B, these means that these is the equal distance between A and B, so a C is equal to she Be right here, and we have a right angle between city and A B. So we're going to start programming right now. Show that these weeds will move towards this line until the to the distance between the two houses is equal. So if we're going to hear ah, something right here, I will try to, uh, play again, this example by dragging and dropping Ah, somewhere else. So if I'm going to take house, be right here and has a right here and then click to this flag, it will always stop when the distances are equal. So I will start coding right now and we will do this together step by step. First of all, please download from the Resources Vets game. Um, you will find this game to the resources off this lesson. So leak to the sprite to end. We name it to wits. So I will go to the control and to the events I'm sure and take when flag is clicked. I would like to go to the beginning off this line. So I will go to the motion and drag and drop Goto eggs minus 220. And why to zero Where were these? Right now? Minus 220 in the UAE is 20 and then take go to the control and take there forever command and then take from motion. I would like to ah set the D stints from ah house one to a variable called D one or decent run and then take the distance from house do and set it to a second viable d to. So I will go to the variables and take the first set d one and then take again a second set and I will sent to D to. And I would like to check the distance between the sweets and the cowichan. So I will go to ah of Sense Inc and I will take the distance block, distance to house one and I will take again this block and I go change it to house too. So now I have to valuables De Juan. And they do. Do you want is the distance from Calderon? And ditto is the distance from house to So I will, uh, take an if block right now and take if these d one indeed toe are not equal. So I will today. Um there I would go to the operators and take and not block. They're not block and I will take the also the equal block. So if I'm sure for this, if not exactly if ah de Juan is not equal. So go to variable steak Guan and then take d to If d one and d two are not equal So then I don't like the weeds to say that the dude decencies are not in cual so she, uh should continue. I will go to the looks and I will take this. Um say for two seconds I will change it to three seconds and say of it too. Distances are not equals. I so continue. And then I would like the wheat to move so I will go to the motion and take them move. But not this distance. Steps are a lot. You can see these 10 steps is something very big. I'd like to move very, very smoothly. So I will change, please to something like 0.3 steps. This is perfect. Don't forget that these commands will be executed forever. So this means that the suites will move very, very smoothly. So after this moving command Ah, I will take all this. I will take this block all these commands and I will change it a bit because I don't want to check it's time If do you want and do do are equal or not. So I will take the if else command and I will drag and drop this not d one and d two being equal. And also I will take these to command. So I will use these cfl's command NFL's block instead off thes evening block. So I will take this one and now I add some looks, right heel to the else block. So I will go to the looks category and take, um fish one again And I will say this time that nice now with two distances are equal for three seconds and then I would like to stop everything so we'll go to the control and I will take this stop all And now I think it's OK so the two distances are not equal. Ice will continue. And as you can see, the problem is that the wheat is not moving. The problem is that when the wan indeed toe are not equal, then the wits says that the two days it is not inkwell dismissed right here for three seconds. And that's a very, very small movement. 0.3 steps. So I will go to the looks and I will change the sake amount with the think command right here. I will copy these right here. But I will based it. I will take think and I will take only the move Command and I will take it off. So now it's a K, as you can see. So the weeds is going towards this line. The two defendants are not equal secret. E news. C. Clinton is all the time. I wonder if she's going to stop or not. So see, win back. Okay, so there is a back again right here. Role of is that Ah, this d one and d two is not very Ah, punctual. This means that D one and D two should be rounded. So I will take it this off for a moment. I will go to the operators and I will choose the round command. So I will take round D one and I will take round de to So I shave around. Do you are equal to round D two right here and now I will try it again. The two distances are not equal. C continues. Let's see. I won't. Okay, now that produces every go perfect. So again, this is a solution. Geometrical solution A, C and C b are equal when cd his right angle with a B so thank you for months and looking forward to the next game. 18. Building an Algebra Game Solving Mathematical Polynomial Equations.: guys will come back now. In this election, we will see how we can solve quadratic equations. So let's see, what is Rodrique Equations? Quadratic equation. According to Wikipedia, in algebra, a quadratic equation is actually from the Latin quad rotors for square is any equation giving these form so X represents in a gnome that we're trying to find and A B and C represent no numbers. A should be different from zero. And if a is equal with Jiro, then the question is lying near not quadratic. These is Ah, what a lay near the question Looks like while these quad Rick quadratic equation looks like vision. As you can see, we have X one and x two. So, um, because the quadratic question involves only one and no, it is called uni variant the quadratic equation only quint eins powers off X that are known negative imagers. And therefore it is a polynomial. Our question. So in particular, it is a second degree volume normal equation since ah, the greatest power is too. So we will try to create share Ah, a problem in scratch with quad Rick quadratic equations. So I will name it right here you can name it. Of course. Second creep along mill equations. Or as you like it. And I will choose a background right here. I would like something like a class, So I will go indoors. Okay. I don't have something like a glass. Um, I will use this one. Okay. I liked So I will use the mascot off. Scratch this cut. I will not change it. And of course, you can also choose something from the people if you want. Maybe, um maybe, uh, this guy right here already could use for a fair the cut from the scraps. But I will think that I will use actually d so I can start right now calling. I would go to the control to the events maturity, but I will not use when flags clicked. I'll choose when actually ah, space key is pressed. So when space key expressed, I would like d to ask What is the A So I go to the variables and I will add viable a. Then I will go to the motion and to the looks category. I'm sorry. And I will use We ask, uh, the ask command. So this command, it's actually two sensing, ask give me if you value off viable A and wait So then I would like to set a to the answer So sit a true the answer. Go to sensing and take the answer So the answer will be the value off the variable A If I'm going to press space battle D will ask me to give the value of valuable a And if I'm going to write 20 when the a viable shares the value 20 and you can see it right here So then I would like the same exactly to duplicate it because D will ask us the value off the valuable be. And I would like to use a second available right here I thought it would be will be viable be so I would like to send a tow be. And finally I would like to ask for the value off the valuable See So as you can see a have a I have b and him also see So I will duplicated and say it's b to C create new valuable right here, See, and then said See to answer then, in order to calculate the X, I have to use these formula right here. So veces thick, quadratic formula And actually ah, I use the square root off both sides and isolating X So I will use feast formula to find ah to find the answer. So first of all, I have to calculate fit describing law So indiscriminant So I'm going to calculate this delta we uppercase Greek delta So I will go to variables. I will make a fireable called Delta and I will set delta to and use some mathematics. As you can see, delta is equal to be square minus four multiplied, multiplied by a multiplied by C So I will use re Ah I will go to the operators Take a V minus Take the multiplication soon and I will try to create these these discrimination. So I will take I will take minus and I will use also to off these. So it is be multiple light with B so something like peace be multiplied with B minus four multiplied with a multiplied with C So I will need warm or face. So I will go here It here I would take be up. No, I would take B and let be again minus four. I would type right here for a no. Here, here and see. And I use it right here. So let it I save anyth statement. If the discriminate is positive, then there are two distinct roots Two solution, both of which are really numbers. And for quadratic equations with rational coefficients. If the discriminate is a square number, then their roots are national. In other cases, that might be quadratic nationals. So I will use these Ah to right here Two equations I who take the if command to check if discrimination is positive. So I will go to the control and I will choose the If else command if Delta is positive or eat is equal to zero So I will need and or block right here. And then I will need these equal always bigger up here. But right, if Delta is greater than zero or equal to zero so I will take They dealt variable right here and then right here. Then I would like to set ex Ron and x two I will set. I would use two variables Toby, my solutions. So I have x one and x two. I will set x one and x two So x one and takes too ex run will be my news be blast Ah, the route The square root off delta So I day So I will set Textron as we construct here as mines Be so I will glass square root off delta. So I will take the blast symbol. The plus operator. Mm. Right here. Drag and drop price here. So I said my news variables I will need minds Be so I have to use a getting operator. I will take fees and I will put b ed minus one. So now I have a minus Bi, I will use this minus b inside these bloke mine was be blast square root off Delta So I will take good will go to the operators and take V sward Jane's absolute to square root off Delta. So go to the variables. Take this run. So the first solution is this. But this should be divided by two, uh by two. Most light with a so least one will be divided. So has to go to the operators. Take this one and fish one. So you might think that I need a parenthesis for all of these. But this is not true for scraps because actually eats block means that you have a parent. This is so these actually is he's something like using to parent this one right here and one right here. So this is two multiplied with a and this is my first solution. The second solution is exactly the same. But I should change this black. This a blast similar with minus. So I public ated right here I will take from the operators and my mom's side I would take here fits one and here fishermen and I will take off this plus symbol and use fishermen. So the first extra is equal with official and the second World is equal with fish one And then I should say that Ah, their roots. We'll go to the looks category and say the route Excellent ease. But I would like to join Feess Uh so I will type it right here. I control the route extra ease and then I would like to use X one and I would like a game Weise to join it. So I will go to the operators enjoyed and I will use another Jordan again. So I hear the route extra is extra. And the Route X to ease use of space right here. Go to the valuables intake x two. So I will use all of this. The route extra is Exxon, and the root X two is x two the value off the valuable extra and the value off Horrible X two. But if Delta is less than zero then de should say that there are, you know Ah, no, actually, there are quadratic irrational. So we should say that, uh, we should say that there are no really roots right here. I will go, Pete. Right here. There are no really put. Exactly. So I would try now to start these game. That is something like a glass right here. Given the vital available A I ah, use actually in equation will, I would try to google it. Five eggs plus you, five x Last three is equal to zero. Okay, I thought that I will give a social right here. But Google, it's not giving me solutions. So I will use something from ah, very basic equations. I will use one one, So Okay, let's start again. Given the right of available A. I will give one keeping the weight off What it will be. I will give one. Give me the right of the water Will see. I give one. So delta is minus three. There are no really route. I would try game. I would give a lot of horrible A is 10. What will be its five off the horrible C zero. So the delta is training five, which means that it is be square. I gave five so D's drink five mind for about five with a multiplied with C but C zero So it peas five square short eastern five and they it is Mine's be with means minus five. Last five, that is square off squared off Delta. So it is five five plus five is dead and two multiplied with 10 is daily. So 10 uh, he's actually then multiplied with 20. It is minus 0.5. Uh, the 1st 1 is ah minus B, which means minus five plus five. So it t zero in the 2nd 1 is minus 0.5. So this is how we can have resolution right here. If you would like to change the debate. You can actually put here a full stop, fall off, ascendance, and then use a space right here so you can have these two sentences. So this was, I think, a great example off out to solve quadratic equations with scratch. So I'm looking forward to seeing you in the next lesson. 19. Building "Collect the Garbage" Game in Scratch 3.0: Hey, guys, Welcome back now invests Elation. We would like to create a game where you are this player right here. And the goal is to collect all the garbage. So collect the garbage. The governments should be inside this bean. And if you collect all the garbage that you are the winner. So let's start right now. Ah, first of all, I would like to program this player so that so that he can move upside downside or the right to the left. So first of all, I would like to start by clicking to the flag. So when the flag is clicked, then go Go to where it is right now. So go toe eggs. As you can see right here my neutron 164. And why 65? So when Ah, flag, It's clicked. The players should go right here. But if ah right r o is clicked then I would like to change the x biting So change x by 10 I will duplicated and I will change it to left Arrow Saints X by minus 10 I will duplicate it again and I will use the up arrow. But this time I don't want X I would like to change. Why? By 10 and I will duplicate again and sayings Why by, uh my understand. So now it's ok. Ah, I will start by clicking the flag. And as you can see, I can't obtained. Okay. I forgot this run James apartment. And when down narrow he expressed I would like to change. Why? By 10 as you can see So it's OK. I will go back to Garbage one. I will take one off these right here. And I will also program it so that when the flag is clicked I would like to go where it is right now. So more soon Go to eggs and why you will see that automatically. It takes the dimensions where it is right now. So X is my 70. And why is my loose 146 So when the flag is clicked, it should go right here. And then it should repeat. It should repeat until until it that's is it. That's is the player. So it should move. Ah, it should move for one second light. One seconds. Okay, I will. I will try this and then I will co p with these. I will duplicate this, but I actually will take office and used on all of this. And then I rule. I will try to. I will click it right now to suit but que down into low. So this is a very random ah, very random movement. What we can do actually is actually sex too glad one second toe are not random position but to say where it should go. It should go glide one seconds. Two x my loose 200 0 Tu minus 76 and then glide one second to wear it these right now. So glad One second toe minus 70 and to my mind, was 146. So if I try right now, we will see that there is a more smooth movement between right here. Okay, so it should move all the way. But I would like I would like to do when Actually the player that's is this garb, it's It should go inside right here. So it should go toe 170 and minus 100 for and four right here. So I will click it right now. I will duplicate. No, I will drag it and drove it to garb. It's too, and then I will do the same for governments. Three. And then I will do the same for governments for and then I will do the same for governments . Five. The only difference is that I would like to garb. It's too to change it. Change minus 70 to minus 150 two times. Right Here is the 2nd 1 and the wide to minus 63. And number three is to 20 and minus 114. 2 20 and my mom's toe. One confident. 14. Go to garbage for Got about four minus 54 toe my 70 minds before Tu minus 70. And finally, governments five. He's my mr 167 minus 17 Toe my mush. 153 minus 107. Two miners 153. So let's start right now. Okay? Okay. Here it is, But I need the event were receiving. Okay, event event event the event. And here when flags clicked. So let's see. So one last. Okay? What? What? Getting out it is feeling. So when you get old, you can click here Stopfel, and actually you can create Ah, another stride that it says you want. Maybe you have something bigger, you won't. And when your general suits aids, okay. And actually, when the flag is leaked, it's would be not shown it should be. Actually, he didn't show. I click hide And when v sees despite click, I can broadcast the message So message you one and this you want should be sown. When When I received your wound when it should be showed. Of course, you can also retains where you would like to go. Maybe it's not very nice. Very ah, that they go to the same exact place. So you contains where they would like to move inside your bits. And I can actually I can't try to take all the guards right here. Maybe Astra chains that that's in play here. And I should ah, changed it. Toe. Maybe so. The color of a layer. Okay. No, it's OK. So click here. So I haven there, right here. I did not meet the stubble because I need to broadcast you want, and then you're going to be shown show. Now, after collecting all these garments, I s I in the screen will be sown the did you warn? Message. So this is a very simple game off course. You contain that you can point you contains the behavior, how all these garbage is are sewn and moved in your screen. And I think it is safe every good environmental game. Okay, so I'm looking forward to seeing you in the next lesson with the next game. 20. A Glimpse to Scratch 2 and Spotting the Differences with Scratch 3: Hi there. Scratch is a really cool programming environment that we can do a little bit of coding and create great games coding. It's really about how you solve the problem rather than learning a specific language or tool like Java or scratch show programming languages evolve and change all of the time. But at the core, the fundamental blocks off how you think don't change traditional thinking, actually, or process off for solving problems can be taught even without learning, especially programming language. The code is asked the to that facilitates solving a talents in a particular way. So we're going to do some off computational thinking and coding at the same time with scratch. And I can promise you that this process will be very funny and very exciting at the same time. So are, according talents is are built around the graphical programming leg with scrapped. But there are a lot off others out there like pencil coat that develop and locally that allows users to write programs, scratch, eliminate the need to write any fancy code or CDX and get booked down enormous off acidic. It's like colons, commas and parenthesis that early on can be a distraction to Lynn making call ships. We chose to use Kratz because we have who have had a lot of success with it in our programs , and there is certainly strong community across the world off educations. Decatur's using this tool. We also like it because you can use it in the browser. It is actually were based version. Or you can even download their flying editor into your computer. Finally, scratch is designed with learning at abnegation in mind. It's a great collaborative program for drawing cart playing music and created games, and it's also a place to experiment with mathematical functions. Geometry, graphing ing, roughing were bathed, this simulations and algorithms. 21. Creating a simple mini project.: Hi there will come back after creating our first project, which was actually we had to ascribe to two sprites working in Saudi are seen. So let's say it nice. We're going to create a new game, but I'm sure that you'll played this game when you were kids. The game is called Arc annoyed. I'm sure that after seeing this concert, you know, it's a very classic with a game. It was very classic in theeighties. We're actually we have, uh, we have a paddle which prevent the ball from falling from the playing field, attempting to bounce it against a number off bricks. So the bowl eyes trying back closes the break to disappear. When all the brakes are gone, player goes to the next level. We're another part. Turn off bricks appears so there are a number of variations breaks that have to be hit multiple times, flying enemies and power up capsules to enhance the paddle. So let's start. I'm going to give and you file in your game. Actually, I will name this game arc annoyed. Actually, I will name it Super Can night. Um and I think that I don't made Scott, We have ah toe create our back States are backdrop and then to create some sprite. So I would like to give something like, um a black ah background, something like being in the space. So I will grow some stars and they will have Ah, black background. So I go to backdrops here, and, uh, I will try to draw something very easily, create something like this so filled with color, I chose black and I turned my main scene my states with black color. Then I will take the brass. I will choose white color, and I will make some stars as being in the Daleks. I think it's something up most Feyerick. So I think it's OK. This is my back states, and now I will try to create some breaks. So I, uh, choose the rectangle this square. I think that I would choose this color. No, not this. You can Actually, I didn't do what you have done. Um and it I don't know No, no, no. I will got this. Got again And I will get my stride and I will try to It's whose rectangle. But this time I go to the 2nd 1 so that I would have a field rectangle agra to sh maybe this color you can choose whatever you want and then, ah, I will draw something like this. This is my first cost him, but it will be the only one. So if you click somewhere on your she prides on your screen and and no, I will not meet another one I will actually duplicate the 1st 1 So the first thing that I would like to do is to string Sprite one. So it will be a little bit smaller, something like this. And the second thing that I would like to do is to tabliki ated. But we will do this late. The second thing that I would like to do is to create my bowl. I go to the sprite from the library angle to scatter angry thinks and here's my bowl. So I will click to this. I would also like to shriek it something like this. And then I would like my paddle. I would rate my bottle. I roll paint in your sprite. I go to his rectangle filled rectangle. I go to something like this. Okay, I added sprite to if you would like to change the name of your stride. You will see that in the left upper corner. Seven I. And if you click it, you can't sense the name off your sprite. So I will name it. Battle. And here this I will shrink it again. So that will be much Muller. Something like this. And finally, what I would like to create is a line bottom line that will be actually game over light. And it will be beneath my bubble and ah, I will also draw it. So something like this color, I think again able to his rectangle filled rectangle. So I will try to create it in the bottom line. Exactly. Something like this. It was the battle, so but yeah, okay. I think that you have to be to make it a little bit figure You sit here, but if I will make it a little bit bigger so that I could see it, something like Bruce. Okay, so it is a little bit big, but I will place it right beneath below my battle so that it is not shown. Exactly. Everything is right so that I can begin making some scripts. So I go see you in the next lesson. 22. Starting with setting up the scene of Arkanoid: So let's start first walk. Scratch. We have to visit scratch M i t dot eu on the home. Bates, click on joints Kratz. Or if you already have an account, click on signing. Actually, I'm already signing while you're signing legal create to start a new project and they don't explore rack indo blocks into the Scripps areas and see what happens. Well, as you can see, this is our first project. And this is the name of our project. So let's name it my first project. Okay, This is them a Scot offs Kratz. It is a really funny cut. This is our scene where all the action happens. Actually, as you can see, this is our state, and this is how we'll call it. This is a sprite, and all the sprites are so there. They're shown in our states. And also we have a summary of sprites right there in the same in the middle, we have all our commands or our scripts. And in the right side you have all the scripts, all the scripts, area, for example. In this category, we have all the commands that ah have to do with motion. Like moved in steps or 10 15 degrees in the second category. We have the looks category. So how are Sprite? Looks? Weaken. Say hello, thinks something weaken. So with sprite or high despite, we can treat your costume to our next caution. Or we can set specific rife extent, size or sit size the physical degree she has to do with sound. We have toe play. Sound like now this is a cut, right? Disturb all sounds played drum for specific seconds or for specific bids. Play note, set instrument the specific level of volume and we can even change the tempo of the volume . The fourth category is pen. This actually looks like logo, so that if our cut or are Sprite is moving around are seen. He can ah save the pen town so that ah can leave its mark down to the environment. We will see an example later. The fifth category is data. Here we can make variables and with variables, we can store things like score or ah, things like our name in the game or things that we would like to store and ah, change the value later in our game. The six category is event. So would like that when the flag is clicked or when a key is pressed to do something. So all these went. Something is done when something when a key, each breast. When this pride is clicked, when loudness is above a specific level, we would like something Toby done inside Out game. And this is exactly where all the scripts are categorized. The seventh category of scripts It's Control so would like, ah, to repeat a set of commands set of scripts for specific number off times. Or Mary would like something's to be done forever. Or we would like to be done if something happens. If something happens, then we would like a set off scripts. Toby executed all we would like a set of strips to be executed if something is not happened . So if something has happened, eyes something. If you know, for example, if score is above four or if score it's less than zero, then I would like to be sown a big game over else. I would like to go war to move with my game or just toe Ah, eliminate one life so the life's valuable will be eliminated by one the next category is sensing we would like something's to be done shoulder game if we that's a specific point or if we that's another sh pride or if the distance between my mouth and the pride is in specific level. The next category is operators. I would like to add two scores or toe subtract them or to multiply them all to divide them . Or I would like to pick random number between 1 to 10. And finally, I can save my own blocks, create a block and other extension. We will see memory examples, and we will use most of them. But first of all, let's start with our basic sprite. That is it cut and, you know, by using this sprite, uh, we're actually its object in scratch is called the Sprite. You cannot sprite by choosing from the library. This is the way that we can choose a spy from the library. And here are a lot of strides that you can use in your own game or your own story. You can see we have a dragon, a duck doughnut, and actually there is library off sprites like animals, fantasy letters, people, and I think that I will add, uh, this girl every I like this girl. Well, something that used note is that it's Sprite. She is a number off costumes. For example, a nightmare Keep up. Says 13 costumes. We will see what cause Huge mean. Actually, I like this pride. So I will add this girl. And as you can see, the states takes. And now I have two sprites, so you cannot spies By choosing from the library, you can even paint to your own. I will make it try. Although I'm awful to painting. And, uh, I will add something like this. I said twice. Okay, I know that even the three years old, uh, child can draw better than me. But after old, this is Oh, it's much more awful than I thought would be. So I'm sure I, uh aside right, you can show this pride here. Okay? It's really it's awful. So I would like to delete it. Do you see this? Menus? The 1st 1 is to duplicate the soulful painting. So now I said spied too. In spite. Three. Here they are. If you would like to eliminate them, to delete them, which to ah juice the second run and click on your sprite. With the third choice, you can grow with the fourth toys. You can shrink. That's it. You can even paying your own sprite already can upload any mints. Or you can even take a picture off you from the weather Webcam. This actually is the States. This is where we can pray. View what your code does. You cannot backdrops to your states. You can start and stop the preview at any time using this grid flag. Or you can stop them with the red stop symbol at the top of the states you can name. You can even change labour ground here, and the way you did it is by choosing the States and then you can choose the backdrop the background from a library. And I think that I like this run, which is much more cool than before, in the same way as exactly the sprites. You can even create something as a backdrop by painting or by uploading from file or even with your camera. You can take a snapshot it Ah, a photo and uploaded. As I said before scripts, our co months. This is how the magic happens. Actually, you can use creeps to inscribe toe instruct your sprite toe. Do what you wanted to do from moving forwards to saying hello. Skits are arranged in a logical sequence toe program. The sprite will cover each of these in more detail as you work through challenges. So as it said, all of the coat coding happens here. The way that happens is by dragging a drogue and dropping scripts into this area by writing slips out of the area. You can then delete it. So let's make a small example. We have a sprite here on duh. Actually, I will use the event and I will say, when this flag is clicked, I would like to move 10 steps, so let's right. Nice. So you see, it's time that I click this flag. My cat is moving, but not so natural. Not so naturally. Whether you have to do is that I would like to move. 05 steps and it's time that I make step as a human being. Does it? I have toe goto our to the next costume. What do you mean? Do you see cause human cost him to call someone cost him, too. So it's something like working in ah, in my sin. So when the flags cleat move five steps and then, um, shoot its next costume. So let's right, right, Much more nuts, really. And I would like to do it to repeat these process 10 days. So let's right. Nice. Maybe 20 steps. So fruit. Very, very fast. I would like to move 20 steps, go to next costume and to wait for about 0.26 seconds. So let's right. Very, very nice. Maybe if I repeat for 14 times Nice. Let's right. Weise. 12345 Commands with Avery. Hi. Every you see, it's time I choose a difference. Pride. I have a blank new script area because I have to program. It's pry differently separately. So let's write again. Go despite one and take all these commands. Drag it and drop it inside. Avery, you see, now Avery is the same commands, but sick. These if I'm going toe, start this flag toe klik this flag, then what will happen? Every will execute these commands and at the same time, the cat will execute the same commands. So let's see what will happen. Do you see a worry going? Come back. So as I can see the costumes off, Avery are these two things. And actually, uh, it's not something like walking, so I won't take off every and I will add another spy it that has to do with every working right. So as I see, the costumes of every now is working much better. So I'm going to my cat and I'm going to drag and drop these commands. Slavery, actually, two ko p, which commands Trevor. So let's start again. Click the flag and you see, they're naturally, they are working nice. This is our first recording, our first lesson, and we're going next to create our first game. 23. Creating the first scripts (ball, paddle and bricks).: Hey, guys, go, come back. We set up the scene and we're now go to scripting. We're going to create Ah, the bull. Actually, we would like to bounce when kits the edges show who started with the bold. I chose the bowl and then, ah, I will go to the events getting good category and ah, I'll choose flag when flag is clicked. Actually, I would like to, uh, instead she ate my bowls to be in Ah, where it is right now, actually. So I would like to go toe x 19 and wife for 21 This is actually where it is right now. If you see Ah, it is exactly the center of a bull. It is in about 19 and 41. So I would like it's time, but I keep the flag to go to this position. And then I would like to turn 15 degrees so that I could have irritating bull that will move forever. So I will go to, uh, control. I will choose forever with drag and drop it right there. You see that? Ah, it's command have to click so that I have ah script right there. So I would like forever to move, then steps. And, uh, if the ball is on the EDS, I would like to bounce. This is my script. So let's right and see the result. I hope let's fight again for a nice Okay, If you would like to make the ball to move a little bit slower, we have to make it five steps to move. So it is something. Ah, slower favor. Nice. So let's go to Ah, the bricks. Actually, the big this break have to disappear. It's time that hits the ball. So Aigle twos this brick bright one. And they will say that when flag is clicked I would like to go where it is right now. So I choose this command And actually I would like toa make it appear because I will then make it ah disappear when it hits the ball. So I will make it its own. And what I would like is forever If Bo beef, uh, break that's is bull. So I'm going to sensing category. If that's his, uh I choose bowl, then I would like to disappear to hide and sent a message that this break ah is is hit so I like to go to the events and broadcast message One. I have a new Mrs name. Um, I will name it. Chipped. Very, very nice. So let's right. Oh, no, it didn't hit my break, But I think this time it will hit it. We're nice, but actually, I would like the boat when it hits this break toe also chains direction. So I will go back to both and they will say that when Ah, I received shit. Then I would like to, uh, point in the opposite direction. So I point in direction that will be the opposite. So I goto operators to the minus and that will twos 180 mines. Ah, the direction that the piece right now. Very nice. Finally, what I would like to do with the bowl is and if uh oh, it hits. Ah, Bottle. I should also point in the opposite direction, so I will go to control if sensing categories. If that's with bottle, then, uh, I would like to I can actually duplicate this command because it's a complex run and, uh, have this thing I would also like to game over, be to stop the game. If it hits my deadline, I will actually rename Spread to I will name it as deadline and then they will go back to bowl. And I will say that if it that's is with that line, then I would like to stop everything go to control, and they will to stop everything. Very nice. And finally, I'm going toe program my basic bottle. So, uh, I go goat again to the events when flags clicked. I would like to go to where it is right now and forever. I've looked to change on Lee Ah, Vieques direction. So I will go to motion. I want to change or set X to where it is my mouse. So But I have to control the battle with my mouse. Um, I will goto mouse x. Very nice. So let's it reading. Nice. Very, very nice. Okay. And then if I start like again, I have this brick and Dan base own. So I will go despite one. And I will try to duplicate this bride either by this, by doing this or even by doing If so, I will hear Sprite to then they him spy three sprite for right, five, Right, six and spread seven. Hand Sprite eight on deprived nine. All right. If nine bricks, I think I will place there, whether you can actually, uh, were less so I place there, then there in this place. It's here. You can place them wherever you want. Actually Mm. I made the mistake. I said toe the reason that this mistake was made because eat, you will see that it's time I doubling Kate. Ah, its pride, Its break. It says that it should goto x minus one for the 62 and, uh, 88. So every brick goes to the same position, and it's one above the other. So I said to ah, place them again in the right position and sends a little bit this creep so that it will go two different positions to these positions. Actually, it's time we start the game. - We were nice. I won't go to spite to on. I will leave it there. Sprite to you will save it if you go in the in the mosque a degree you give other, uh x and y. So I dropped this command and I do this. I will go to spite. Three. I will take this comment off and they will take this one. She applied for doing the same. Thank yourself. Take it. Sin Sprite five. Take yourself. Take this scene. Spread six, Sprite seven and Sprite there. So I think my game is ready. Nice. They're nice. Two more. Okay. Oops. Game over. I will see you in the next lesson. 24. Creating variables, messages and finishing the game.: hi guys will come back. One last thing that I would like to create my game is actually to create a viable well. I was store my score so I don't go to the data. Can't agree and I would click to make a valuable I will name it score for all strides and I will click. OK, so it's time that each brick is being shipped. Then I have to change my score by one. So I will broadcast Hit and I will change score by one. This is something that I have to do in old my sprites. Same score by one. Spied three. Same score by one sprite for same score by one Flight five. Same score by Ron despite six same school by one despite seven ST score by run Sprite. A chain school by one despite nine. After being kids change, scored by one sprite down the same nice that's for again Scoreline scored two Her nice, perfect nice. But as I see it's time, let Ah, I started the game with my flag. The school continues from my last game, so I would like that it's time. I, uh, start. This came and will go to bowl and I will set it to Ah, set Scored 20 So it's time I started a game. My score is zero goes to on Very nice. But if I stop it and start again and it goes again 20 Perfect. Very nice. One last. Think it's I would like to create a new sprite and I would write big Ah, game over. Mm. You can choose whatever color you want. Very nice. You can even change. Have found here something, you know, more mysterious or or gay. Me? They're nice. I will Name of a sprite came over back. And you see this here? I could go to script ID like when it is clicked. I actually would like to make it a little bit big here. It's a little bit difficult. That goes, I can That's it very easily. But I'm honestly do it. So I like when the flag is clicked. I'd like to we shouldn't. And on Lee, if the game of the bowl that's is my deadline. So the boat, if a bubble touches that line, I would like to, uh so this game over, so I won't, uh, send a message, but road cast and you my says that. But I will call it game. And then I will go to a game of Sprite and say when game over when I received game over when they like, do be So So what's right? Game over, up. It's hidden. Really nice. 10 school game over. Very nice in the same way in creating your sprite. Or maybe I will delete Sprite and I would make it easier. I will duplicate this on, but no, Uh, well, he raised it actually, and toggle right. You want you Oh, great player and I will place it pipe there. When clicked Kite when received Game one, it would be sewn. But the real question is that when the game is won't I said 10 bricks. So when the score is, then I think that I won the game. So I will go back to my brakes and I will say change scored by run. But then the black toe check if score is above one. So if score Oh is actually then. So if score he's then then they would like to send message. I will goto events, get agree and broadcast a new message called Game One. Exactly. So it is something that I have to do public. Ate it in every never sprite. I can drag and rob beat in every in every brick. Okay, I will take it from, uh, and also send it despite three. So if score is, then, uh, game is over, but I won the game. Very nice. So let's right to go toe game. I will change it. Game one. And then I will say that when I receive Game one, I would like to be shown and I would like to stop everything because the game is over. So stop everything. Let's write and play this ocean game. I see the battle ball. This car's the score goes for five, 678 Two more. I think I'm a great player, actually. Although the bow is not very fast. Well, I have to ops, so let's right to get the break. One more. Great. So this is it. Thank you very much.