To start the game we’ll click the green flag icon. When the game starts, the penguin sprite will be moved to this position.
Logix pro name and key field code#
Handily, the “Go to X Y” code block has the sprite’s current position already loaded into it. Start a new stack of code blocks by dragging a “Go to X Y” code block from the blue “Motion” category, and a “Set My Variable To” code block from the orange “Variables” category, and click them together. It’ll snuggle into place between the “When Space Key Pressed” and “Start Sound” code blocks. Drop it below the “When Space Key Pressed” code block. From the magenta “Sounds” category drag a “Start Sound” code block and select “Chirp” from its drop-down menu. Select “score” from the drop-down menu in the “Change My Variable by” code block.įrom the yellow “Events” category, drag a “When Space Key Pressed” code block and drop it at the top of our stack code blocks. We’ll call our new variable “score.” Click the blue “OK” button.ĭrag a “Change My Variable by” code block and attach it to the bottom of our growing stack of code blocks. This will make our sprite bob up into the air and then fall back down.Ĭlick the orange “Variables” dot icon, then click the “Make a Variable” button. This set of code blocks will move our spite upward 10 times in steps of 15 pixels, and then downward again in 10 steps of 15 pixels. If you drag this code block to the bottom of the first code block they’ll click together and become one larger code block.Ĭhange the values in the “Change Y by” code blocks to 15 and -15. Repeat that process so that you have another “Change Y by” code block wrapped inside another “Repeat” code block. If you ever drag out the wrong code block just click on it and then hit the “Delete” key. The code inside the repeat block will be repeated 10 times. It should wrap itself around the change block. Drop it over the “Change Y by” code block. Select the yellow “Control” dot icon, and drag a “Repeat” code block to the main screen. Because 10 is a positive number, the new position of the sprite will be higher on the screen than its old position. This code block moves the sprite 10 pixels in the Y-axis, which is the up and down axis. Make sure the “Motion” blue dot icon is selected, and drag the “Change Y by” code block into the main screen area.
The preview window will show your sprite and backdrop. Click the blue “Landscape” icon in the bottom right of the screen, and click the “Choose a Backdrop” (magnifying glass) menu item. The sprite you choose is shown in your sprite window and in the preview window. Looking through other programmers’ code is a great way to learn as well. Registering allows you to store your projects online and return to them later. To get started, visit the Scratch online platform and register for a new account.
Scratch is a platform for creating programs and also for sharing them. RELATED: Learn to Code with These Awesome Apps and Websites Registering a Scratch Account It’s mostly drag-and-drop, so there’s little chance of a typo causing a meltdown.
It’s a very high-level programming language, so getting things done quickly is easy. Whatever it is, it has to look like an endeavor they want to be involved in. To capture the imagination of young children you need to make things fun. But making programming engaging and satisfying for young minds isn’t as easy as simply plonking them in front of an editor. And like most learned skills, the earlier you start the better. There’s always another idea or project you can pursue. The implementation phase requires understanding the programming language, the logical piece-by-piece assembly of the code, and the methodical and analytical debugging of the program.Īs you develop your skills, programming continues to stretch you. The idea phase requires planning and creativity. It requires and refines many desirable skills. Children especially benefit from the repeated experience of taking an idea and producing a finished program. The very act of learning to program is a worthwhile discipline. Coding improves problem-solving skills, promotes analytical thinking, and fosters creativity. Scratch is a visual, drag-and-drop introduction to programming for kids.