Coding for Kids - Learn to program with a Dad & Son | Joshua Blewett | Skillshare

Coding for Kids - Learn to program with a Dad & Son

Joshua Blewett, Activated Academy

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
33 Lessons (2h 36m)
    • 1. 1. Programming - Why & How - Something totally unique

    • 2. 2. Registering in Scratch

    • 3. 3. Overview of Scratch

    • 4. 4. Your first program!

    • 5. 5. Motion - Tracking the mouse

    • 6. 6. Controls & Motion - Moving the ball

    • 7. 7. Pen operator - Getting a tail

    • 8. 8. Sound Code Blocks - Bringing the game alive

    • 9. 9. Additional Sprites - Controls and Sensing

    • 10. 10. Randomization - Adding real fun!

    • 11. 11. Tracking & Sounds - Adding the enemy

    • 12. 12. Variables - Keeping Score

    • 13. 13. Variables - Levels & Controls

    • 14. 14. Operators - Speeding up the enemy

    • 15. 15. Sharing your game - It's time for fame!

    • 16. 16. Summary and future

    • 17. 17. The Final Game

    • 18. 18. Downloading Background

    • 19. 19. Animate Background

    • 20. 20. Adding Pipes

    • 21. 21. Animating Pipes 1

    • 22. 22. Animating Pipes 2

    • 23. 23. Animating Pipes 3

    • 24. 24. Adding Flappy Bird

    • 25. 25. Adding Flap To Flappy Bird

    • 26. 26. Sensing Objects

    • 27. 27. Improving Sensing

    • 28. 28. Adding Sound

    • 29. 29. Adding Score

    • 30. 30. Countdown

    • 31. 31. Display Score

    • 32. 32. Adding Best Score

    • 33. 33. Conclusion

24 students are watching this class

About This Class

Who is this course for?

This course is specifically designed for people who are wanting to learn to program, especially children, teenagers, university students…oh yes, and those more mature and looking for a change of direction.

What's the course about?

“Everybody in this country should learn how to program a computer…because it teaches you to think" (Steve Jobs). Steve Jobs is not alone in this thinking. Many of the people who are shaping our modern world are saying the same thing – programming is the language of the future. This course will introduce you to programming in the most fun, easiest, and most unique way possible.

Fun…because you will build a game, a really great game!
Easiest …because you will learn to program in Scratch, developed by MIT to teach programming.
Unique…because you will be taught by a father-son combo!
You will learn all the basics of programming, and by the end of this course, you will be able to push the limits of what can be done in Scratch. You will learn about sprites, about code blocks that control them, about useful elements like sounds, randomization, sensing, and lots more. While the environment is easy to learn in, what you will learn will be amazing.

Why this course?

There are lots of courses that teach you programming…and of course, I suggest you do as many as you can. However, if this is your first time, or if you are wanting to see if programming is for you, or your children, then this is the best course for you. Why?

Firstly it will be fun! Learning that is not fun…OK, I suppose that makes sense ;-) Very step of the process is fun, plus what can be more fun than making your very first program a game…and a fun game too!

Secondly, we will be using Scratch to teach you. Sure you will eventually want to learn to program in things like C++ or Swift or Java…as these will allow you to write mobile apps. However, I have seen countless people give up because these environments are so complex. You need to grasp the basics first…and that is exactly why MIT University developed Scratch. This is the best platform, used at schools and universities around the world, to learn to program. From here your options are limitless!

Thirdly when you learn to program you to need to learn it in a special way…and that is exactly what we are going to do for you. You will be learning from two people – myself (Craig) and my son, Joshua. I have a PhD in educational technology and have been involved in technology and teaching it for over 30 years. I will give you the benefit of my knowledge of teaching – how to do it properly, and technology in general. Joshua, who is just 12 has picked up programming, by himself and is now successfully writing apps. But he started with Scratch. He will bring fresh and simple-to-understand insight into the teaching as he guides you through this learning process. Together we are going to share with you how you can learn to program and set yourself up for the most needed career of the future. Everything is going to need software to work, whether it's your fridge, watch, phone, car…all of these are programmed. Software is the language of our world and those who know it holds the key to the future.

What kind of materials are included?

The course includes everything you need. The lectures are professionally created, as people have come to expect from productions. The course is in HD video with high-quality audio and images. We will show you everything we explain. Plus in addition to this, we have attached additional exercise with solutions to the end of most lessons. This means you can try other things to see if you have grasped the concepts.

How long will the course take to complete?

There are 5 sections to this course, with each section providing short powerful videos on individual concepts. Learning to become proficient in programming takes time…but this course will give you a jump start into what is one of the most needed and lucrative careers around…ask Mark Zuckerberg if you don't believe us!

How is this course structured?

This is an action course. So the course starts with getting to doing straight away. The course starts with setting up your Scratch account and then in no time you have written your first program. The course is structured in the following way:

1.Section 1 – Scratching the Surface - The purpose of this first section is to introduce you to the importance of programming, and the Scratch programming environment.

2.Section 2 – Writing a Game – Part 1 - The objective of this section is to introduce you to most of the important elements of Scratch programming by developing a really fun game.

3.Section 3 – Writing a Game – Part 2 - This section now introduces some more advanced elements to our game and programming, such as extra sprites and random moves

4.Section 4 – Writing a Game – Part 3 - One of the most important parts of programming is variables. This section will introduce you to creating and using variables.

5. Section 5 – Conclusion – The future looks bright - In this section, we conclude by looking at how you can share your program that you have made and by summarising some of the key lessons.

Why take this course?

If I am looking for an online course there are 3 key things I look for. Firstly, the qualification/experience of the teacher. Secondly, the ability of the teacher to teach/present. Thirdly, the quality of the teacher's material. So here are my credentials.

1.My Qualification/Experience - I have just completed a PhD in the use of IT for education. I've been involved in IT both as a university lecturer, IT consultant and entrepreneur for over 20 years. This includes starting up multiple businesses both online and offline.

2.Ability to teach - In addition to having been a lecturer for over 20 years I have spoken around the world to everyone from business leaders to politicians to teachers to children. But don't believe me, here are what some of those who have heard me say:

"Craig has the rare ability to engage personally with each member in his audience" (A. Byrnes, PDM Pty Ltd, Australia),

"Craig is a dynamic speaker, out-of-the-box strategic thinker and professional" (R. van Rooyen, Associate Partner, Deloitte)

“Mr Blewett is a pleasure to take in. The excitingly focused style by which he speaks keeps you on the edge of your attention." (C. Stickney, USA)

“Craig is an experienced and highly competent teacher and presenter. He has the rare ability to convey innovative concepts in an engaging fashion that is packed with enthusiasm but also logic and balance." (Dr. Alleyne, UK)

"Craig is possibly one of the most interesting presenters I have encountered. His students love him and in public forums he is unequalled." (Prof. Maharaj, UKZN, South Africa)

3. All the material presented in this course is professionally produced using HD video, high-quality audio and specialist video editing software. Besides all this, you won't find a better value, an easier course that will enable you to learn how to program from SCRATCH!


