Scratch with Intel NUC, Chapter3

Page 1


1. Incredible theories in simple programs… We have only programmed two simple scratch codes so far, but we have actually practiced amazing coding skills up till now. First, as you think of and build a story, you can learn the program syntax with logical thoughts. Next, you have used a coding skill of ‘Object Oriented,’ which is one of the most important concepts in software history. Also, you have learned ‘Multi-Thread’, a very advanced programing skill, through a process called collision. Animation, game and ‘Multi-Media’ concepts have been implemented, too. Do you like decorating? I will show you the one I decorated. Why has the big screen appeared? You will figure it out when you close the screen by clicking the button on the upper left corner of the screen. As you will see, this is because you have pressed the button in the ‘Stage' section. You can make and bring all these things in the ‘Sprite List' section. Select ‘Wizard Boy’ from 'Sprite Library' and click the ‘Costumes’ tab on the top of the ‘Palette’ section. We call the newly created section ‘Paint Editor’. Scratch has two modes for editing graphics. On the bottom right side, you can find the ‘Wizard Boy’ is in ‘Vector Mode’.


For your Information, there are many sprites of 'Bitmap Mode' in the 'Sprite Library'. When you click the icon with ‘Wizard Boy,’ some new ‘Paint Editor Tools' will be added on the right. Now select ‘ungroup’ tool and see what happens to 'Wizard Boy'.

▲ Ungroup (before)

▲ Ungroup (after)

‘Paint Editor Tools’ of the ‘Bitmap mode’ are placed on the left. You can find by yourself the difference between Vector and Bitmap.

2. Changing directions. ‘Among the 4 types of ‘New Sprite‘ buttons on the upper right hand corner of the ‘Sprite List’ section, choose ‘Chose spite from library’, Find ‘Wizard boy’ and double click. It should be looking to the right like the cat. Click ‘Wizard Boy’ in the ‘Sprite List’ section and select the ‘Costumes’ tap above the ‘Palette’ section. When you click ‘Flip leftright’, which is on the upper right hand side of the ‘Paint Editor’, he will face the cat.


▲ Flip left-right (before)

▲ Flip left-right (after)

There is another way to do this. Click the exclamation mark on the upper left corner of ‘Wizard Boy’, which is in the ’Sprite List’. On the top right corner of the new screen, ‘direction’ is set at 90 degrees. Click the clock hand shape bar and move it around, then place it at minus 90 degrees.

Click the center one from the three types of the ‘rotation style'.


There is one more method. Now let’s add a new ‘sprite’. This time, click the one in the middle of the ‘rotation style’. No difference, right?

Move the clock’s ‘direction.’ You will feel the difference from the last one. When could it finally face the cat?


3. Making backgrounds and effects with ‘Backdrop’ It would be better if we had a background. Among the 4 types of ‘new backdrop’ on the left to the ‘sprite list’, click ‘Choose backdrop from library’..

I selected the ‘Spotlight-stage’. Then, the second tap at the ‘Palette’ section will automatically change from ‘Costumes’ to ‘Backdrops’. What should we do if we don’t like the background? Click ‘Delete’ button that has a ‘Scissors’ shape on the top of the screen, and click the background icon on the ‘Backdrops’ tap.

You can also

program

the

background. Click the ‘Script’ tap above the ‘palette’ section. From the ‘Control’ function, bring the ‘forever’ block to the ‘Script Area’. Bring two of the ‘repeat 10’ blocks and place them in the ‘forever’ block. Change the number from 10 to 2. Drag two of the ‘wait 1 secs’ blocks and place them

in the ‘repeat’ blocks.

Change the number from 1 to 0.3. Now, go to the ‘Looks’ function and choose two blocks called ‘change color effect by 25’, then put them under the ‘wait’ block. Change ‘color’ to ‘brightness’ and numbers to -5 and 5, respectively.


It only

won't

work

with

the

‘forever’

Of

the

‘Events’

block.

function, place the “when ‘Green flag’ clicked” block on top of the ‘forever’ block. It is better to place the effects‘

‘clear block

graphic in

the

beginning when there are several

types

of

backgrounds.

4. Making characters and adding sound effects Let’s make a new character. Of the 4 types of ‘New sprite’ buttons on the upper right corner of the ‘Sprite List’ section, choose ‘Paint new sprite’.

As the ‘Sprite 2’ object is created, the ‘Costumes’ tap above the ‘Palette’ section will be activated. You can check that it is on ‘Bitmap Mode’. Now, you can freely do the design using tools under and on the left hand side of the ‘Paint Editor’ screen.


You can click ‘Undo’ whenever you want to go back.

I will add sound effects to the character and scene that I have made. Connect a headset with a microphone to a USB port of NUC. Click 'Sounds' tab of 'Palette' section. On the top left corner, select ‘Record new sound’ among ‘New sounds’ icons. A new object called ’recording1‘ has been created.

Select

the recording button, then click ‘allow’ in a

small window. From now on, when you talk on the microphone, it will be recorded. After the recording is done, click stop button. To check the recorded contents, you can click the play button. If you save it through ‘File’, the character and sound that you have made so far will be saved together. If you have some troubles to record sounds at Off-line mode, try with On-line mode by internet browser. You can use the saved sound file at Off-line mode later.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.