Utilizing MIT Scratch for Programming and Control Exercise 3 Ball Game

Using mit scratch for programming and control exercise 3 ball game l.jpg
1 / 22
0
0
758 days ago, 237 views
PowerPoint PPT Presentation
The object of the diversion is to position the third ball in a manner that alternate balls don't hit it inside of a foreordained time. Importing new sprites ...

Presentation Transcript

Slide 1

Utilizing MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007

Slide 2

What you will learn: Interactivity between items in Scratch In this practice you will research intelligence between articles in Scratch by making an amusement with three balls. Two of the balls will be energized and move around the screen. The protest of the diversion is to position the third ball in a manner that alternate balls don't hit it inside a foreordained time. Bringing in new sprites Interactivity between sprites

Slide 3

Importing new sprites Step 1 – tap on the scissors catch and snap over the feline to expel it from the stage Step 2 – tap the middle catch underneath the stage (import another sprite) Step 3 – peruse the things organizer and import baseball1

Slide 4

Importing new sprites Step 4 – rehash the procedure keeping in mind the end goal to import b-ball and beachball1 Step 5 – tap on every sprite thus and rename them in the sprite exchange box (beat focal point of the screen) with the names b-ball, beachball and baseball

Slide 5

Creating steady movement Step 6 – select the baseball . Tap on the orange control menu catch (upper left of the screen) and drag in a when green banner clicked guideline Step 7 – drag in an eternity direction and join it to the when green banner clicked direction Step 8 – select the blue movement menu Step 9 – Drag in a move 10 stages order. Drop inside the eternity direction. Reset the esteem to 7. Step 10 – Drag in an if anxious, bob guideline. Drop inside the eternity guideline. Note – The eternity direction ought to grow and encompass the movement guidelines

Slide 6

Creating consistent movement Step 11 – tap the green catch and watch the baseball ricochet around Step 12 – rehash this procedure for the beachball

Slide 7

Interactivity beachball The following stage is to get the energized balls to associate with each other and the non enlivened ball Step 13 –select the beachball sprite tap the control menu and drag in when green banner clicked , everlastingly and if (condition) guidelines

Slide 8

Interactivity beachball Step 14 – tap on the green numbers menu – pick the OR administrator (we need something to happen if this ball is touch another ball OR the other one). Drop the OR administrator inside the if (condition)

Slide 9

Interactivity beachball Step 15 – tap on the blue detecting menu – pull crosswise over two touching directions and set the drop down for the other two balls.

Slide 10

Interactivity beachball Step 16 – drop the two touching charges into the OR administrator

Slide 11

Interactivity beachball Step 17 – from the blue movement direction set drop in a turn 15 degrees guideline. From the purple looks directions set drop in a make proper acquaintance for 2 seconds guideline Step 18 – reset the separate qualities to 179 degrees , Hit! what's more, 1 second

Slide 12

Interactivity baseball Step 19 – make this same script for the baseball Both the baseball and the beachball now have two comparative scripts. One script does the movement, alternate does the intuitiveness with different balls

Slide 13

Interactivity b-ball Step 20 – select the b-ball and reproduce the script that you have quite recently made for the other two balls aside from the turn direction

Slide 14

Interactivity b-ball Step 21 – from the detecting menu check the clock choice (this will put a clock on the stage)

Slide 15

Interactivity b-ball Step 22 – drop in the reset clock guidelines as appeared. This will reset the time toward the begin of the amusement and at whatever point both of the moving balls hits the b-ball

Slide 16

Movement b-ball Step 23 - As it is the wicker container ball that will be moved by the individual playing the diversion, we need to incorporate a script that will accomplish this. (This script is like one made in a past work out)

Slide 17

Scoring In the following procedure we need to give score for if the balls dodge each other for 5 or 10 seconds Step 24 – with the b-ball chose, make another script beginning with the when green banner clicked direction. Drop in three if (restrictive) directions

Slide 18

Scoring Step 25 – from the numbers menu select the AND operand. Select the more noteworthy than and not as much as operands and drop these into the AND operand. Drop two clocks into the operand so that the choices are timer>5 and timer<10

Slide 19

Scoring Step 26 – from the purple looks menu drop in make proper acquaintance for 2 seconds and change the qualities to state score 5 focuses for 1 second Step 27 – the following if (condition) guideline set the condition to clock >10 and say score 10 focuses . In the last if (condition) set to clock >15 and drop in a reset clock guideline

Slide 20

Scoring

Slide 21

Importing a foundation Step 28 – Click the stage catch and select the inside tab in the stage outline discourse. Peruse the standard foundations and import a foundation for the stage

Slide 22

Playing the diversion Click the enter presentation mode catch on the base left of the stage and view your amusement in full screen The protest of the amusement is to position the third ball utilizing the bolt keys as a part of such a path, to the point that alternate balls don't hit it inside the 16 second time constrain

SPONSORS