1 / 3

Scratch Tutorial for Kids - Learn to Code

Scratch is developed in MIT media lab and Scratch scripts can be converted to HTML. If you want your child to get the most out of their coding skills, then consider enrolling them on Juni Learningu2019s coding program for kids. For more info visit https://junilearning.com/courses/scratch-level-1-daily-bootcamp/

alenasharma
Download Presentation

Scratch Tutorial for Kids - Learn to Code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scratch Tutorial for Kids - Learn to Code Scratch is a high-level block-based coding visual programming language in Computer science that is utilized to create interactive programs. Video games can be created in coding languages and in Scratch. Scratch website is an online community as well. JavaScript Environment is used to develop Scratch extensions. Scratch is simpler than Python because it is meant for novices. No need for coding classes to begin coding. Following is a step-by-step tutorial for a flappy bird game development for kids in MIT Scratch. 1. Choose a character Choose sprites with two costumes so that it creates a visual movement over the screen. Start by choosing a parrot on Scratch, and setting the size to 30. 2. Add the “flappy” motion code Select the parrot icon in the bottom right corner on scratch. Begin with event blocks labeled “when green flag clicked”. Get “forever” from control next. Place the “if/then/else” block within “forever” algorithms. Every time the space bar is hit by the user, animations happen and the parrot goes up in the Scratch Games. The “when space key pressed” sensing block should be the condition for the if statement. The “change y by” motion block can be used in scratch coding and the number should be 20. For the bird visual to look like there is flight motion in the game design, the “switch costume to parrot-b” looks block has to be used after y is changed. What would happen if the space bar is not pressed is defined in the else condition in this Scratch tutorial for kids. The bird should then begin to fall a little as interactive stories. Coders require the “change y by -5” motion block below the else part of the to perform this. The “switch costume to parrot -a” looks block should be used to alternate costumes and to show that the bird is in flight motion in animations. 3. Make the pillars through which the bird will fly Choose the option on scratch that resembles a paintbrush by hovering over the circle for incorporating sprites. To create pillar sprites, utilize the “rectangle” icon from the final option in the row at the beginning of Scratch. 4. Create a background for the game’s end Add a background by choosing the option that resembles a paintbrush on Scratch computer programming. Then the “text” option should be used from the second column in order to show a message to intro the user that the game has reached conclusion.

  2. 5. Game over. To add some code to the pillars sprite on the Scratch program, click on it. If the pillar hits the parrot, programmers want to terminate the game right away. A "when green flag clicked" block from Events is where we begin. We put a "forever" block from Control behind that. Insert an "if/then" control block on Scratch from Control inside "forever". The sensing block "touching Parrot" is the condition for the if statement. Utilize the Control block "stop all" and the Looks block "switch backdrop to backdrop2" to signal that the game is over. 6. Game's beginning and conclusion. Let's return to the parrot java code and make some adjustments in light of the new backdrop in these coding games. The event block "when backdrop shifts to backdrop2" will be added. When the game is over, nothing should be displayed, hence we must attach the "hidden" Looks block on Scratch coding. We need a little bit more code in between the "when green flag clicked" and "forever" blocks we previously inserted in this Scratch project. The "show" Looks block, which guarantees the presence of the bird at the beginning of each game, should come first. Next, we would like to add another Looks block in Scratch coding that says, "Switch backdrop to backdrop1." After that, we want the motion block that says "go to x/y." The parrot's starting point will be determined by doing this. Make sure the bird begins on the left side of the screen on Scratch and is in the center of the vertical axis. Place the "show" Looks block between the "when green flag clicked" and "forever" blocks on the Scratchjr we previously inserted because we also want to see the pillars when the Scratch coding game begins. 7. Bring the pillars across the screen to life. We will let the pillars shift to the left using computer science because we began with the right side. Let's acquire a "forever" block from Control and a "when green flag clicked" block from Events. We need a "go to x/y" Motion block inside "forever."This will return our pillars to their initial position. We set y to 28 and x to 180. After that, motion blocks is required to carry out the movement. Select "glide to x/y." Feel free to experiment with the time during this Scratch programming; Set it at 2.5 seconds. The extreme left must contain the x value. The pillars will turn back to the right once they reach this location. Choose -280 for x. We don't want the y value to alter at all because our pillars are just shifting horizontally. We can drag and drop the "y position" Motion block into the y area to make sure this is the case. 8. Establish a scoring variable. Select "Make a Variable" from the Variables menu in this Scratch Programming and give it the name "Score." Get a "when green flag clicked" Events block. Set Score to 0 is the initial Variables block needed. Every time a game is started, the score will be reset. Add "if/then" inside the two Control blocks labeled "forever." The bird passing through the pillars is the condition for the if statement. Using the "<" Operators block, we can find that in the if statement. The "x position" block from Motion will go in the left empty space, and we'll put -190 there. We need the "change Score by 1" Variables block inside the

  3. if/then clause. The "wait 1-second" Control block is required to ensure that the score is only updated once each time the parrot passes by. And that’s it. You can now create your own game of Flappy Bird with these coding concepts on Scratch programming language. You can also create games like “pong” and “Minecraft” using Scratch and can also create your own robotics by fusing a LEGO boost kit with Scratch. Scratch is developed in MIT media lab and Scratch scripts can be converted to HTML. If you want your child to get the most out of their coding skills, then consider enrolling them on Juni Learning’s coding program for kids.

More Related