Zmiany

Skocz do: nawigacji, wyszukiwania

Module 2 - The “Cat Chasing a Mouse” Project

Dodane 309 bajtów, 21:31, 6 lip 2015
: ''Students should find the block '''Turn to <moue pointer>.''' They can also find '''Goto <mouse pointer>.''' If they find the latter, we do not ask them to change it. We say that in that case we will test both and see which will suit us better. ''
[[Plik:Scr_old_e_2_4.jpg]]
'''Task: '''
: ''Students have already created an animation script using the '''always''' loop. If necessary, prompt them that this script should work similarly, that is always after the programme is started the Mouse should look in the direction of the mouse pointer. ''
[[Plik:Scr_old_e_2_5.jpg]]
We explain that the Mouse already knows where the computer mouse pointer is and is all the time looking at it. We ask the students to modify the script so that the Mouse moves in the direction of the mouse pointer, i.e. the direction in which it is looking. We remind them that we know which block allows us to move our Mouse.
[[Plik:Scr_old_e_2_6.jpg]]
'''We ask the following question: '''
: ''The Mouse in this case should move much more slowly, but also more precisely, because it is looking for the mouse pointer more often (after fewer steps), and so it more often adjusts the direction in which it should move. We propose to leave this speed. ''
[[Plik:Scr_old_e_2_7.jpg|center]]
: ''Ideas will probably vary, ranging from an explosion to the Mouse being eaten. We should prompt the students to get the Mouse to think e.g. “Oh, the Kitten has caught me!” and stop. We discuss what blocks we can use in this case, in what order, and in which part of the Mouse script. We write down subsequent ideas on the board – for example: ''
[[Plik:Scr_old_e_2_8.jpg]]
[[Plik:Scr_old_e_2_9.jpg]]
: ''Answers may vary, but we prompt the students that in many games (e.g. Angry Birds) we always start from the same position (we have the same chance of winning). That is why it is worth entering into the script a command which will set the Mouse in a certain position after starting the programme. ''
[[Plik:Scr_old_e_2_10.jpg|center]]
'''Task:'''
: ''Students should find the blocks '''got to x: y:''' and '''set the direction to <90>.''' They should not find it difficult set the direction '''to the left (-90)''' – one of the additional tasks in Module I was to set the sprite facing a specific direction (up, down, left, right). ''
[[Plik:Scr_old_e_2_11.jpg]]
: ''Students often incorrectly place blocks in the script (in the '''always''' loop instead of before it). If necessary, we ask a student who has managed to properly insert the blocks to demonstrate the right solution, and then we start a discussion about what would happen if we placed the blocks somewhere else. ''
[[Plik:Scr_old_e_2_12.jpg]]
We ask the students to create an appropriate script. We help them if necessary.
[[Plik:Scr_old_e_2_13.jpg]]
We draw the students’ attention to the fact that by default the Kitten has two costumes that differ in how its legs are arranged. We propose that students create an additional script for the Kitten causing the Kitten to swing its legs. We remind the students that during the previous class we already animated the sprite.
[[Plik:Scr_old_e_2_15.jpg]]
197
edycji