1. 1. Programming - Why & How - Something totally unique: 2. 2. Registering in Scratch: But so the first step we need to do in learning scratch is to go the scratch website. And we can find that at scratch dot in my tea Dr et year. So this is a online developing environment specially designed to teach people programming developed by a mighty university. Right? Once you hear, obviously, if you got an account, you will sign it. If you don't have an account, you simply click joint scratch. So here you're gonna need to set yourself a user name. What did that you would like to great picking? User name is always going to just check that it exists. So we will come out of the use. And what would you like your name to? Russia? I say we should make our using the learning on scratch when scratch. Okay, then the next thing just choose a possibility. Now, as you can see here, that use the name is already taken. So we have to try again. It's trying, learning scratch. You need one scratch. All right. Cut Learning on scratch for learning from scratch. Third time lucky we've got it. Ok, now we just need to put a possibility here and retire pure parts, right? Once you're done, click next. Right. So now you want to put your month and year of birth. So, Joshua, what have you got in that? November? What years? 1 4001 and Mayo on. Then you can choose your country, find our country, someone here, the southern tip of Africa and the next. And I need to put in our email address on then confirm it next. Well, welcome to scratch. Now logged in and you can start exploring. That's basically it. You should get a confirmation email as well, so you can check your inbox for that. Okay, let's go. So in future, what you do is just simply signing with your log in details. So remember those you'll notice. Here is a message. It's just confirm your email to able sharing the programs to develop and scratch. You can share with others, but you can only do that once you have confirmed your log in email. So I'm gonna quick to do that now and come back. Right? So you email UAL notices had been email from scratch. And what you got to do is click telling. Confirm my email address and you will be done. Once you've done that, you will then also get another email, which is welcome to scratch. And there are some little piece of information what you can do next. Eccentric Citra here if you want to even learn more about scratch. But we're going to show you this so much easier learning by video. So buckle up, log into your scratch and get ready to learn. 3. 3. Overview of Scratch: Once you have logged into scratch, your user name will be appear as Richard in the previous lesson. And this is your scratch environment. Very simple scratches, a couple of started things. You could do some news features projects quite interesting to look at features, projects because you can see what others have done. Sometimes they can be a little bit overwhelming. So maybe don't worry about their future studios, etcetera. But what we want to do is really get going. The best way to learn is to start doing, and all you gotta do is create right. So now we in the scratch environment. This is where it all happens at the top. Here, you've got a name for your program. You can leave that the moment. This is where all the action happened. So when your program runs, this is where you're going to see everything taking place. If you wish, you can click appear, and it will make it a bigger for you so you can see it in big screen. But at the moment, we want to be able to see everything else at the same time. So leave it like that. This little fellows are kept on the screen is called a sprite. And the bottom area is where you show all the sprites that you're gonna be using. Your problems will spread to your little objects with their animals objects that you're going to be interacting with on. We will look at that later. But this is where your sprouts are. You can add new sprys it sprites etcetera So simple. So I fought action area Sprague area down the middle here. This is really the code of the code blocks. And these are the blocks that were going to basically put together like you're building a house and this is how we start to do in program. Now they be nasty, organized into various categories. So you concede the moment we look at motion. So the easel blocks to do with moving out sprys move 10 steps to an around, except we go to the next one. This is to do with looks. It's just think things to do with how our sprite appears with our sprouts going to say something where they're gonna change the scratch costume will look at that later, etcetera, there is a whole section on sounds. So you can play drum sounds, change the volume, all sorts of things. So these have all been arranged to make them logically connect together. So we're gonna go through some of these as we develop out programs the next bought appear. Is this sprites costume? We won't deal with that at the moment. We look at that later, but you can also apply costumes to your sprints. And also you can have presets, sound affair or your Sprite. So it's all here. It's just a matter of understanding how it works. And that's what we're going to be doing. And then the last section is the right end partier. This is where we put these blocks and essentially build our program. Our program will all be built here and would be ready. We will hit the run button and we will see the result. Yeah, so that's execute the program that could run. Stop the broader. So to recap, Yes, where it all happens, these with Sprite set, we're going to be working with you can have one or more. These are the code blocks that we can choose from. This is where we build our program and we then hit run and we can watch it happening. So that's a brief overview of what we can see here on the screen. And in our next lesson, Joshua is going to show us first program, so get ready to build your first program. 4. 4. Your first program!: right. So in our previous listen, we looked at registering and scratch, and we did an earlier scratch environment. Now we're gonna get right into the nitty gritty writing your first program, your very first program. So, Joshua, what we're gonna do, you may want to start with. We just want to go to events, and we want to use this. So what is that Winstar clicked is when you click this button, it will run through your program that you have written. Okay, so you need to have that to get to program, to write. Yes, this is exactly what you need. So to start with, we're gonna use us go down two motions, just click moves. 10. So when you start your program, you see Okay, so every time you picking run the little cats moving 10 to the right. Yeah, this is a really simple program, but so read Robert Weaver. Not Crisford. That's Oh, yeah, this is unbelievable. So if I want him to jump more steps or what I do, um, if you wanted to make it more steps, you just took on that and you can even make it 344. He's gonna jump a bit crazy after And when we kick start, you see, he moves a lot more. I guess if we might, the screen got big. So when you make this wing go big, you can see more of your program. So now when you had stopped, you can see he leaves behind a lot. All right, Cool. So that's how close Britain We have actually written a program off a walking cat. Yes, we have. And that is a really simple program. Now, to make it more advanced, we're just going to say So what do you do? You drag that thing away when you don't want it, so to defeat whatever you want from your program. That's to say, I had that just moving into this area and will delete. Now I want to see when you moved one of those scripts onto the screen so you'd move this one onto the screen. I notice what's the difference if it's just lying here or when you've got it? Apirak and I put it, Deal with it, right? So as soon as you put your program on to win start, that's when it's going on. When it's done, here? Nothing. OK, so they actually have to clip onto the top thing. It has to clip onto this. Okay, so that's sitting there by itself, floating around. It's not gonna do anything can happen. As you see, when I took on start, nothing will happen. Okay, so it's very important that all the parts of the program are cooked together that is there and do these shapes CRC. That's like a square shape which obviously matches that. Do those shapes meet anything this sets do mean anything. When we get into different for things like this, when you use the sore A program, you need different source shapes to go into each other. OK, so they so those sort of give you an idea if they're gonna clip together, said the shape doesn't fit. It means that that the program doesn't want that it won't work even if they did it again. Right, So fantastic. So that's a very first program. We have got a program working, and simply every time we click on the run button that's not too fancy. But every time we click on the run button, our little cat is going to move. However many steps we wanted across the screen yet 5. 5. Motion - Tracking the mouse: front. So what are you gonna do next without program Russia? Well, the next thing they do, we wanna move this out and just grab this. Go to mass point. So that's what's under the motion. Scripts go to mass point. Okay, so when you had play, you'll CEO go to your mouse like, Yes, I jumped right up there because that's where our mouths point it was when we had tipped black. Yeah, so when you move it back since we had play, it's running to announce point. Yeah, if we wanted to carry on following a mouse pointer, we want to go down to controls and used for others. Yes, I see you dragged it in it just clips in and their thing and jumps into the middle. Yeah, you just stick mouth pointed in forever, and that will keep running forever as long as you play eso. Now, when you move the mouse point around, so it's basically created a loop that goes around and around and around so soon as you start could clicked. It's just going to go to mouth point if we have a yes, they got little kept following us. We were we put a mouse. Yeah, as long as you have it in a forever loop, he will keep on following your mouths. Okay, so that's the first introduction to control events. And there's a whole lot of them inside here, such as weight, if else's etcetera, which we look at later. But you can see how this is useful when you want something to repeat around and ran. Ever like in this case, we want to run the program once and get the well capped to follow. Wherever we went, we needed a forever loop. 6. 6. Controls & Motion - Moving the ball: Okay, so we created our first program. There's a little program, and the mouth of the capital there follows out of a mouse. But what we're gonna do next again, Nixon we want to do is we don't really want this for the program that we're writing right now. We don't want this part, so just right. Click it and it s I see we've lost. When we deleted the sprite, we lost with the code that was associated with Yes, way did news or the codes. So the code is associated with a sprat. So each sprite has its own code that controls. Yeah. Okay. And now you want to choose a new squad. So it's a great idea else in New spark. Truthful. Gnabry, go here. And this is where all your selections are. Okay, I see you got lots of categories. Animals, fantasy. You can choose whatever you like and dispose of you. If you scroll down, you can see all sorts of different spots that you can choose. What we want is a bore, because it is what we need for the sort of program we are using. So you click on that two towns. Okay, Now that we got the ball on the program, we want to go on to control forever and f Okay, so now we're sticking, and if so, if is gonna check what we are doing. So what's I see? It's got the little shape with a hole in there. So, Horace, what? We're talking that before you need the right shape to go in there. So if we put this in there, nothing would happen. But see, this is the same shape. Lots up. I guess So. This is basically side. If a key, which is a certain key, is pressed in, something's gonna happen. Cannot change the key. Yeah, So what? We're gonna start with this, right, Cherokee? I guess that the Rot Cherokee is pressed in. Something will happen. Yeah. So good persons. And we gonna change expert Ken? I guess so. I'm imagining that what this is saying is going to be in a loop in every time the Wright era is pressed, that sprout ball is gonna move. Yeah, what we want to do, Teoh, because we have to use all the keys in the step aside. You see, I've only got one key working so when we could throughout Otago that but African inner that hours, nothing will happen because it's basically only checking for one key at the moment. So every time I press rights, it's gonna happily move to the right. But we can't go left or any round. Yeah, so we want to add a few more keys Easier than were acting the whole program. You just right click it and, uh, duplicate. Cool. So he is right. Click on the little block of code and then you duplicated and you gotta get excellent. Now, just cook on this part on. We want to use lift. So the intense X or two tens yet, but Okay, So it's moving along the horizontal X exit, sir. The press right. It goes 10 to the rotary press lift. Every goes monitoring. So when you start the program, you see, so both left and right. Fantastic. So now we've got little bull left and rot anything we're missing. That now is up and down. So we're just gonna stop this program and duplicated two more towns despite this over? Yes. And duplicates. Now we got full. We want to change these ones to, um and this one we're gonna change to down. OK, but now, Shorty, it's got X here. What we're gonna do about that? So we're gonna throw this six away and what we needed. Good. Aziz, Um, we want to change while black. In what? Because of the vertical position. So why is up and down exes across? So we get another wife and put it back. Yeah, And because it's going up, we want since wow back in. And this one we want to change about man ist an Oh, God, no. Now, when we start of you'll see, you can use up down that way, board sort of direction. Okay, so we've got a fantastical program now that basically could go in any direction that we want. So this now out of a bull is controlled by the arrow keys. As you see the bull go off the screen quite a bit to stop that. You just want to grab f on AIDS bounds and put it on that. Any one of these under for every now you see stuff with from going Okay, so basically detects that I don't even have to put it on all of them. So it spicy. Got put that into the conditions off the sprat devoted to age. It mustn't go past that. No, if your program gets a bit messy, the easiest wicket parents that is this rock collect and clean up. I get that it moves away the pieces of code apart. Okay, right. Fantastic. So we've got a first little program. There really is quite fun and easy to use. We can move a little ball around and it will bounce off the edges. And so we have got the makings off first fund program. 7. 7. Pen operator - Getting a tail: Okay, So what's on? The X program? Ended it. We've got a ball that bouncing off the edges and moving around. What can we do now? So the next thing we want to dio is we want to add another winds, start clipped. Then the next thing you want is for Evan keeps moving around that. Yes, a thing. We haven't played with pain. Yes, the pin is a really fun thing to use. So to start with, we just want to say pink down. And can I see you put that? Not in the forever loop. Why's that about the flavor? Uh, you don't really need pain down in the foot revenue, because it only has to put it down. What? Once it's quick pin comes down, it doesn't have to keep saying pin down. Okay, that makes sense. Okay, the next thing we want to do to make it a bit more fun as we want to change the pink color but zero point fat. What does Sami So every every few seconds, you'll notice the pain is color. Stand to change. Interesting. So we just put that over there, and when we hit play, um, you see the pin. Cool little bully. And it's drawing as we move it around. Yeah, Okay, Just to make things a bit more neat, you wanted to clear the pin, so just put it in front of your program. And every time you start your notice, it will be, uh, suffer putting clear their clears the pages every time we restart the program. Yeah, I guess a cool. So that little piece of code Now we've got a pin at little ball. It's moving around using the left, right up and down arrows. Now you've now added another piece of code that is saying that as a spin moves, it's going to be drawing essentially. So what we've looked at here is we started to make use off quite a few of the different elements. So we've used emotion elements. We've used our control elements. For example, the forever loop end. Also, the if and now we've used another set of elements which is up here again. You can experiment. There's all sorts of things that you can do year. But at the moment we've got a final little bull that is moving around the screen, and it's not going right off the screen, but it's allowing us to draw. Okay, I Last thing we want to do is just to become start for a gram. You notice the boys to some aside the screen or something. So it's really easy. He's Septus, get another own start and just get emotion. Andi, when it starts, you just want to say, Go to exposition. Um, changes to Zira on weapons is and we also want to change it to zero. So now every time we stopped, the ball starts in the middle of the screen each time. So I'm not all over the place, Okay? So slowly but surely really are getting our program to be nice and neat, and it's doing some really fun things. 8. 8. Sound Code Blocks - Bringing the game alive: Okay. This is lots of fun. I'm enjoying this. So so far, we got a bull changes color. It draws. But I've got something fun I would like. Is this possible? I don't have this. Is is it possible that when the ball, like, say, for example, touches the edge makes a sound that'll be cool. So we got a bit of, like, audiovisual gonna sound coming, and that is possible. And it is a really easy thing to do. So all you really need to do is go back here, grab a forever. Okay, so you're using it through with a win click that you've really got. Sit up there. OK, there was the one that sits in the middle on DWI. Just want Okay, So I presume this is an If to check that on the edge somehow is going to know how we can use x and y to find out if it's on the way. We're gonna actually sensing that's right over here. Okay, so we haven't looked at this before, so there's the area court sensing, so it senses different. Thinks this is a really easy way to tell taxing something, cutting a color. So What we want to say is if we catching the age, let me follow you here. So basically reviewed it. And now we've gone to sensing I see these all sorts of things you can sense, like mouse don or distance to, or even color. But you've chosen touching. And then I saw that you then could choose all sorts of things as to what it would be touching a mouse board to devote. And so we have decided if it's touching the itch, Okay, something's gonna happen. Eso we want is the sound. I can have a gun in the sound script script and just play pop sound this one. And when you put it in the program and you could play, um, when you move cook, this will play the sound fantastic. That was really easy, sir. Now we can have fun So we never touching something worth in this case. We never touch the age, The sound place Can you change the sound dated place? You can change the sound. You can even download the own sounds if you want, but this sounds see so you can record a sound and put your own sounds. And if you are You are there Lots of things you can play an instrument be You could play the drums if you want. So play pop and the drums When you could pray, you can hear the drugs stay. We could I could make my own band. You could eventually do that. Okay, fantastic. Right. So that little extra feature now we started to develop our programs got a little bit more interesting, not only as a drawing, we've now brought in sound aspects to it as well. So if we just look at what we've done here, it's all being quite simple. This area is again just gotta forever loop. We've now looked at a new set of scripts which has to do with sensing they were found under the sensing area and under their weaken sense, whether we're touching age or various other things that could be used for sensing so you can really experiment. And then we've moved across to using sound scripts. And so he had chosen to use two of them. Play a drum, begin You can experiment. How long the beats gonna play or you could even play on sound program is really looking good. Now 9. 9. Additional Sprites - Controls and Sensing: right. So we got a fun little program. So far, we've got a ball. It's doing all sorts of fun things. It's changing colors. It's making Sounds like Can we move this fun little game there were busy developing up to the next level. What we need to get the next thing we want to do is notice back. Okay, so I see you. You cooked on. You didn't click on? Yeah, where you can choose from a library. You actually clicked on paint New Spratt, your fitness. But if you want, you can find it in the library. You can make your own spot, or your third option is You can upload a spark. So you're gonna make your inspired. Ok, that's fine. Let's see how you do that. Guess a disc like, yeah, this is where you draw squares. Okay. We want the color away like that. So just we just won a small sort of thing, Like about that sound. So you're drawing a red rectangle? Yeah. Andi thing we want to do is just sent to it. It house us later in the program. So once we've done that, I guess I see it's really put their sprouts onto here. And I see it. The bottom. It's called Spratt one. So now we've got to sprouts. We got ball, which has got a whole lot of code associated with it, and this will sprout with just drawn, which has got nothing on it. Okay, What we want to do next is, um, and another Windstar collect and we want for every leap andan. Okay, what we're gonna do everything way. One after sense efforts touching or its land has gone through today. Okay, so you can actually make the sprouts since each other. So that's quite for a game. So that ball touches that red rectangle. We could make things happen. Okay, So when we go and since it we just want to say if touching, it's got an extra one. If we if we look the RC Originally, we had just touching edge. Now we can even choose. Now it's touching one of the other sprites. Okay, Every time he added scrapped, it will come up with a new thing touching. So we want to say if catching spot one, we want it to say, um say well done. Okay, so you've got a little thing that allows you to say something, and it's going to say Well done for two seconds and in the last thing we want to do just to stop with the program. Is this safe stop? Okay, so what's that was going to say, Well done. And basically, they my pregnancies, The game's over. Yeah, that's a game of Okay, so let's see what I got now. So when you start, you see just it's drawing with different colors that make sounds when you go off the edge. Okay, As soon as you hit that well, dying to second later, the game, it's OK, so that's very cool. So our program now is getting quite sophisticated. We can move around, gotta have fun, little sounds. And now we've got a extra sprockets. And soon as we touch it, well done and the game comes to an end 10. 10. Randomization - Adding real fun!: I guess the problem Looking good. We've got a fun little ball and we've got another spry disease something that we can do with his other Sprite. So we want to put some quoting to the spot away cards on the ball. It's now or the courts just in the ball and the sports not doing anything. So to start with, we gonna as always, just put a when start Let now we want, um emotion eso we're going to say go to emotion. So we're gonna say go to eso when you started Just go to this point forever But we wanted to go to random places on the screen So you want a little sprout Won the rib ripping off to jump around? Yeah, so we're gonna use it randomly. So what you dio has had to put that s ou replacing the number reduced to say go to some number. It's a number with a random number, so it's just gonna select this randomly and it's gonna choose wherever it wants to go to sleep. So the screen size is basically to 40 across and 1 80 happened down. OK, so it goes on exes from minus 2 42 plus two x You were gonna make it minus 2 40 and and 2 40 And for why? It's only 18 t and U minus 1 80 God. Okay, as you see when you start it go a bit crazy and events The minister What's happening out? So it's running around like a crazy thing because we've told it Sprout one is going to go to X and y in X and y are now random number Somewhere here I can't just kick clicking around and then on the ball We had said that if the ball happens to touch, sprout one well done and stop all so that's basically why it eventually stopped. So if we run that again, we're going to see a jump around At some stage, it's gonna black hit the ball Well done. In a couple of seconds later, it stops again. So that's not so cool. We wanted to do not go so crazy. So you have to do scrap control and wait a second s in the loop. It's just gonna wait for it so you can change how long and weights. So everyone sick and now it's going to start to move. Yeah. So now you can try and catch it. We could try. Catch that. Okay, here we go. So now we've got the makings of quite a fun little game going here. So whenever we want the object of the game now is cannot catch the red rectangle. Come here. Come here. Can you can? Yeah, I can get you. He's a sneak. I gotta just by pure luck, right. So we started to develop the elements of a game here. We went out board, and now ball starting to interact with another sprite which also can have code associated with it. 11. 11. Tracking & Sounds - Adding the enemy: rights are games getting more and more exciting? What are we gonna add next? Okay, well, of course, every game needs an enemy and a purpose. So we are gonna add an enemy into this game. But before that, we just want to change a few things up a little laugh, Teoh, help not touching this red thing. In the beginning, we just gonna, um when he started, instead of going to the middle, we're gonna make him go here. So it's a X minus 220 we're just going to say, what Monness are we going to say, minus 150? I guess that's gonna make the starting position of our ball on the Lipton bottom side of the screen. So when we start, you see the ball would to start right here. That helps us a lot for not start in the middle, and that's more likely to appear somewhere here. Um, so now with the enemy, we just want to Addis fact to from La Brea and scroll down a bit and totally find something you can use. We could will use this dragon for this one. Ah, scary. Dreaded. So the struggle is a bit too big right now, so just make it a bit smaller. But this going over with deal a mouse and, uh, about that to be fun for Dragon cannot see. So there's to the dragon one A and one B. What does that mean? Eso You can use this a lot. When you sweets costumes, you can use it. A new code. You can say 70. Switch cross human. OK, so these are so this sprout has got to costumes, advice? He's got two different looks that could have lots of these facts and only had two or more questions on somebody have one. But this one has got to so we just want to make both of the costumes small. So it doesnt funny when you checked So you want to look around the same And this is what I was saying. You wanted to be basically in the middle. That's why I said you must always learn up your costumes. Eso when they switched, they appear the same place. Yeah, so they birth at the middle and we can get back to the script. Uh, what first want to get is a nonstarter and then we just want to get forever. Okay, so now I can see that you're doing all of this on the Dragon's sprite. So this code is co there's going to be controlling out Dragon. Yeah. So this is the enemy and the purpose of the game. So to make the dragon track catch after the ball, we just want emotion. And we want one of those. I guess you purpose here is the dragon's hunting. The bull and the bull has got to get to the rate black before the dragon gets the ball. It's very message. So to start with, we just want to go to sense it can't visit the moment. You got glad, but that's the dragons. Is Gladding randomly when you start, Dragon will Just glad to waive that point is okay, but we want the dragon to blood towards the ball. So you said Okay, so that's a drink. OK, That's not how we gonna get the dragon to hunt the ball. Just look down here and you see Exposition off dragon. We just gonna want to change that exposition off. Bull. Now when you play, you see, he regretted Exposition of Ball. But the work was this in one piece of the ball. So we just want o get another one of those and say, why opposition off bull. Okay, so I see. So the dragon is gliding all the time. Every one second, it's moving towards the x and Y position way over the borders. Yeah, so as you can t a dragon this chasing us right now, But when he catches us, nothing really happens. So we're just gonna add some, Stephan, What we 1st 1 ad is going to looks and, um, you actually, we first want to add a sense it so it will know when it's setting it. So, um, gun control f catching, um, the bowl. Okay, so that if the dragon touching the ball, we want Teoh say we're gonna have it say, uh T Okay, so now when the driving gets to the ball, that will say, you lose. So when we stopped the dragon well, one day, So when the dragon vincey catches me, he will say you lose. But the program keeps, um, playing on, like caviar because when we touch the retrying rectangle that stops. But at the moment, we've got to make it stop when the dragon catches us. So we need to do is going to control and stubble To make this a little bit more fun, we're gonna get it to change its costume. Eso just gotten the looks and we're gonna say change cost you Teoh draggin. Um, we're gonna put this before you tens costume Teoh a dragon one b. But before we say that we always need to set it back to its normal original costume in the beginning. So u s so that it starts with the original question. Yeah, so just in the beginning, desperate right there Because I understand. So what's happened? It starts. The dragon starts with this costume, it chases us. And once it touches us, it's going to switch to a different question. And then it's going to say you lose and the probe is gonna stop. Okay, Let's see this baby. Right. So, as you see, when the dragon catches us, um, you lose and it will be Breathe fire on just yes. To make this even more fun and more direct dramatic, we just gonna add a sound you see, right now the dragon probably want we want to make this a vicious. So we have to do is to record, and it will be right. Yeah, OK, so we don't have a rule. I guess we're gonna make a rule. So we are going to make a wall, so just click this button right here. Wow. Oh, wow. Cool. So when you put it, what s so that we've got a little bit of a gap PRC coming, coming in. This make that sound so doesn't have that PC. Yeah, it's really easy to do that. You just you just You just have Teoh drag along there and you just cut that piece off, okay, now, you see, get to host radio, and then we just going to script and play, Uh, right in the beginning when it touches a bowl recording one. So now you see winning the dragon touches the ball. Um, he will make contested. So the game is not really develop it. We've got to reach the read rectangle before the dragon catches us. When the dragon catches us, he changes into this vicious, fire breathing dragon. And he does own a mighty raw 12. 12. Variables - Keeping Score: Okay. The game is developing nicely. What's the next option? What we're gonna do to make this even more for the next thing? We are slowly starting to get more advanced. We are going into data, and we're going to make a variable. Okay, so let me just quickly explain. Variable is something that can store value. So, for example, a score a position. So in scratch, you can create variable several store values and particularly what we gonna do now. Things around scoring and around counting. And all you need to do is give them a name. So I see you got two options, Jeff. For all sprouts or for the Sprite only. What does that mean for all starts at when you can't look with available When it comes, it will let all the other sports know that the bear was trained. If it's only for the ones, but only because And I need X fraud. Concede that variable. Okay, so what are we gonna call? Okay, so we've got at variable on recording at count, and all sprouts are going to be out of see it. Okay. So, as you see already, give your whole or absence do it this variable Because now we under now see, we under the data part of the scripts. Now, as soon as we created the variable, it's now listed a day, and it's given us a whole lot of other options that we could do with the variable we can. Now we gotta variables. We just gonna drag count onto the screen on the spot one, I guess you gotta make sure you on the right, Spratt when you're doing things you want to make sure under the backs back. So we just want to get count on and we won t uh, actually chains compa one. So just get up when start. Eso knows when it's clicked and we one another forever. Okay, So if we wanted forever, um, catching get under sensing forever if catching bull. So I should be trying to check if the ball and Sprite wanna touch it. Yeah, so it's touching. Then we're gonna change count by one. Okay. Okay. So we're trying to do is try and know what Our scores. I guess it's run this every time we hit the bull, we should be starting to gets points. Okay, cool. What we want to do as the dragons. We haven't positioned the dragon. So you have to do is when it starts. Just go to motions, Okay? You try to put the dragon and another spot. It doesn't stall on top of us. Yeah, so we're just gonna make him start in the middle. So we're just change this to zero And there because that makes more sense to the dragon starts in the middle and how ball starts in the bottom left. Yeah. Okay. You just, um don't start the dragon in the middle. So disappointed to hear, and you can see he's already gone to the middle. What is good? So now he will start still Gross. You just got to kind of start a bit already and we can try to get this fool. I don't know how You ready? Oh, yeah. It's going up to 37. What? That the school seems to be going crazy. That is because we touch this for quite a while. Said I would just got crazy eyes, even if we touching it for a couple of seconds. Is this guy unbelievable? Sexist? Quickly. Fix This mistake we have to do is wait a second, so just put away to second in an incident. Okay, so it's not gonna change the camp one. Every microsecond, it's going on. You change it if we still touching it off the once and now you see if you can touch it before the drinks before the dragon get to me. Well, going from 37 to 38. Yeah. So we also want to see it. The school Teoh is there a in the beginning, So just say 60 restart the guy starts. Zira. Now, when you touch it, it will only take about one. And then the driving got us a dragon goddess. We also want to take out stop. All because we don't want to program to stop when we catch it. We just wanted to keep uncounted. Okay, so right now, if we run it, all that's gonna keep happening is our school is going to keep going up. 123 Unless the drinking catches us before we catch them on. Useless yet? Yeah. Let me show you how this game is played. I get help. Get that. Get that things because one e one points go state as they, uh e got to imply that the world record exhausted. You could see what I guess in my top school there is, too. So you're getting the idea we exceed producing quite a fun game. Now we've got that the Dragon Chase game. We've now added a whole another aspect erred, which is a variable which is keeping count. And so we're not starting to see that this has become like a real game. We've got scores and possibly wreak, even pushes to something beyond where we have levels. 13. 13. Variables - Levels & Controls: that this game is getting to be quite fun. But just a This is what I want at the money we got account which is sitting over here and each time Ah, little ball touches Sprock one, which is ah rectangle. The count goes up and we've got Teoh do that before the dragon each us. How about this? What I want to happen is to introduce levels. So let's say, for example, I must catch the red rectangle three times. And after I've courted three times, I didn't move to say level two. Can you do that? Yeah, that's sexy. Pretty easy or what we want to first Teoh is make another variable. We will call it level. Okay, now that we've got this terrible again we wanted for or spots so everyone can know what the variable us We might wanna work with different spots trying to know this prayer book. Can I see your daughter? It puts both your variables on the screen there. Can you move those those around someone? You don't like them there? You can move it around. We can make it bigger if you like. You can even go like that If you just right. Click it, then you can make it a large readout on or no movie duck. But right now, so we know it's counter name will keep it like that. But to start with, we want to know if the count equals three way so we can change the label. So we just go right here to data on. We want toe put it under, um, a spot one. It doesn't matter where you put it. Really. But, um, so we'll say because there would be need to sit at our level to live a one to start with. You will save deliver one to start with. So we don't want to be a very deceptive one. Okay, so we dragged it out with So what can remember always to start with level. What? As we say with come, you start with zero coming with that rot. Okay, so we wanted to skip get that and forever. So get grabbed forever. And so we want f count. Um, go here and go. Oh, and operations, because we're gonna check What very the count is that? So it's reached three. We gotta change levels to check that we just oneness get this equal. So we will say F count equals three. We will change the level so we just go here and put it over there. So now count equals three. We were trying to change the level so we'll change level by one every time you get three. If I can get to three and be that easy way haven't even got to Once it got, you could do it. Do it No one. So I'm never one. Maybe maybe you're not as good as me Other guy could get. So let's see if we can ever get to the next level. Got dragons are very He's a vicious fella I got do Oh, what, any one more chance? I feel like a comfort. I could make the dragon guy dizzy. The red thing is going straight by him or why level's getting crazy Eyes going because it's system Keep on changing the level by one. Can my counsels to going up to force. Well, see? Okay, you can't have gone to four, so it's only miss changed them. Want to stop it from doing that? We just want to sit count to zero is all we want to do so to do that, we're just gonna go here. Sit counters. There. This is why it is going so crazy. Because count is always at three. Okay, so that's gonna move our little up. All one, and it's gonna reset. I can't t zero now. I get it anymore. But, um, the camp should shouldn't deliver. Shouldn't go absolute crazy when you get to level three. Level two. I got blood. Where is it come to be, baby three got moved up to get one more time, I'm gonna get a level. 14. 14. Operators - Speeding up the enemy: Okay, so I gave us getting quite fun. At the moment. We've got counts and we've got levels. But hacking we, like, do one last fun thing to really ramp things up. How about each level? Get hard. What could we do? It's never good. Harder. Okay. What we need to do is just to make it. We're gonna try make this dragon get faster each time the level gets up, because at the moment I see glad one second. So we were trying Make him glad faster towards us. Yeah, we're gonna try making black prostitute waters, so just get this level and operations to. But so I just put a device level over there and put it to one because they didn't understand. So you've got one divided by level. So on level one, that's gonna be one divided. About what? Us everyone in each time you get faster so we can get it. Teoh, be 1/2 2nd because when I get to live to be one divide about two is 0.5. So it's not Gladding at for only half a second to get to me. When I get to three or four, it's on your quarter of a second because that she's gonna move quicker. So we're going to see how hard this gets when we get to level two. Might I suggest, in order for us to have some chance that we change levels after I catch the the little sprout twice role in those three times is a bit too much to catch changes to class says if I could touch the red rectangle to us, I could get to the next level. But the dragon's gonna get crazy. Yeah. Okay, so is it ready for me to give it around? Yeah, I am ready. Action. If I could just get to it once. Andi And she's going crazy, his kind Craxi's on me like a rest. He I I I just literally actual just got to level three and he got me. So that how your program this is quiet. Awesome program. You can tweak it as much as you lack and make it more fun however you want. Okay. So really, I mean, we could fiddle with all sorts of things. We could make the count, not have to go as fast. We could obviously go back to Dragon and changed. How frosty he glides towards us, etcetera, that we really got a cool little program going now. And we've got the elements of a game, I reckon, Josh, that could make millions of millions. Yes, I'm pretty sure that people could take this game and put it online, and who knows? 15. 15. Sharing your game - It's time for fame!: so I gave is complete. There's so much more that you could do. What we might want now do is you may have noticed the game constantly. Whatever you're writing does get saved all the time. But obviously we want to give it a name. So what, we call this a dragon chase? Yeah. Have you that? Okay, so our little game is going to be called Dragon Chase. And over here again, you can save now where you can, which is doing all the time where you can save a copy off your game or as a copy. What's quite nice? If you say it is a copy, you can create multiple versions of the game and start to edit it and try something different. So you don't actually lose just this particular game. So you could keep this game and encircled, like to create another version of it, Right? So what you can then do is you can go and look at all your games or what have you Britain go to my stuff and you'll see it's got your project. So there's our game. Dragon chases there. It's not shared so I could share it. And any gain there to any project or programme that you Britain. If you want to look at you, basically just recorded C inside and you can go back into the program again up on the top right here, you'll see there is an option for you to share Dragon Chase, which we're going to do so we're going to click share so this particular game will be available for you to even have a look at online. And what's quite fun here is you can give some instructions and details about this guy. So all we do here as we put some instructions about how to play this guy so you can put instructions, you can put notes and credits, and then obviously you can put tags on it if you want, so you can say it's Ah, it's a game. You can enjoy tags as well, if you like. It's an action game of what? If you like so adventure for quite a while, so you can add drawing tags. And so now your game is here. You can see if other people have seen heard if other people have liked it and they could make comments about your gay But obviously that's totally up to you. If you want to put your game out there, it's quite a fun way to let other people see your guy and for them to get to use it as well . 16. 16. Summary and future: right, So I got in his ear. It's out in the wild and at any stage we can go back to see inside. So just a quick recap off what we've done. We started by looking at our scratch environment. This is the area where our games can run. We can maximize it, so it's the whole screen. But everything happens in that area over here. Our sprites we can upload owns France if we like to Sprouts from the sprouted already exist , etcetera, or even create a sprite. If we like. Each of the sprats has various scripts that must act on the Sprite, and they're shown on the right and panel. So at the moment we're on our balls frights, and we can see the various scripts that all being activated for our balls fried. If we click on the next Sprite, we could see the scripts there are activated for that sprite in the safe to the dragon. So our particular game has got three elements. It's going out bull, which is essentially need to move around. So what Joshua did is he created these four blocks of code at the top, which essentially whenever the stocked button is execute. It starts a loop and keeps checking which area you're pointing left to right, etcetera, and it allows us to move up all around. Then he started to do some other things we wanted to do without ball. You wanted out ball to draw, have a trail just for fun. A little line about it. It had that behind it. We also had an objective. And that waas that when the ball touched the rid rectangle Sprite one, it would say Well done. And we also had a little sound thing that we put in that would make a sound every time that sprouted the each. So you could tweak this. You could make it make a sound when it hit the other sprite or whatever. Looking at Sprite one, we had various aspects here. The one aspect was we started to create counts and levels. So every time this sprite was touched by the ball, we wanted to change account up by one, and this was using the concept off variables, and we also wanted to create levels. Level was also another variable, and so when the country's two level would go up by what and also the other element of Sprite one is it needed to jump around randomly around the screen. So we used a random number two position the X and Y coordinates for the Sprite. So just those two sprites together the boar would chase the randomly moving red rectangle. If the two connected, it would be a message, and our count and our liver would go up to add a bit of adventure, tude and excitement in the Scott. The adrenaline pumping is just you're not playing the game we brought in the dragon. The dragon essentially has one major piece of code associated with it. And what happens is it is moving towards us all the time. So it's moving towards the X and the Y position off the ball Now. That was quite fine. It would keep moving if it ever touched us. Here we go, touching the bore. It played a sound. We showed you how to do that with the recording, and we also show you could switch costumes for the dragon so changed to the scary fire breathing dragon and said you news. We introduced the concept off levels and we wanted each level to be a little bit more difficult. So rather than just gliding for one second, you wanted it to glide quicker to our position. So each time the level went up, it wanted to glide for half a second, etcetera. So we created a from formula, using one divided by level. And so it became harder and harder for us. Ticket too high. And I think their record for us the moment is level three. So that's this environment. And there are so many wonderful things that you can do with a Josh. Have you got any more plants? So if you found this easier, we can make some new videos, and I can really cook it up. Not to make a lot more advance to look after probably years on scratch and other different programming environments. Right? So you heard it from myself, Craig on from Joshua. This is just the start. You've enjoyed this Well, we are gonna be producing some other tutorials on teaching you how to program both and scratch at more advanced and intermediate and advanced level. And it was other environments on the iPad, etcetera. The program has got huge opportunities. If you get used to it. Learning to program an environment like scratch will set you up extremely well to learn to start programming environments like Swift for IOS and for the iPhone and in android environments. And that's where you can start making some real money, just like Josh is. 17. 17. The Final Game : right. Welcome to the second part. Off course where we're going to be looking at building our flappy bird game. So if you've been through part one, you've learned about a lot of the background. You have learned about the various aspects of scratch. Just an introductory level. We've looked at various aspects, like motion and sound pain and control in the various commands that you can use as you can see down here. This is our design area on this is where we see our game getting played. But just to give you a little bit of it taste Josh is going to show you what your final products gonna look like. Okay, so after, like, this course, this is what you are made. It's very similar to factor residency. So when we start Granillo birdie and you can see how, like you just got a doctor post and then you die because your school your hospital on your current score as well. Yeah. Get so you see, it's gonna be quite a funnel game. You have. It looks like you actually flying like the backgrounds, moving a little bit of flies on and on the right inside here you're going to have your code . Don't be deceived by what you see there. You'll discover in the course that code is associated with each of the various sprite to be have year. So there's code all of those things that we're going to show you how to do all of that. So this is the game that you're gonna be building. Very exciting game. You're gonna build your own flappy bird on that, see if you can get a high score off greater than 34. 18. 18. Downloading Background: the great day has arrived and it's not ready for you to build your happy bird game. So be starting with a clean screen. So we have started with a file new so you can create a new scratch. Programs get rid of everything else you had, get your screen clean screen ready, and we are going to begin this process. The way we're gonna do this is we're gonna take you step by step. So as we said earlier, you need to follow along. Don't just sit. There are No, it's fun just to sit there and watch the movies and eat the popcorn. But the real learning happens if you get involved, so we'll keep each video quite short. We're just going to show you one little aspect and we're gonna keep enhancing the game and building it better and better and better. So you should have your screen looking like ours If you haven't go and do it. What you waiting for? Don't sit there just staring at the screen. Come on, Get your screen looking the same. His house. We're watching you. We are really Okay. So you ready? Let's take it away. Okay. So want to have created Well, you can't remember all of that code. Or if you want to keep it, just save it and create a new one. You always start with this, captains, you know, So we don't really want their cat for flappy bird. So you're right. Click and then you delete it. And now we got no sprite. We are strike us. And we can also name a project Flappy Bird. Okay, so call it whatever you like that we will call it lucky because it's lacking birth game. Okay, so once you've name that, you don't have to, but it's always a good thing to do when you look at your projects. Um, we want to find an image for Flappy Bird game Gesell that we doing now, as we've opened the tab on our browser. So just up another tab, whatever browser you're using, so you just see were two tabs. Open this one. We've got our scratch program and we have been another tear. We're gonna go to Google, and we're going to start to search for an image. Okay, so I'm gonna search for Flappy bird background. Okay. You see, if you're using Google, you have an option to click on images and you see lots of different images. People have got. We want something a bit longer. So now you something like act for flappy bird. So your act like it, you save image as. And if you want to, you can create a folder for flappy bird and scratch. I've got a photo over there and we can score it, you know, let me bid background. Okay, so there was a really simple process off. What? Joshua is not done. He simply has gone into Google. Search for inappropriate image. Find an image that you like to use your background because this is going to give the sort of illusion that something's actually happening. That little birds flying past interesting background. Look it later. And then, as you said, you just right, click it and save the images. If you in a slight, different browser, it may have something different. It may say download the images of whatever, but there will be an option somewhere for you to save your image as on. Typically, it will ask you for a place, so just have a folder where you're going to save the Tunas you saw that, Joshua Safety is as flappy background. So you've got that figured. That is our flappy bird background. You have the option of choosing other backgrounds if you like. If you want to have something slightly different, you could choose that as well. But to make your life really easy, we will include these images. As you will see, if you're looking, of course, there will be a links where you can get these images so you can download them yourself by following the links on the screen and in the course, otherwise even more fun. You go and find your own images, but we will provide you with the images and little sprites in the It may just be used for those as well, so you don't have to go six of them. But learning really happens when you get involved. So wanna take a time out? Go and see if you can find a nice flappy bird background and we will see you in the next lesson. 19. 19. Animate Background: welcome back in the previous listen, we looked at downloading a flappy bird background, so that was a really simple process. And the stage. You should have done that and you should have it saved somewhere in a folder on your computer. Or you can get it if you refer to our previous listen from the link Now this destined. We need two things a little bit more advanced. We need take that. Backgrounds needs to be placed into our game. But more than that, we meet animated, and Josh is going to show you how to make all of that magic happen. Okay, so we have now cleared or that we've got is, you know, So we are just able to click on the stage. There's no Spratt inflict on on. We can do little, but there's no emotional toxins state because the states can't move. There's lots of luck. Look, sounds is store those there's sort of stuff, but, um, there isn't an emotion, and you see some some of the blocks are missing. Um, okay, So the first thing we want to do is open backdrops, because that's how we're gonna be able to animate a photo so you can actually look black. Half leopard bird is moving. So we've got this upload button either here, so chooses your fouls from your from your computer that you can apply that photos and stuff eso if you cook, there you be. You have you you on the afford weaken scratching You clip that foul and you say open. Then it will upload the image on it since you got the image Therefore, this walk backdrop which we don't really need, So delete that, and to make it animated, we just gonna want to first resize it. Okay, under here. You see, you've got a whole bunch of different options you can use. You gotta pain. You've got four with color, lots of things like that. So we want to use a select option. And that's basically selects whatever you have got any amount, sir, if you if the mouse and you this Ah, hold your mouse down and you can select this whole area and we'll just live with screens. I So this maybe that said fits just rocked. Then we can start making the animation should just get it around something off that and then you just took something off the screen. Um, and then we duplicate you get the animation. Okay, so we just wanna grab We don't We don't. That's gonna be take too long if you want to. You can't. I just moved this, lack the whole image and put it back with the best way to do it. And it looks quite not so. We just want to select this bottom PC. I you can It takes quite a while if you want, Like, a whole image to me. But it's it's very hard because not everything. So even so, we just want to take this this bottom piece, the whole thing, just about him and drug. It doesn't matter if you're not so perfect and just move it so slightly. I was like, just like that much, uh, doesn't have to be that much at all. And then, as you see, we've got a whole bunch of things. Yet you say selecting duplicate, which basically every select doesn't matter how much is like Don't look back. Um, who's the necked and say that much? Now you see, we've got their block, so we cover that. What? But everywhere there, this looks so It's a bit even, and they drop it. But they're on C. Knox. Yes, it would just do one more. Um, of that, uh, so duplicate number two. OK, we've got the good background want you have duplicated this one, and we want to now a move it a little bit more. So you started getting some sort of movement. So we select this bottom piece of it here with this Elektra on you just grab it and move it just to turn but and get it in on now. It's OK if it's a low, but if you you want to sit too much, we get, uh, the selected duplicate. So recently, that area there you will have scratch. As you can see, it just made it walk. For some reason, it is a lot of black bikes and stuff unscratched show you you will have those problems. So just duplicate this again and, uh, select the whole thing. Um, just like that. Move it just a tiny little. But, um, just like that just to get ah ah, a ground look like it's moving just about that much. Onda we get the selected duplicate option and take about just like that. Doesn't really matter how much as you can see it list again. Get that option again. You can even just use the slick Priscilla adoption good at that and say, Come on. Sea or fee on windows control. See and use control V. And what about deserts And long like that, and then you get affect, and that should be good for background right there. We've got the new background in place. We're looking very good. And now Josh is gonna look at how we can make it sort of animated. Okay, so, um, looks at that The stage doesn't have an emotion, but to make it actually looks like it's moving. We've got this next background. Come on. If you grab that and go get a new wind, start play and you put that you see, any change warms. That's why we want to control. And if we got forever Borger bit crazy, but it looks like it's always moving a bit. Okay. So what do you basically done so far? You is You've attached this to a sprite, so the background is a sprite is we're gonna see later on. Josh is gonna create different spots such as a bird, a teacher in each of those gonna have code associated with it. So but this one's the background. He's got the Becker. When the game starts, you want to switch between the backgrounds, and you want to keep living in forever. Looks like it's flying a operate, as you've seen from the other courses we did on the other videos that if you don't have a weight, it will go a bit crazy fast, just like with that variable. So we just wanna have a weight, but very small that point. You can keep uninteresting until you think it's right. That's even too, too much pulling. Zero thing is giving the impression of the speed what speed you want to look like your flappy birds flying yet, so that looks good. You can see that's moving, and when you add a deputy bid and polls a lot, and I just again, it's amazing this whole thing just an illusion of movement that's that works if you actually look at Flappy Bird. The bird itself remains in the same spot on the screen, but it appears like it's moving, So we've got a background starting to move at the moment and the next. We're going to have polls moving as well, so we'll see that will come together. Your opportunity to get up there, get your background up and built, get your animation happening, and you are another step closer to your flappy bird game. 20. 20. Adding Pipes: Welcome back. If you've been keeping up by the stage, you are believing Pretty busy on We are starting to get to your background in the basics all of al Flappy bird game going so fine You've got your background there. We started to animate it, but we need to start to bring it to life. So what we need next is we need to get that pipes of the flappy bird is gonna flying through here on day. Josh is going toe. Look at two ways in which you can do this, and we really gotta focus on the second way, which is uploading an image. But you can also create a sprat, which we bought the backup. Okay, so the first way is you see here with but the painters, right? They've got a couple of spots for you to choose. Wrong. Um, on we've got a blow to sprout. So we're gonna choose painters BRAC, which you can do, but it won't look as nice of So we choose our green polls. So you've got a whole bunch of options. You as you know, um, you must put the rick angle shape one. So we choose a color, which is green by pose. And then you can just dragon mouse along. Um, as you notice what I've done is I've chosen the one that is it just got line so it won't be too good for pop. So if you go to our post again, um, you've got two options and one for just lands and wonderful. The full recant worship stuff We choose that one now got a forward channel. So it looks a bit more like a Flappy Bird poll and could just put it like that. And you create another one on the bottom up and you put it just like that and they use had you your own made flappy bird. Polls does not the base. But if you've got no other option, it's also a good way to make a bid. Poles. Yeah, it's going to look a little bit more realistically get actual flappy bird. But I think the idea is you can actually make some of the stuff yourself. You want experiment a bit, but we're not going to do that. So we gonna get rid of this one. So just right click and delete it. And, um, we want to this as we had applauded after people background from the Internet, we wanted upload, uphold. So we go to Google and message just we can also church of every bid. Just strange background too. Pose this pope bid pope okay. And as your C with a whole bunch of results. But they're not like every time something like that, it won't be very nice because it's not. You will be the whole image moving, not just a poll back When you look at these, I mean, there might look like a Paul and some of these well, that looks like a poll, but it's credible this other rubbish around it. Do you want transparent background? Thankfully, Google makes it easy for you. Does it search tools and they go across to color and choose transparent What Google is now gonna do? It's going toe place a filter on its search, and that's only going to return images that have a transparent background. OK, say yes, you can see we haven't really found any polls because they owned court pose. They called pops actress and a very insistent no area which chicken districts back come back spacing that just searching And now you see, you get a whole bunch of I've been a result of that load. It's like that. That's just show you what judges found you talking about the transparent. You see, the air that's transparent has got little chicken design. So that's what you want. Which means you won't have any background. So he tries this image here. You know, it may be transparent. It may have a transparent background, but the actual pop itself is not transparent because this is like a screen dump up something. So this is not going to be a particularly useful one to have. So you want to take one that actually got a transparent in the right places so we wouldn't want that one. Okay, so But I just grabbed this one wishes NASCAR. It's basically or transparent except the actual pose. And then we also want to say this one. Teoh scratch a folder. Can this be called micro pop? Which is fun. Andi, save the day and you can go back up to scratch. Grand uploaded like As I said, you got a whole bunch of options like to paint and upload. So if you could, that one you can see we've got a marker pops and open it. Okay, Now it is being put onto scratch, and we can do lots of things now to Australia in the nexus. Therefore, you got you've got two little pop in place, and we're gonna look at how to actually at some and move into that party in the next lesson . So go out there, get your pop, download it or draw it if you prefer and drop it on to our canvas. And we all get ready to do some more fun things in the next lesson. 21. 21. Animating Pipes 1: welcome back by the stage. You have got your pipe uploaded and you've got your little background running around like crazy squirrel. We're getting ever closer. But now what we want to do is you want to get those pipes to have some motion as well, because that's where this game starts to happen. And so just you is gonna look in this to get a little bit more involved. But now keep an eye on what he's doing. So the state, if you've been keeping up, you should have your pipe sitting on your screen, something like that. So let's see how we take it from here. Okay? So you can see what this upload, Koppett iss like You can see that big at the retreat don't want It's too small. The actual path and the reason it's just more remember what's gonna happen. The pumps are gonna move so these parts can't really move much. So we actually need a change of science. When they move, you don't over the big gap sitting on the top of my head up to good. Okay, so if you wanna make the pots a bit bigger, just go under looks and you'll see. There's lots of things you can do here. But the thing we want to do is take the size. You can change this size. What you don't do, We want to sit it. So this room well, what emphasize you have left. That's 100% is what it is. No different. Choose 150. It's 150 every 2 150 You see him now If you just took on it, it well, it can fit that your screen size just like that. And also you can see a popular been fat fel the screen so as you know, costumes, you can change it. So we want to use the selector What's basically selects what you brought in your mouth and we just wanna make it. But then it that's what we want to do. So describe it and make it a bit. They're not just like that. Looks a bit more realistic for the paps. So that looks OK because you're basically stretch them and I just filling them up a little bit. Yeah, Okay. Just grab this little handles and drag you ready? They got We have got after, uh, Rep. UBid Poll. If you've chosen to upload once on the Internet, that's fine. A few chosen can make one yourself. That's also fine. So we've got us its size. And, as you know, with all well, with most Spratt, you wanna have your wind stock, Not just something on this. Just what Josh is doing here. Just note is this code that's now being written here or put together here is also shaded without part. Remember, the each of our sprite says I don't see the code. That's what we looked at earlier and which was moving out. Background. Now we working on code that is, do without pipe in. Later on, we'll have code due to the bird Tetris. If you last that you can't find your co, just check that you're not clicked on the wrong sprint here. So we're working with our pipe at the moment. It is now we have ah, sits just under 50%. You have in the beginning off of ah, code. And then we get the little control option. You'll start to see the pope actually moving Sorry with, you know, with forever just repeat sort codes and side of it So as we know with emotion, we can do lots and lots of things. And you also know that we were a good thing to do this sit. You you sprout to go somewhere each time you re start the code. But with this one, you want to stay that to go somewhere each time it does something you remember now. Previously, we're looking at motion. We looked at how important a wise when you initiated a game or showed any code that you would put jaw your sprouts in a certain position. Otherwise, Syrians go weird. So it's always important to position things in that place where you want them. So basically, if we put this go Teoh whatever while we'll change this later, but doesn't matter why and ex, you've got your its screen which is basically horizontally horizontal. Oh, and you are So this is where the post basically gonna go. So as you see with my mouth so I can see the further us you can put it to the rat is 240 aches so you can see that Look at the bottom of the screen that your ex Adwa says I'm going across right to the rod. You're gonna see you hit to 40. So basically every say go to 214 and we put that under forever leap. It's literally gonna always go to 240. Unless we have got a glad off. Generous. Basically, for however many seconds you choose, it will go to, uh, wherever you true. So as you seen with the screen, what's got its x and y? So we just choose the X option and we say the opposite the left side of the screen, which would be minus 2 40 As you can see over there. Yeah. So you gonna right to the left again? We talked about this earlier because from Digger to 42 positive to 40 with zero sitting somewhere in the middle. Yeah, So refugees minus 240 You see, quite an interesting result. Um, a little pole lights, Toso, you got this appearance of it actually moving and coming back again. So what judge has managed to create here is those things gliding literally from 2 40 away across to minus 2 14 because it's enough ever loop. It just keeps going around and around quite mesmerizing was your conceptual days during that. But that's not the objective of this is the objective of this is for you to get your little part flying across the screen like that. So go on, do it. And then we're going to in the next this and look at how you can add a random element to this because this is gonna make pretty easy for Flappy Bird. Just got to go here. They inflect through those things. That's not gonna be very difficult. We need these things to start to move a little bit specially in the vertical, sir, and make things appear to be slightly different. So don't sit there. Get out there, get your coding done and keep up. Then we'll catch you in the next lesson. 22. 22. Animating Pipes 2: right. Next lesson in by the stage. You should have your little pipes or running across the screen. As you can see here that you kept up. You'll little program is starting to take shape. We have developed our background. We put that to move. We started to make out pipes animated on. Now just she was gonna add some mawr animation to the pipes. Okay, so you can see one too big too fast with these factor under. Glad could just change it to you about fast chickens. And you can see it moves a a bit a bit better speed. And you can also change the actual background so they look like they're moving a bit and sink. It looks like the background pumps are Bob's overtaking the background. Yeah. Say you can take Well, I guess it's what? Sort of Okay, if you look at it carefully, it shouldn't make too much different. You can't change fiddling. Um, So you thought you want No. And what I was saying of what we have to do now is with the wife. We wanted to be random each time. So, you know, happy bid. The packs could be up there could be down there. So that's the vertical. So there's pops of moving up and down, up and down. You don't have a totally predictable, otherwise person just go down interesting to this. Okay, so with the the basin to do, if you want to do this sort of things is that operate the operators, which basically you can do a whole lot of things. And one of the things is the pick random. So as you get into the y, which is the up and down instead of you picking or having a specified constant value, it's gonna be any value picks. You just need to find, um, what the right amount is because this we don't want to be off the screen. So, um, just you fiddle around a bit and you eventually found the rat value. Okay, so found that negative 22 90 is the best one. Full. Uh, you pole to move. Do possessing? No, Like from said it too. If we had it going to. It's just 100 and 20 something around him up that she has restricted to this going as you said that good, very random. We wanted to stay inside the screen inside the vertical range of the screen. Eso yours might be slightly different depending on the size of your trade. Your pulse. But you could just fit fiddle with those The range off the Wye Valley. There, there, in the random range. Yeah, Aziz, you can see I've got this wife of your sandwich you find at the bottom of your motion. Uh, what's you can What's basically we you can see if we play it after be good thing is slowly going, son Derek's and slowly going down It's going to 56 wherever that it's so sectors random while position because starting at go to 40 some random thing, but it's gliding towards 56 so we don't want that. We just wanted Teoh stay in a cooperation. But go, Teoh Whatever. Negative 1 48 to 42 to 40 x. So if we put that in there, you see you want to just on this petition it doesn't move down up anymore because now we're keeping it on a solid watts or whatever. While value is pictures randomness of a pick 30 that's gonna be 30 there. So it's keeping that value here rob and very that you've predetermined. Yeah. So today you've got your one little poll, but it looks a bit lonely by itself. And so we're looking at an exhibition how to add more publicly, Also, in the next lesson that we will have adding more poles and sitting or the Okay, so you've got it. Get up. They go and get your poll in place. Get it moving along in the way that Josh has just showed you and we'll pick it up. In the next lesson, we will enter more Paul's to start to really bring this game alive. 23. 23. Animating Pipes 3: so that we have attacked. Polls are making their way across the screen in merriment and joy. Your exciting. But it's just to say that Paul's looking a little bit lonely so time to get another polling there. So anything todo what's good agency of uploading the poll again? Or that because we creating quite a Cem a similar thing. We just go under this poll and we write ticket and then you say, duplicate so that whatever code, whatever image, whatever's and that Spratt will create another one of it. So it's Maurier pops to now, you see, when you play again, you see these two different parts do doing the same thing, but it looks a little but missed up. So just by simply putting a couple of things in you see how much better we make this make this, I'll go. So the first thing you want to do is, um we have a weight in the beginning. So the postman spread out and you see, if we just say one second White Post won't be Alon. Very well. Um, I found I figured the best time to do for these pokes is 2.5 seconds or specifically gives them and even gap. Now, when you play, you see a little poll, um, wait and go. And you you don't really like it that you can see it on the screen. You start with it. Looks like a little bit weird. Looks like horses in that waiting to start the thing. The first guy guys in the 2nd 1 guys. But you got Once it's going, it looks pretty realistic. Yeah, so as you've done with looks, But we've got this hard and show. Come on. So, basically, just for the beginning we can get to hide. And, um, when we stalked, we can get it to shut. So now when you stock doesn't look like horses, get ready to race, because that's very clever. So by Harding, what's happening and then living at White and then it comes out. You don't get the horse racing book? Yeah, so it's starting to look very similar to flappy birds. Now we've got a pose and we've got all of the background moving. We've got both of our pose moving and next thing to do is a right. So you just about there now. So getting closer and closer. We'll just about there to getting off Larry Bird. And then we're gonna have a feudal find things oversee around there. But you should now have your three strides down the bottom yet your background and your two poles. And if you got everything right by the States, they starting to look like something is happening. So don't just sit there. As you know, the best way to learn this is strike for yourself and see if you can keep your game in sync with what we doing next. Stop Lappi, bird. 24. 24. Adding Flappy Bird: things are starting to really look up now. And we have got to the very exciting time where we're gonna add the flaps star. Yeah. Um, so this is very exciting. It's getting a little flaps to run to their Yeah, so this is very exciting. We You know how we at all things from the Internet, you just go Teoh images, you images and media stitch will. Well, we hear first about flappy bid, and as you know, we've already got it transparent, selected, Remember there from the previous we showed you that previous. Do you want to choose? A flaky Bruce got transparently. I want everybody to have a whole green thing. As you can see, it's transparent, but only the ages of restaurants back look, but so we can we cannot. So if everybody this one's animated, um, we don't need an animated one. We just look for one that this standing stone that once find And we also say this Teoh flappy bird Um uh, scratch ascots fota And it is downloading there. And if we go backward to scratch and we upload another another image, which would be a flappy bird. Okay, Now we've got a flappy bird. Use a humongous thing. Yeah, he is pretty big, Which is usually to fix because so you're going across. Wrote the selected to We've gone to costumes. Scott, you get accustomed again. Make sure when you come to costumes like Josie are obviously is dependent on where you're at, have you on Pops, then you gotta costumes. You're gonna be editing the pop costume and seeing the pop code. So you on flappy bird and costumes. That's where you want to be. Yeah. So now you can slicked the costumes that are inflected good. And as you know, with, like, a background, you can have more than one costume to make it animated. Okay, as you can see, for a very specific, humongous year once you important and switched over to costumes, he is quite a very big bid. Looks like the each of us Looks like one of those ones had just one too many supersized big macs. You'll go for every bird it is that big is gonna be able to get through those polls. Continue. Yeah, he doesn't look like he's gonna flick to this. Pops were easy. So, as you know, with costumed against, like, a whole lot of things to do it with. And we're just gonna use the select option. Select earlier. Yeah, just drag and drop. So the Tyler what outlines his area? Yeah, And this was like anything that it was grabbed. Little handle. They on the rock on one of the corners and you'll see changes to double headed error. And you can adjust his size and then drop him into position. You still pretty big, but, um, no, he's a bit of sauce. Uh, we can still making a smaller We can just tweet. There's a lot remember, obviously the side of the flavor, but he's gotta get through these moving parts, so you don't have to big now also, what we've got on the side yet. We've got the loaf, left foot slips out of bed. Um, so you could have different costumes and foot, but we can turn it upside down. And we've got this one, which basically, wherever you've got your mouth, um, holding down, that's gonna be the center of the screen. So if we make flappy bird of the day this into the screen, he's gonna be a Santa brought to the middle like a degree handle tools that you're every bit of the right spot in the middle of the screen. OK, now, the one last thing we're gonna do follow flappy bid is we're just gonna askew. No way. You must always sit flappy bird to go somewhere in the very beginning. So we want him to go to in the very beginning, we just have him going. Teoh, um wow. Often shown, maybe just stick. You said a little bit half to start with, and and the exposition will have ah going to realistic yah do you get if you look at the bottom of the screen, you can check with the exposition is chose. You said you couldn't even see what they 50 business every time you move it. If you look over there, you'll see that that changes. So now it's because I love updates those in actual positions. Yeah, so now we know it's negative. 1 49 So if reaching negative 149 every time I start affected, bird's gonna be right there. And the last thing we can do is put some gravity for flapping. Remember the baby good game that by default. The flavor is always falling down, and your thing is to keep him flying is like It's like a flight. Austria. More than a little good. Yeah, there he could make plenty. Ostrich Next time. Yeah, you have you. I want to make a flip. The bus trip was a good idea. Just have your forever control and, uh, what's to overpay whatsoever and that command and regain emotions and ever said, There's a sit while and there's a strange rock. So instead of setting whatever the opposition or ex listen to whatever you want, rather change its flavor. It's constantly going to be moving down, or Gravity's citizen is an absolute position. So when you say center whiter something he's gonna goto directly. Changes, obviously relative to we're is at the moment. So if you change while by 10 he's gonna move relative to his current position. So that's actually what you want. So Ghani's trains wa, but you can keep on testing, which what's the best but minus. It's just truffle, and we're constantly see which is the best. He's moving pretty fast down. You can even make it a bit less like Monness. I don't know I minus three, so you can see how you can tweak. This is essentially giving a gravity effect. It started Cielo. Flappy Bird has got some gravity. So in the next lesson, we'll add a little bit of may come Flak. Right there we have it. So don't just simply steering at this mesmerizing flappy bird. That's now, according along the bottom screen, why don't you get out there and get your gravity stuck? Make you buried out there? Go to it. 25. 25. Adding Flap To Flappy Bird: right, left during the last destiny infected birds lying on the bottom of the screen because we added gravity to it. So it split. Don't you add some flap, Do the fucking good. Okay, so we've got a probability staying on the ground because he only knows gravity, and he doesn't Hasn't entire effect yet. So the easiest way to do this is rough. Getting another one of these when star click options and, you know, for ever option this time we're going to use the F to check if something is happening. So you put the F visits for air and he said, Take it, this is happening. And as you know, same thing can check a whole bunch of things with the 50 bid, you can see if he's touching something. Where is what we want to see here as a few mouse is down. So if your mouse's down a few clicking on the screen, then we want the flappy bird flap. So on emotions, you can say you could change the wild. Despite that recon trains about 75. And but you'll see what you get yet is more the blacker jump jump. Yes, every time Joshua clicks it. So what's happening here? He's starting to fall, and every time it clicks, a mouse theory clicks a mask. Every time you click, Samashky changes while by 75. So it's a jump straight. Teoh that top position quality eso rather than their flu rather use the glad option. So just swap that for that and we have a for just a little bit. Just one small dried for lifepoint. Two seconds on and then we'll have it. We don't want to train explosion Nice enough Enough to things we don't change the XO opposition. So for this one, we want to keep the explanation. And this is a sick. This is basically gonna sit in the water. So if we had this, the whopper system would just know. He's just glad straight to that that wow. Yeah, what says the bottom? So rather than that we wanted to be, we wanted Teoh. Just add black and they say, change the robbers, so it's not a constant. So we just have this plaster option. And just as we have with the explosion, we go back to motion and we use the weapon shin and replaced every far as we did with the I guess it just just let me talk you through. So what judges just done is it's gonna glad. But when the GLAAD's what we want to make sure is that the exposition always remains the same. So the exposition he's always going to stay in this line that's expositions is going to stay here. But the wild position Every time you click the mouse down, we want that to change relative to areas of the moment so that find your current position and is gonna add 75. So let's see how that works now when we start that, let's see what it doesn't jump. He's not the sort of more gliding motion, and every time you click it, he's moving by 75. So obviously the moral the list you change that 75 probably the harder it's going to make it. You'll have to fiddle with that because he's gonna jump a little bit of blood a little bit too much. Change it just like whatever you want. You could change to 60 make it a bit easier. Depends how hard you really want it. It's hard to see how you get Mike levels in this guy. I mean, how hard you make? Yeah, you can make the background we foster. You can do all of that kind of stuff. Another nasty today, as you know, the law. Flappy bird. We wanted to look like he's, like, flying upwards. So we got this turn command, which basically will, uh, retake the Febi bird. Like, as you see here for click it, he turned to low, but I think that a fixed So you put it on. When you win mass down, you have a to in effect. And then when it's done Gladding up, you have a 10 you have a 10 back to its original position. So it's basically just pretty a bit more so you can actually looks like he's wound up down in a bid. Obviously, he doesn't seem to be structuring the poems of the ground anything like that. But you get an idea off. You're really getting close to having a good, um, a plan running and then at schools and all of that kind of stuff and the next listens 26. 26. Sensing Objects: I hope that you all the sensitive top aren't I'm gonna hang and handle this because in this lesson, it's time to make out flappy bird sensitive that in the moment that little crazy bird is just flying through everything. So Josh is gonna now look at how we can get our flappy bird to start sensing its environment. Put some life in the baby. Okay, As you can see, after everybody is just can go through the ground and go through the polls. Is no stopping this Be starting. It was like a two minute It's a two minute Abboud. Yeah. So what we need to do is another one of these ifs and easy ways. You don't feel like grabbing all of the things you can either have a backup is I do, which is basically, you know, you're likable. Bet, pay. Let's see, if I created this code or have to do is duplicated, and I put a date, not Osama backpack, which is good. I guess that's essentially designed for or code that you use often. So you got little code blocks that you use often. You can just stick them in your little backpack right at the bottom there. And as you get more and more experience, you'll find the R code blocks attend to repeat, and you could just quickly grab them in pop a minute. So I wonder, how is that when start forever put basically this one and use it quite a lot. So it's, um if it does something, I would do something out. So if it touches which is gonna make it saying something, if it touches not the mosque Wellington, but micro pots. And it was the grab operations here, I would slit us. Do you look to things as you see And um oh, you can use end, but they don't have to test both, perhaps at the same time. So you can use all instead, which doesn't matter which pocket touches. Oh, anything like that. It will be okay because remember this incident we've got to pop. So when you look at our sprouts here, we've got the pop and pop too, and we got a check. If Flappy Bird is touching other these pops, Josh is basically using the sensing function. So if touching and touching can do all sorts of things that he showed you earlier could be touching the edge or something. But that's what we're looking at the moment we want to see if our elected bird is touching either off these pipes and so simply by using the drop down. Yeah, he's chosen both of those parts you saw he chosen, or so the or means this or that, As you said that you chose an end that is very important in Amin. Both must be true now. Think about it logically. That can't be because the 50 Bird might touch this one. That's bright, but he contact the sprite at the same time that end vocation or means touching this one, all that one. So very important to get. These are called in four language, called a Boolean operator. It's a logical thing, and it's often used in coding, especially when you've got conditional chicks like And if so, he had. If something or something either of those is true, Then Josh is gonna put some code in the middle part. Yeah, okay, so another one we can you get as many always as you want, which is basically chicken. As many things as you want to one thing. Uh, the other thing we want Chick is a flappy bird. We don't want to touch the ground out up. And as you know, the ground is just the background. It's not an actual Spratt Kontic, but is touching the background or that it's always always touching us. It'll be useless taking that it wouldn't go anyway. So we get operators again and we've got the more than and less than which basically chicks efforts where you can check if something is greater than or less than some other value. So we want to see uh uh wah position. Yeah, we can just put it in this little book of us. Remember that gives your current y position of your sprout off this case, the flappy bird is less than 100. Um, the negative 101 as you Oh, sure, yeah. You can check when it is over. It is because that means you sort of hit the ground about because, you see, he looks like he hits the ground around it and they take in of those tree. It's gonna follow by doing what ever you commander, because what judges not done is that 1/3 condition and you could have many is your lack. You could get quite involved. You could even combinations of always in ends. But then you really have to have your you hit screwed on in your logic, right? But that's what coding is about. It's about being a logical So three conditions are being checked. Any of these was true in the following is gonna happen. Okay, so what we're gonna first do is put the stop in. We're gonna say, Stop this. Stop other scripts in the Spragg and you see if we do that, put that in there. And when we play a little flappy bird probably project into affect birds or happy happy. A soon as he took to something you phrases, it wasn't frozen leopard. Every touches the ground. He freezes. And, as you see when you start to your favorite gets a bit off direction because each time we play, it's pointing, and then it's freezing. So in asking to do every time it starts, we 0.90 degrees. This is literally just gonna point him straight what you eat as we did in the beginning. We see that extra so yours in his direction right now. losing something. The tempting And Josh is trying to show you this in the way we during the course. He's not giving to you perfect. He's trying to show you do something. You see. It's not perfect, you tweak. And that's how coding works. Coding works with you slowly building up on the design. So it's something works or doesn't work or you see or nice. Why is he facing up like that? You can tweak it. Obviously, you've got a ultimately try and have a plan in your head, which is quite important. But what's really fun about the scratch environment is you can quickly see your results and tweak it as you get going. OK, so as you can see up back ground, it's still moving. So that doesn't really make sense, because what Josh has done, then, yeah, the record beard is like frozen, but it still doesn't hasn't stopped. So what I'm gonna do Not okay. Now we've got a whole bunch of options. Yes. So when we want to stop also, this will basically stop every single one of these. A little spots are gonna go. OK, so when we start after the project, I see Febi Bird is actually facing downwards. That's because it plays these things so fast. Like a 0.90 degrees. But like instantly, it will turn like that. So nice thing a good thing to do is put a little weight function so away. Come on. So if we go here, um and then we take the 0.9 degrees out over Wait a second, then 0.90 degrees. Then we know you can't like, quickly player first. Then it does so turn and every time of place. So if we just do that and we have a weight, doesn't have to be long and old just luck. Anything that 0.2 seconds. And then now you see when you play I love flappy bird. He's always gonna be pointing the right way. Um, do you always see pointing his No. 90 degrees? And now we'll see when we hit an object. Anyway, on that treasure, that bit goes Teoh running hoped and everything up Start grinding. Halt! Yeah, he's like he's like Thomas frozen, so that's obviously a lot better because it has stopped, but he's sort of like not how the real good game goes. The bid is just stop like like the whole thing's or stopped so that we've got frozen little flat birds sitting on the top. So what we have figured out in this, uh, particular lesson is how to get off Larry Bird to become and where through using sensing off where the Febi bird is current dedicated and how to stop the background. Now, we're going to improve on that because we don't just come to a grinding halt. We're gonna look at how you can make him sort of die gracefully. And we will look at that because it's gonna involve something a little bit mortgage to get back to using variables which we talked about in their previous listening to me What's gonna pick up on those later to look at how it gets schools and lots of fun things. So you know what to do If you haven't been following along, now is your opportunity. Get your scratch open and get scratching 27. 27. Improving Sensing: we lived you with al Flappy Bird with the incredible skill of being able to sense his could be here is barred and that's what to tell environment. But the problem was, we we looked at how and you could die. Just stop the flickered bird or stop the whole thing. And it's not quite right because we got a baby bird. The game is sort of over and it's exclude like a magnet to this top of the screen. So we want to look at how we can maybe improve that and make it a little bit more realistic . Okay, so we're going to start with taking out this stuff. Oh, come on. And we're just gonna replace it with the move, because we every town effective but had something you wanted to look come crashing down, crashing down to the ground. So, um, we first of all, we we take that out and we re use are glad. What's we using that one? And we can also make it a point to second. It doesn't to be very long after everybody to come crashing down the floor. So we don't really want to change the extradition that as You know, we just go to the bottom yet, and we said it wasn't to be the same. Whatever it waas way, always keep my expositions because basically, the flappy bird always remains at that exact point on your screen. Okay? And another thing, we want to know when where this ground is so easy. Way to do. It is a gift that we bid, and we see where it goes, where you want to end up. You see these trains? So it's not about native 32 and Wiseman negative 100. Oh, negative 100. That's exact of its negative 100. And we also want after Burt look Lucky's falling. So with the point in seven pointing straight, yes, he's not gonna come in like his learning. Like in your plan. Yeah, we can have him pointing down. So now when we play, we get a a low flappy, any comes wrapped up its face planted. Okay, so everything will carry on running, And that's where the very was coming. Said the moment we've got our planet. Birdies face plant into the floor but just took out the stop all because there was not really what we wanted to work are That's a Now we need to make our backgrounds and stop moving. Yeah. So we're gonna have about data and make a variable court date. So good. Don't you have made that variable? Is one death bird so available will always show up? Yeah, and but you can easy take it out by taking a stick. So this is pretty variable. Just is using is he's only using it to control things. We want to be out of control, different spots, and they wanna have a look at this variable and see what the value is. We don't actually want it appearing on our screen. If it was a school variable, we would. We'll look at that the later but not this one. So you just be selected and it doesn't appear on the screen. Okay, Now that we've got invariable hidden, we can sit did in the beginning, like always. We want to say variable sit there, or a soon as we play, we're going to come. Are we gonna were gonna be a step or that you're is initialized to what it should do. So we said it is there in the beginning and if it touches we sit aside. The recent did too once. No, suck that. Um Now, this is where we do some chicks yet, so we get a you can get your back up. If you have done that, we check, um, on the sensing. If it is, if dead equals whatever one you'll notice that Josh is now. We know on the flappy bird, because that's not the issue. You know, he's coming to a grinding halt, which is fine. It's our pops and our background. They need to stop moving. So that's why gesture is now doing this particular piece of code on the pipe. Okay, so we're gonna create on the part because we the pops in the background of the ones that are moving You want these ones toe or stop? So we can we do that by taking a dead equals, want to get operators, and we go dead. F did equals once. You see? Yeah, we won't or we'll do as well stop. We don't stop. All So you click on the and your see, go see your doctor an option and you can say stop other scripts in the sprat. So everything else that except for the script, everything else that's the other. The other script in the sprites is this one. This is one that's making the background move. So basically, it's not gonna check and is going to stop that script. This is making the polls move. And yet we can also put this one for the background. So but just duplicating it and putting in that one. And so we just basically, if you say you right, you just drag it to every We click on Mass down on February, it's gonna put it on this piece of code and confetti bid if we put it in the background or the stage is gonna go there, Yes. If you look across to each of those now that cut is sitting there as well. There was a quick way for just you to put the code there. So you've got the code now sitting in that part. Then you can even see you've got the code now sitting for the background. So all of those now I have got a test on them that they were gonna chick if any stages little variable court dead, it's it to one. Everything is going to come to a grinding halt. So if you remember back yard, this is where Joshua had set it up. Starts is zero, and that's fine. But the moment you touch something, it's going to be sent to one soon as its it to one. What's gonna happen? Well, it's going to What are these Sprouts are going to see it it to one, and they're going to be stopping or off the activity that is happening in them It And it was a nice thing to mention that you can do is Barack clicking on the stage? You have this. You can add a comment, which what you can say, whatever this peace accord does. This and this piece of craters that that's quite a good idea when you could get quite complex. But you might forget, you know, justice. It's You could put a comment into your code just so you know, the moment you're remembering why you've got it and what the little block of code is. But when you come back here tomorrow, next week or next month or next year, and the brand's not as good as a script should be, you may forget so commenting. Your code is something which is actually a good habit to get into. Yeah, So you can have your little comments over they at this we have. This will make it flat, which should rather be rocky. Abba, Uh, code for it. So we got effect. We can always know that's gonna make it begin and much more. They are not more description in there. Note and massing to also do is the cleanup you have. See, you got two options, do you not? Basically, this puts everything in order. If you don't want an order, you don't have to do this. But it makes a nice and neat and easy workspace for your Remember, as you started to get more more co blocks that can get more and more involved, you can see we started to get more, more code blocks that are coming into our screens. So sometimes you do find that gets a little bit hard to know. But, missy Yeah, you're phonic. It's a bit missy. So this is a good those two things on us wait to need and something's up with your code and right. So let's see if the old what happened the old flip stuff. So now when you play a flappy bird, Okay, so or flappy Bird is facing the wrong direction. So we're just make it wait for a little bit longer. It obviously because we're getting more things and we're putting rates in different places . So after happy, But it's gonna be turning too quickly. And that's then. It only sits this command over here afterwards. So trains 2.5. I love everybody we can see is pointing the right direction and see if we touch something stopping he comes flapping onto the floor. Boom hits the did It looks like he's in these final final throes of did. But the whole thing has come to a stop that all the sprites and scripts of the running of them have all come to a stop and athletic good is now officially did it. So do you have it? And that should bring you to really you just about You have got a playable game now. So this stage you have a game that you can actually play, so get out there and do it and we will look at how we can not take this to the next. Level off this and add some more advanced features to this. So get out the finish, your game and start to impress your friends and family. 28. 28. Adding Sound: right. If you got to this stage, you've done extremely well. You basically have a working flappy Bird game. Onda Uh, recap of we've got to We've created backgrounds we've created are moving pipes. We've created a flappy bird. We've made the flabby, but since the environment, both the floor and the pipes and we've made him die. When he hits any of these things, he comes pressured. The ground and background all stops right, sir, That is a basic flappy bird game. And what we want it now do is we'll be able to a few advanced features. So the nice thing about programming is you can build things up just incrementally a little bit at a time and fun play. So let's look at some more interesting things. So maybe we can add a little bit of sound and we cannot score and various other things that are both fun and a little bit more advanced in some ways, and someone not that difficult it'll. So let's start with something really simple. How about adding a bit of sound because the moment athletic boots pretty quiet. Okay, so it was you know, we've got the costume, the scripts on the south. They do give you the low pop sound, which it's okay. You confuse it if you want, but they have going a whole lot more Santa. Choose this whole library of sound You can basically go through where they provide into categories on the left. Yes, all of them. And of course, you your upload your record you got so you could create your own clippers. You wanted you that you can't do a voice artist. Yeah, um, s so you can just look for a whole bunch of different sounds. He got the slow play options of Yes, can. Listen, this is quite a nice one for when it's slapping. Sounds like the sort of thing that very point I have probably never heard a bid make it sound, but it is. It is a rather strange bird. I could make a bit of it, but anyway, so you just want Teoh every time that we have it. The mouse down. We have the sound playing because the drug is on the flappy bird. So it's obviously to do with every time that particular sprites has got its scripts being executed. So that's where we adding the sound now to play sounder point. Yeah. So, basically, every time your low mass down for good, uh, it's gonna do that selling Clinton town. We press, I'm oust out. It is unfortunately, there immediately and a lot more funders on the series like it's you know, really, It makes it sort of like, come, align way can also add forward. Yeah, you gotta make it dying, huh? You can choose to sound look up. Um, under the la Brea. So we're just going Teoh different things on percussion location. Yeah, this fun when you, uh, still playing in the back of Because we're putting out mouths down. So every time you click, you hear Mikey's troops on the way we can give a what? It's a snack. Second, we can just use that. So we add that as against you got to sounds now. So instead of we are not happy, bid Spratt instead off we can begin to no fats, no love super bird to stop flying it instead of when we took ah mass down. It makes a sound. It's when we die. It makes it sound. So, uh, whenever this happens, we pray. Ascent. Snape's death routine. Remember, this is checking, touching anything, and it's sliding to its death. And sitting did toe once, and I was attending a sound to it. So now, in a way, a flappy bird, Uh, trucker through these pops eventually willing. Dot, dot, dot, dot, dot, dot, dot And the reason for that is because tonight, forever Lucia going around and around making that sound, stop letting make that sound. And, um, we rather say, um, we've got alot being so we have that wouldn't start collect instead of, um, having decided forever. Every inside there we go say this weight and toe on you get that sense of mystery Just gonna wait until some condition is true. Yeah, some condition is too. So we've got our data and, as you know, used operators to check that. So I said if did equals one can't remember. That's exactly what happens. Every is when he's dead, Juwan. Now you see, you only pray is slow dying, selling once and for all, Pops. Yeah, well, he won't keep on playing that very again. I just showed you That's a thing experiment, you know? So it does work by putting in the dying sound in year because obviously makes logical sense . This is our dying sort of routine, so to speak. But then irritation every time, and I said what he did. It's created another little code statement over here and little script where it's down. Rather using IP. It's waiting until some event happened, so it's another condition. So this is an if condition. This is a wait until something is true. And what is doing is grabbing that terrible that he sits did to one. Soon as it picks up, that data is a good one. It plays sound so that we haven't You have your flappy birds got some sounds good is over life to him, So have fun. Try experiment with sounds on. See how you can make your plenty bird really interesting, and we'll catch you in the next lesson. We had some more exciting beaches on D AMP. Up your flappy bird 29. 29. Adding Score: Okay, so we have now, but a plenty big going. We've got out flying doing. I love things and really dies clean all the way to the bottom. And 11 more thing that we do need a Well, the last thing. But now the main element that would you need is the school which you all should know. Very important. Yeah. Makes it It's fun to the game. Yeah, So we can keep track of my school. And right now, let's ask him. It's also like you be watching this guy. You know what's gonna happen. How are we going to create the school? What are we gonna use? Come on, tell us. Tell us what? What did you say? The Senate. Speak up again. Off. Yes, Exactly. Well done, Susie. Where you from? Outer Mongolia. Fantastic. Susie from Outer Mongolia. Variables well done. Years. And Jake from his time. Bono. The moon? Yes, Jake from the moon. Well done. It's variable. So, Josh, Sure. That variable skin. Very so that's good for scores. And yes, we did with account. Um, we let the in the beginning. We have a local counting now recounting, except with our school. So we just have a score. The yard with his name. It's cool. And for this one, I know Save it and you re cleared. We hard it. We had it because we didn't want it right Quickly, Monocacy. With school, we can keep it shown on to make it nice and big point that we double tapping. So get hold 12 different. Enough bit off. We've got a whole bunch of different things you can do. So yeah, we can just have a big one. Gonna slider Just showing school in a small number or just one big number. Do we know what it's nights at school? Let me worried about simplicity. It's about the minimalist design. Yeah, eso we are just for our school. We're just gonna have a little, uh, a little backup, and we'll have that wind start off a new thing. You don't need that because we're not checking anything. We're just gonna change to school. So as you know, he said, we have a low change school by one, and we it So the idea is that roughness inch do that. How are we going to school in this game? So it's sort of basically, when he passes a pole. Yeah. So basically, you know. So there's two ways you can do that. You don't have to figure out it is past the part that there would be quite tricky, because the Flappy bird itself is actually not moving. If the polls that have moving, they would have to try and figure out every time the ball past him, which is one possibility or another possibility is what we have. Ah, wait. Option. Which we did for the counting one. Because, you know, start like that that school was going go quicker. Say yes, We're gonna use it by some Tom. Yeah, because we knew these. We know these polls move past a certain rate. I think it was that every five seconds, I think that every fast chickens and we've got two poles, so that's going to change it up a bit. So, Raffi, tune off. Seconds on, Paul's gonna come past you, so that should be appointed, but yeah, To start, we're just gonna have to wait for second. Because the first poll, this one only takes four singles to get to you. So that's where we start with waiting at four seconds. Then we have ah point to a 2.5 seconds because it's five seconds report every 2.5 seconds. So the way we actually tricking and it's not actually passing a poll, we just know that the way the game is rich in the polls are moving in the right body. Therefore, should be passing a poll approximately every two seconds, so that should be a point. So now when we start a little little bit up should off, that we've possibly perfect just what we want. And obviously we need a school re sick because we've got quite a high school right now, have not so if anyone can be attacked. But let's just sit scored his area because again, you're that hope place up here was important. We keep talking about sitting everything right at the start. Sitting are variables to you, zero sitting direction, etcetera. That's all important to initialize things. Otherwise, things go a bit crazy. Yeah, so we have a school now. When we start, he's a zero, is that they're only flat with the police and two grunting your or so notices when a school keeps and counting because because Tom still passing because we're using a sort of trick message here for the school. We've got to say, because like what we did with the other ones, we can check of its dead. We made this parable. Now let's use it. So if you wanna little if you want a short cut weaken, just copy just this part. But I'm saying duplicate and remove a tough flappy bird, and we get it way about Yeah, school. Where will we take that out? And we just put it inside. The one thing you don't want to Dior. So what? This one is with this f variable you might get this role of If you ever do just you don't put it outside for Evelyn because it would be a logic Annecy Continis chick if this is going on because otherwise this is gonna check once. So they were coming. Did because one chicken whites, it'll never chicken again. It's all about the logic is that you've got this outside that forever. Students program starts when it's clicked, comes in and says, Did we could have one? No, it's not okay. They just ignores us from then on, you know, so judges saying, You've got to make that the right way around. So the flavor is the one that goes on the outside of it. And then what will happen is it will. Constantly. As the program runs, it will be checking the forever look to make sure that it is the whether the condition has been met or not. Yeah, so we put that inside and mercy now on that when we got the play button, when we go through a little holes, school is a CSE and it doesn't count. It's for quiet, obvious reason you might have what did it. Morsi now counts as soon as we got. And that's because FDA equals one, which is basically checking of did equals one. So I assumed, as did equals did then it's changing. The school gives logic. I mean often these little things. These are called packs, and they are often like air. What is it? The nice thing about scratches. Your bags are not what a court syntax errors so you could time something wrong. Your bags are always in the logic, and so there's Josh has pointed out the back there was We're checking the wrong value so did equals wine or did equals zero. And so it should be it equals there. Now, who do you see? A little love Black Ebert Crown froth Ground It stops. Yeah. Okay, so the counter of stop because this loop has now been invoked and it has now stopped counting. And that is the end of all Flappy bird. It's not on the floor background. Stop moving. And it's looking good. Yes. You think we could even do better? We can. I think we could even do better. So copy this. Get it done. Get your baby birds beat down, score up and we'll show you how we could even add some more advanced features to your game . Your game is getting better and better. And you're gonna be the talk off the town or at least of your family or just of yourself. 30. 30. Countdown: right. Flappers back and a flat beak in the floor is really coming on. Got a score now, And we used variables to get our score. So our program is looking pretty hot at the moment, so we're looking at it. Bonds features. So we basically have added a school. We've added sound. And what are we gonna do next, Josh? Okay, for happy, but he a city begins quite quickly yet to be paid. When you start a flappy bird, you can screen sauce very quickly and you mountain retreat prayed. So in asking to do an ass touch up is to have painting your sprite. And this is way have a low countdown. So? So we never count down before you. So you don't excited? Yeah. So you might think. OK, we can draw a line one, but a better way to do this is we just take him to take that out. Um, back spacing. That And we used this text. So we you see, it gives a little trick spokes on. We can just tap one, and we make a one big oppa's dragging along the corner and putting it like that rod in the middle we can't even get this. Nothing it that we showed you. And, uh, so I said earlier and make it here in the studio in the Santa. And now we create another one in your question. Proversity. Then we can get a text back and we say to and ah, we just make it bigger again. But selecting that whole area, you see, sometimes it doesn't selected for some reason. Scratch does that. And once it's evicted to just make it big, uh, and big, uh, figure that one's a bit blurred because a big literally beginning there. But that's okay. This three into that back on, then, to be nice and clear and big. You have done that. Put that in the middle. We can use this as well. It's pretty much sainted, just like that. And we can just check out over 12 Okay, you can see it can go lower, but more down that and lost one. Create three. Um, we can show what we can do later here because we did go the wrong way round. So we got three on, then we make that nice and big, and in the middle, tickets and lawn It's OK, we can see, But we've got We've selected three and we hold it without mouse on. We move it onto once place and we grab two and removed to 1 to 1. And now it's going. Teoh, you obviously want ever. 321 Countdown wants to said your 321 and then oh, start. So is now over going to scripts. We've got a load data and we've really got a variable. They can control this. So you say when stock it's just gonna it's going to run through its little three t one. So it's under looks say switch to custom three. Then you wait a second. So just get 31 super quick. So then we go into Lux. And then we switched to question three basic credit alone costumes. Young. We just now cycling through them so you can make these offenses you want. You could change the color. You could make it go from black to white or whatever you like. Then I'll just cycle through the costumes. Yeah, right. So then what happens? How do we make sense now that we've done that, we can also in the beginning, we just want to show it because we don't want that constantly on our screen and then hot it . Okay, so to do that is very easy. Well, owning just we'll have to do is have a little control. Weight options. So you said it three days. We don't have to keep on Syria sitting it. So for at the beginning of a here we wait three seconds. All of these things will almost be things. Um, fund. We just do it over there. Wait. That's a lot of the other little script stones dot racing off because we're gonna make them also wait three seconds off the countdown so that I can't down happen and then all of the scripts to start executing as well. So you see how you got to think this through a little bit? It's all very well to have that little countdown script happening, but fill the others. They're going to start going. If that people is gonna go crazy, he's gonna just start flapping, you know, in a weight set, you can create the illusion of a white by forcing order them to wait the same amount of time. Yeah, so we just put our wait three seconds and two or of these things. You don't have to put in some of them, but you might as well just do it. Okay, so we gotta wait three seconds there. In the end, the last civil were put away thes against over over here in this war. Most part after there will be a state. Wait three seconds before it starts playing there. And I will see when we start up projects. 321 way. Start to see. Um, one more thing you can do with the thing you see out. I did the only plays one for, like, a split second because we need have one more weight or one. Otherwise, that one's not therefore, Yeah, Tom. So we've got three. Do one, and it starts apart from being dead so you can see how it'll affect birds coming on quite nicely. Not some more advanced features. Again, it's about playing around a little. That's a fun part of coding. It is about making mistakes and learning through mistakes of the best way to learn to base where you can learn any things best where you can learn to become a skier, ride a bicycle and the best way to learn coding. The nice thing about coating is you see the results very quickly. 31. 31. Display Score: So there we have it. We have I flappy with a countdown with keeping it school, but But it's always something more you could do. So pushing our baby bird to the limits, making it more than just an ostrich. Make it exciting. It's time for us to add a scoreboard. Yeah, absolutely. Get scoreboard onto the sting. Let's get flappy on the score and you can have high schools, low schools, middle schools, whatever scores you want, Josh shots happen. Okay, so we've got a school, but to display the school when we've, um, finished Well, when we have died on the game and eso we just want painting this practice acquitted for 321 we're going to use the rectangle. Doesn't matter what color you do it, you can do it like a lot to short of color does it does not really matter. You can duplex, black school, board, orange, cobalt red school. But it really is Whatever takes your fancy do sort of yellowish skin, um, school board and we just get attacked and it sort of looks kind of like a flatbed school board there. Um, begin also, it's one thing you can do with this school board, which is pretty nasty. Aziz burgers. You know, I'm here, but on that Looks you about this thing called Got the city change from constables To regret the set And to make it this love with transparent always looks quite nasty. Got different, Lots of different things. The shards and will's yeah, with the color. And also things is good. Guy said, sort of making it more transparent. Just product. Sedative prophecy. This is just gonna make it look that much better. So you, as you see it looks what Nice there. Duck again, Get to see. Still see, the background and everything, which is a tad better than asking about Scripture gives you love. The options are actually trying to customize things a little bit more than make It is fun and interesting as you like. Yeah. So what we can also do here is add a little score. So go there and we toughened school found this will be displayed when you die. So we go. They and we just couldn't right wherever you want. Really can just be over there when we die, we let it discredits so we don't. This is going to be constantly displayed, as you know, because Junior's was thought that we're gonna have that Fed thing. In a way, it's even covering our numbers. I guess it's got, appear and reappear the right time and not been going straight. Yeah, so what we can do is we can check when it should do that by using this dead variable. So we checked that we can even grab that very well from Checked it with God's, uh, so we just duplicate doctor and River to their on that out and if did equals one then tried showed us. But we first have to let it hard in the very beginning and then so on. Then we will have. I think I need peering at the very end is off on its maiden voyage yet again, navigating perfectly through the pipes. And did it is we don't have the score appearing. Something is between Camby learned viewers out there figure out what's going on. Do you think about it? What's the logical when clicked, sir, click the game. It came through yummy at me Hitches. Daisy could have one that's not keep it hidden. And it wasn't We're missing the forever. Forever. Forever. I think I should stick to this, Not music. Yeah, eso We'll have our forever loop in there now and your work now. But you will notice one slut. Yeah, I can see so flat. He makes his way through through the first poll doing extremely well as it gets to the second poll Cleaning, Navigating the second coal coming through our bank score a school. It is not actually displaying where we wanted to. So we can make it go there. So we as we got the low emotions we can say Okay, so you get this school appearing over there, we simply just are going to create another variable, which is just gonna copy whatever scores, and we're gonna call it score Display What? That variable When we don't want to show right away. That's where we've got these. So, basically, you can just stumble. Tap that, and we'll have it like that. So we got up school display and removing Teoh Swiss diction right over there on you can make it just in the repetition. Onda, we said score display to whatever succeed school display to score super but school. So it's sort of sitting it to con Constant. You know, it's gonna finish up with what if you'll score, so it's gonna finish it or flat back. So under this one did it was that sit, show and sit school score display to school. And, um so that's going to do that? And we also need to hard this very Brolin beginning, or it's gonna be you see now, gonna be the little time s so we can show variable score display over here at the end and then the getting we hot school display. Now, you see really to go one syrah at or Black is a gang perfectly making it through the first pipes. Having something. We got to get the second piper doing well, coming through the third on Bang. And there we have it. We've got a school. So if you made it despite, you've done really well. Don't. Yeah, looking a lot more professional. And you even got your school now appearing in the center of the screen with your profit bird beat down in the debt. So you know what to do. Get out their copy. What does she is showing you and get your flappy bird to aim or influence to stage play with play with how you want to display lots of lots options, lots, lots of fun to be had on learning is in the plan. 32. 32. Adding Best Score: looking pretty good. We have our 50 birds starting to get quite advanced. We have our scorn up here in the middle, but it really would even be better if it was a high score there. So think about it. If you have a high score, somehow you have to remember what the score is every time someone plays and we need to keep a record off that and see if your score is better than the previous ones. We've got a high school. So let's see how we do that. Obviously, is gonna have something to do with the variables. Absolutely. Like, Take it away. Okay, so first of all, we need some space for high school, so we're just going to put it in its The school would have supported this, um, Onda. We put it right next to school so that you can You can immediately get both of your scores , which, if it's better than this wolf, it's the same. Lots of games do it like this and it would get a variable. So we need a new variable for this because we're gonna have to try and keep track off. What the current best score is best spoon. We've got available. We can't wants to change it to fact. And, um, we won't have this plane straight away. And with best, you would be wondering how How do you know if it's a high school and stuff like that? The way we're going to do this is, um we're going to say whatever your wind start when we get it for ever, and then we have to check. You can take a very because that and you can take two things at once. I'll show you what I mean by that. We can get this. It's a f did equals one. What means, um, the game's over and we get another one at this, so we'll show. Yeah, um, which will be a school. And we got the operators. What's weaken? Check if our school is, it's a high school, basically. So we're gonna take two things you want to check, the game's over, and we want to compare it to what the scorers want to chicken apple conditions. Yeah. So school is greater. Been best or two will be at school. Um, then sit s Oh, yeah. We just get out a little control So we're basically taken two things we're waiting for into the game, and then we check if a school is better than best. So over here, if school is better than our best school, then we said, um, best to swope. So if you you work it out logically, it makes sense, because checking once the games ended, if a school that we've Connor, you got better than best school tips at this through the current school. Yeah, right Then we can't grip based and put it over there and the same with this one stroke on the hard. So yes, go show variable best. Yeah, at the end, we should very well best. And in the beginning, we hade just like there. So now you're seeing when we play away for the tomah I love Big Bird to say we only get one school Unfortunate then our best school or we haven't got show variable best because we haven't personally Whatever they Now we see a best goes three analysis Break the record of brain you see, visit our city in Citta a best of three Some states before played get something higher three on that basis for mouthful and it is displaying on the screen because of you again and you get less than four, then the best bull not clear two years before one keep on saying the best scores. I think one of the occasions when you we're not resetting that bearable. So typically, we recent the variable when we don't want to remember it anymore. So this guy's we do want to remember it won a problem. We do have yet because it's only going to show you the variable this way. We have got a base school, but because we put just take that out of that loop and it will always show. So it was only just playing it if we beat the best school. Otherwise, you weren't going to see the base coat. Yeah, we've got a base school, and if you want, you can customize your little you know, school board. But putting aboard around it or something like that, this doesn't matter what color board a choose like it's a red border because in a levy would mean weaken your blue Britta. I will look prayer and nice at the end. You know, people border and a clapping game has been competed, right? That looking pretty awesome. So our flappy bird game is now quite advanced. So what's stopping you? Get out there finishing or your peppy bird game is ready to rock and roll. It's looking absolutely amazing. Do you follow it along? You should have been able to keep up with everything. You should have an incredible game. So through this hospital bed, you can and best score and they're customized. One part is really being able to change these things and push the boundaries. But do at the stage are now becoming an awesome mega scratch programmer. 33. 33. Conclusion: well done. Congratulations and excellent. You got to the stage. You have done extremely well. You have got an amazing Febi Bird gang. That should be the envy and the talk off your friends, family and everyone around You just have a look at this thing. I mean, days again. It looks like that should be selling on some sort of app store. And if you have followed along, you have created your very own flappy bird game. Now it's but a process. It takes time. There's a program is a bad, but it's so exciting because it gives you a rewarded, largely become creative. And these are the Skilling's. Their 21st century lawyers need that created a clean. It's about logic, or you have been learning the language off the future. Your plan is to create very own friend. Good game, but this just the starts. You could do so much Mawr and Josh is just going to show you a little bit, give you a taste of so many other things that you can also do. This is another one. It's really some more to make its probably even easier than the actual flappy bird. One that we did it, Zack. Let this similar content with it is a lot of birds falling. And you got to catch them, um, in a low nest. So this is also quite a fun one. You can make it. So as you see, there's a whole one toe hold 12 things you can do on scratch from scratch. So it's all just about understanding what you want to do, just you just have it. Show you quickly. Some of the code behind flaky fall as this one, his name not gonna talk you through it. It's really about getting the concepts rots so you can see there's not too much black. It's basically what we've got on the actual flappy bird that we made low countdown stage and not anything in this one on. That's all there is to it. And it is such a simple thing, and it is really fun. Listen, Austin, about programming, really, it's your imagination is whatever you can imagine you can literally create. And this is just the start of that journey. We would allow for you to tell us what you thought about, cause we really are here to try and make us as exciting as possible. We really want to get more, more people into programming. Joshua has created lots and lots of different. Absolutely said at the beginning. If there's something more you'd like to know, police did us know. If you would like us to do a another course on creating up some other thing, you could find things in in scraps. You can even use what's called augmented reality where the camera started. Since where you're on, you can use your hand to not things around. Look for fun. Things can be done, so radios up to your imagination. But this is a great place to start to learn to program. So it is about persistence. It's about getting it wrong and then getting it right and getting it wrong and wrong and wrong and then rocks. But as you do that, you will find you get better and better, so it's a great place to start that into code. Keep at it, and Josh and I look forward to hearing from you, and please do take a moment, if you can, to radar course, and if you don't like it, well, don't write it. That's no we'll try and make it better because that's what we want is one more thing I want to let you know about in Africa. There's a beautiful principal cord were born too. And it's all about sharing. It's about when we take something weaken. Many more people can benefit from it. And so we have that option here. Joshua, what do we have? S you can see. We've got this share option for our program. We got a very nice burger. Any kind that you make a program and you think it's very nice chicken. You can always get the opportunity to share it and let other people see how good it is and play it for themselves. Like as you see. Okay, I program will not be shade, as you can see that if you search for it, it will be said you can put instructions with you. Just say yeah, so you could bottles of the victory stuff here for people who could not play this, which is quite fun, because now and you can put you know what this game is about. Notes, instructions. And again, we will provide you some links in our video so you can get to this code now, Just go in, duplicate the code because there's no where the learning is. The real fun comes into when you actually start to do this yourself. So you want to make your own code. You want toe? Tweak these things. You want to learn to cope because when she bled to code, you can very quickly moved from here. In fact, you can even and may well have to do that in the future. This and you can even take your scratch programs and deploy them on any sort of device. There are ways to do that. You could even convert them into absent will be able to go into the APP store. Or it can just be a great way to get just started. And you're going start to learn to program and other exciting, just like Dr Screwed html Swift, etc. That's it from us. Enjoyed the tours, and we look forward to hearing from you and seeing and hearing all about the famous programs you've developed jazz. Uh,