The first Session involved students familiarising themselves with the layout of the tool's interface. Following given instructions and scripts to bring about increasingly complex animation effects. Within the session students used the default "sprite" initially and blocks from the control, motion and looks scripts areas only to bring about 3 different types of animation.
- Activity one bringing about movement as a flip in position using an on mouse click event.
- Activity two bringing about continuous movement of the sprite from one side of the stage to another, with an image swap to add interest to the sprite's actions and a change of direction when it reached the edge of the screen.
- Activity 3 using four separate scripts, that on click or use of a keystroke would allow user control of the sprite to move it around the stage using the up, down, left and right keys on the keyboard.
Activity 1
As the students worked with the above script they discovered that the sprite didn't simply flip, but rather rotated as it changed direction. The students were encouraged therefore to explore what would happen if... they changed the settings of the motion buttons highlighted in the image above. Could they
- make the sprite mirror as it turned
- stand on its head
- step forward and back?
Activity 2
Running this script, the sprite walks back and forward across the stage when the green flag is clicked, its moevement repeated because of the forever loop until the red stop button is pressed. Again in running this script students were asked to explore the effects of changing the position of the motion buttons, but in addition to explore what would happen if we altered some of the variables in the motion blocks.
- Could we slow down the sprite?
- Could we speed it up?
- Could we make the sprite's speed vary so during some parts of the routine the sprite seemed to be moving faster than at others?
- How did our changes effect the way he/she looked as they moved?
What would happen if...
we changed the green flag header block for the
"when [something] key pressed,"
or "when sprite clicked"
header blocks.
Activity 3
Here students were encouraged to recreate a script that would enable them to control the sprite using the arrow keys, so that for example when the right arrow key is pressed and held down the sprite walks towards the right side of the stage. This example with the addition of a cap block will bring about movement towards the bottom of the stage by the sprite when the down arrow key is pressed.
Having completed one of the scripts the students were shown how to duplicate it and then how to edit the values according to given models values in the images below. The addition of green flag caps to the procedures, meant that on clicking the green flag the program would run, allowing the students to control the sprite's movement across the stage in the up. down, left and right directions. In effect they could take the sprite for a walk.
These were then tested to ensure that they worked, and then further edited if need be to correct them.
To engage the students in evaluating this Focussed Practical Task, they were asked... If we were making a computer game of our own...
How might this set of procedures be useful
Where might we use them, and what might be happening in our game?
Following discussion several familiar gaming type scenarios arose
- Perhaps we might want to move our character around a room, perhaps colecting things.
- Perhaps we might want to move our character around a maze.
Extension
Having copied the scripts and set a scene where the sprite could be moved with the keyboard the students now wanted to play with what they had done..
- Could they change the sprite or character they were animating?
- Could they set a scene for the character or sprites actions to happen in?
- explored importing new sprites to replace the cat.
- investigating how they could get their new sprite to follow the instructions they created for the cat.
- Adding an extra sprite and having it move using one of our earlier scripts at the same time as the original sprite.
- Editing, recolouring and changing the sprites they had imported.
- Importing image backgrounds from collection or from the web as well as creating background images providing context to the action.
- How do we get the characters to do things when they meet or bump into each other?
- How do we get sprites to interact with each other?..
This seems right now a good place to stop.. As it was with the students... Leaving them with a cliff hanger and waning more next time, when I have promised them with this as the prerequisite scene setter, that during our next set of activities involving the use of "sensing blocks," we wil be creating a very simple game a "keepy uppy type" game. This will involve creating a "paddle" and "bouncing ball" the first steps in creating our own versions of "breakout." Hope you drop by for our next installment.