Pages

28.5.10

Patterning With LOGO

Adding the National Geographic Photo of the Day widget to my Google Desktop and blog has been a real winner in terms of personal inspiration and as a creative spark over the last couple of years. Usually the images lead me to Language and Literacy ideas, but  this image from the 6/5/10 set me thinking about a possible context and and alternative in to working using LOGO with our older Phase 2 students next term. 

In previous posts I have explored the use of MSWLOGO a freeware tool and MS Paint within the context of the Mathematics classroom, developing ideas around the properties of shape, rotational symmetry and patterning, but using this image as a starting point and available design for the journey, what would happen if... this was extended to explore tessellation and repeated patterning, using copy and paste processes?



Image Credit: Hazrat Ali Mosque, Afghanistan  National Geographic Photo of the Day 06/05/10

23.5.10

Making and Playing Computer Games With Scratch: Episode 2 A keepy Uppy Paddle and Ball Game

In the last post we were left with a cliffhanger. We had used a series of given scripts to take our sprite for a walk and used imported, downloaded or self created backgrounds to provide a context or place for this to take place.  Some of the students had also experimented within scenes, changing sprites or adding additional characters and objects.  The questions being raised as we worked reflected how the students wanted something different to happen when their sprites met, we weren't quite sure what but we knew that when characters and objects meet or "touch in a "real" computer game something usually happens.

This week we began again with an empty stage, and a session outcome to develop or create a small scale project where one object (or Sprite) within the environment would be programmed to interact with others.  Building on student queries, I thought it would be a nice idea to build a simple game.  I decided to borrow from a Phase 3 task and to build a version of the arcade game "breakout," but that I would limit the outcome to using only the paddle and ball sections of the game building a  "keepy uppy game."  Keeping the idea as simple as possible I hoped would allow me to build on student excitement from the previous session, and allow discussion of events and outcomes as procedures were added to the game.

With the world cup coming up there may be some interest in this fairly straight forward set of scripts, and the editing and extension possibilities they afford for adaptation of the initial idea.  Theming the game from its origins into something soccer like, using existing scripts as the basis, and including a spoonful or two of creative playfulness by the students could make for some wonderful ideas.  This however is an extension idea to come back to at the end of this post.  Needless to say the game of "keepy uppy" is one of those things we probably use as teachers a lot in skills practice during PE, or have played as children ourselves in the garden, with a tennis racket and ball or a football.   What I think students will enjoy about this as a creative starting point is that essentially it uses two sprites and a background.  Both sprites are fairly simple in their purpose, while changes and careful choice of background gives us a visual backstory or context for our game.




To introduce the session I began at the end...  modelling through a prepared design what we would be looking for if we were successful in making our game.  The students were asked if their game needed to look like this in order for it to be a successful design?  There are many games that work in similar ways but that look very different.  What could we change before we begin creating and building the code?

The stage I used contained a star field, a rectangular space ship for a bat and an asteroidish type ball.  Pressing the green flag set the asteroid in motion, while moving the mouse dragged the bat back and forth across the bottom of the stage (the x axis of movement).  When the asteroid hit the bat it bounced off until it hit the upper sides or top edge of the stage when it bounced and changed direction.  If we missed the asteroid and it made contact with the bottom of the screen then the game stopped running and was over.  This process was described to the students in pretty much this way as the model was demonstrated.  Why?  As well as following instructions I want the students to be able to see and begin evaluating step by step what was intended to happen as the program runs. Describing the intended actions in this way, I hoped would encourage the students to begin reasoning aloud and visualising what the code blocks they would later be building were intended to do.  In turn helping us to focus on particular blocks and what might be happening if the project did not work as expected.   

The students were asked where else the game could take place?
  • In a cave
  • in the snow
  • on the moon
  • outer space
  • under the sea
  • in the kitchen
  • In the classroom
were among suggestions made.

What might be falling/moving or flying in these spaces?
  • fish
  • meteorites
  • planets
  • bowls or cups
  • food
  • snowballs

What might be used to hit, catch, bounce or keep up these objects
  • pans
  • polar bears
  • spaceships
  • hands

The students had some really interesting ideas, many possible "right" answers, but to begin the activity, and inorder to ensure our code blocks did as intended I added the initial design stage proviso, that the part of the bat that meets the ball must be flat. The reason for this being that during the opening part of the software based activity I wanted the students to edit and alter the sprites that they chose to use.

The students began with their stage and the game background,
  • either importing a background from collection that matched the idea they had
  • searching for a background on the web they could download, import and use to set the scene for the game.
  • or creating a background of their own
To the lower edge of the background a coloured line was added from one side to the other.  The reason for which will become clear later.

    The students then deleted the default sprite to create their "ball."  This was imported from the collection and edited to work with and be in keeping with their background and so the game's backstory

    Finally the students created or added a new sprite that would be their bat.   This was
    • either a sprite from collection edited to include a flat surface
    • or a new sprite painted from scratch and designed to fit with the backstory.
    With the background added and sprites created we were ready to code our game.  The students were provided with support sheets, to guide them through the addition of code blocks to control the ball and bat sprites.  We began with the bat or paddle.  This object needed simply to be able to move across the screen from left to right, following the motion of the mouse.  This was achieved by clicking on our bat/paddle sprite, then the script tab and dragging the following code blocks into the space.


    The students were then encouraged to test the procedure, clicking the green flag header block, and observing the onscreen effect, and sharing their ideas about what was happening with each other.

    With the bat/paddle/ working correctly we moved on to add scripts to the "ball" sprite, using the following script blocks.



    I have included comments in this image, the yellow caption blocks, to demonstrate a feature of Scratch shown to me by one of the students this week. I didn't realise this function was available, but right clicking in the script area reveals a context menu, from which a comment block can be added, and descriptions of a code block or procedure and its function added. Dragging the comment to a particular section of the code visually links it. Thanks to J, this tool has now been added to my session plans for phase 3 next week, when students will be asked to create screen shots of their game projects and to annotate them to support our APP process. Loving this...never too old to learn something new.

    The challenge in creating these procedures lies in the fact that some code blocks, require combining blocks from different areas eg using a control block with a sensing block, to create the forever if touching shuttle command, or combining a motion block with an operator to construct the point in direction or turn clockwise something degrees command.

    The students were really excited about the outcomes, and enjoyed playing each other's games and adding the score variable made a real difference to the feel of what they had created.

    The possible extension I mentioned earlier relates to the Soccer World Cup coming up in South Africa.  It could be fun with the scripting now done to import photographs of players to scratch and then edit these to include as the "bat" sprite.  How many times can "Rooney" keep up the ball.  Perhaps the head only of the character could be added to a painted sprite with feet and head, allowing use of both to be used in the game?  What might a keepy up game look like if it were an animal or intergalactic cup?  What might be used for a ball? What if our favourite players were practicing in the kitchen or our school classroom before a match? What might they use to play keepy uppy with.

    Hope this is useful.  Have fun.  If you use this with your students or any other creative ideas inspire you around this post please share these through comments.  Thank you for reading.

      Riddle Me Ree! What a Difference a Name Makes.

      Floor Turtles and Procedures..  Or Riddle me Rees?

      I 've been working on an iterative unit of learning with some of our Lower Phase 2 students this term, that seeks to build on their previous work using Beebots.   The unit has focussed on
      • routes
      • giving and following instructions
      • developing procedures
      • and prediction and reasoning about shape, space and measure
      while drawing on creative and imaginative work evolving through ongoing activities in class.

      There is enormous potential for cross curricular activity using control based activity within the primary curriculum to engage with the concept of routes and navigation.  Younger students have enjoyed creating games based on programming the Beebot to navigate mazes, collect and sequence objects, moving the floor turtle from point a to point b with as few breaks in the programming structure as possible.  Moving to the Probot should not be that different it seems to me.  The process of inputting procedures may be new with the addition of a numerical keypad, but the type of game or activity can remain quite similar.

      The students are currently engaged with a theme about Pirates... They are excited and stimulated by treasure maps (several making, designing and then aging these at home with their parents), huge wooden sailing ships, and the writing and using of riddles and clues, but one key tool was missing two weeks ago that would truly aid a successful pirate in navigating his/her ship, and unravelling and following the clues left for them.

      In my first session with the students I decided to create floor compasses with them. What self respecting pirate would head out on treacherous seas and high adventure without one. This was an entirely give and go session
      • modelling how to use the Probot
      • inputting instructions with the keypad
      • how to clear memory when we had finished
      • use of the pen holder as a means to record outputs from the probot
      • observing input and output in action.  
      This took a little longer than expected, creating the skeleton for the compass rose with the probot and pen was fairly straightforward, but the additional measuring and drawing tasks needed to create the rose from the skeleton were quite a challenge for the group.  Persevering and extending the session to allow for additional support, taking students out in small groups to complete the task however really paid off in terms of the student satisfaction and pleasure at their completed outcomes, and the discussion that evolved.  The students were asked to choose  3 colours with which to decorate their compass, and as they worked to identify the shapes and patterns they were creating within the rose.
      • What shapes could they see?
      • How many of each shape (triangles and quadrilaterals) could they find?
      • What was special about the shapes that touched?
      • Could they see any lines of symmetry within the shape?
      • Could they label the cardinal points of the compass?
      • What might be the names of the points in between? 
      The completed compass roses have been trimmed, mounted and displayed as part of ongoing classroom work.  

      During Literacy sessions the students have been working on writing riddles and solving clues.  To consolidate and link to this I decided to create some riddles that the Probot could be used to solve.  This would allow the students
      • to practice input independently, 
      • and to observe output.   
      Each group was given a support sheet containing a series of "riddles," procedures, that when the Probot was programmed would result in the pen tracing particular shapes on large sheets of paper.  I hoped that the students would enjoy the task, but was not expecting the excitement that followed.  Changing the name of the task to "Riddle Me Ree, What can I be?" and adding the idea that this was "Pirate Challenge" that we needed to work on as a "Crew" really motivated the group. They wanted to be first to finish, but when pointed to the idea that finishing first was less important than accuracy in following clues they worked hard to organise themselves
      • Taking Turns to enter inputs
      • Checking that inputs were accurate, 
      • Correct where mistakes had been made, sometimes this involved deleting the whole procedure and beginning again, and for some groups who had spotted you could navigate the menu, only removing parts that were incorrect and correcting them.
      The students were initially surprised by the idea that these instructions could produce recognisable shapes, but this further motivated them to see what the next procedure would produce.  Working with each group I encouraged them to look at what they were entering into the key pad, and the outcomes they had developed.  Could they predict what shape their next riddles might produce.

      eg You had four sets of  fd 10 rt 90 this had produced a square.
           You had three sets of fd 10 rt 120 this produced a ?
           What might 6 sets of fd 10 rt 60 make?

      The final riddles included repeat procedures, and the students had not had these explained to them, either what they were, or how to input these to the keypad.  This challenge was theirs, could they figure this out for themselves.  Several of the groups had few problems, but I have to admit to not actually explaining the how to any of the groups I worked with, yet they all managed to find out how for themselves, seeking help from others when they got stuck, another winner in this session.

      To complete the challenge the students had to label the shapes with their names and add the riddle that had lead to the creation of the shape.  These too are ready for display, perhaps in the ICT space.  I realy like this activity and intend to adapt it when I begin using LOGO next term with Years 4 and 5.

      This week the students began creating treasure island maps on large sheets of paper.  On these the students have again been encouraged to draw on their classroom work, to add mysterious and hazardous places with strange and spooky names.  I really want the students to add 10cm x 10 cm grids to these maps, though they may need some help with this reflecting on experiences with the floor compass, before using their floor compasses, their developing knowledge of input and output with the probot, their experiences of writing riddles and using my clues to create written directions to the mystery location of the treasure.  These will then be tested and evaluated by other students who will be challenged to use these clues to find where an imaginary X marks the spot.  Hopefully the students will be as excited and motivated by this challenge as they have been by the others.

      22.5.10

      Making and playing Computer Games With Scratch: Embedding Games to Share

      This post is jumping ahead slightly, since most of my students are still involved in the design and make stages of the process, however one or two have begun to ask, how they can share their games when finished.

      After a search around I came across this solution in the Scratch Forums, and as I talk my way through the process for myself I hope that the content here will be useful for others.  One of my main reasons for looking into this was the evaluation process, within AF1 of phase 3 units of work, and wanting to make available outcomes created by students for peer assessment and review.  The obvious thing to do was to place finished games on the VLE or to encourage students to upload content to a wiki, and use commenting as a way of feeding back.

      The VLE with the above solution has been a no go, even with absolute link locations copied and pasted to seperately uploaded html pages, the VLE (Fronter) seems unable to deliver the content. Perhaps this ia an issue with the way files are stored or access rights managed within the platform, either way the html pages will open, but the same error message appears afterward, about being unable to locate the file, regardless of attempts to redirect file locations and so on.  I'm sure someone will be able to help, and I would be grateful for any comments that lead me toward resolving this.  I guess I also need to contact my colleagues at Fronter, to get their take on this, and to discuss this with our Primary VLE colleagues at ITs Learning, when we meet this week.

      SO! to the work around!

      For the time being I have opted instead to create a web folder on our web server, to add the game files and applets to this space and then to use hyperlinks from within the VLE or from the school website to enable access to and sharing of these outcomes of learning.  So how did this work?

      First of all on my local machine/school laptop I created a folder called "scratch_games" and into this have copied completed student game (scratch) files.  These have been renamed to exclude capital lettersextraneous characters - the students for some reason insist on adding - and spaces.  They have been reduced to a common format eg si_pacman.sb

      • where si is the student's name
      • pacman is the game
      • .sb is the scratch file extension.
      Into this folder I have also placed one copy of each of the java applets downloaded from the site above

      • ScratchApplet.jar
      • soundbank.gm
      For each game a separate html file has also been created, also using the naming convention above but saved with a file extension .htm eg si_packman.htm

      The html files were created using this file template using code copied from the above site to a notepad document, that was then edited as follows.


      Using save as, selecting all files from the file type drop down, these were then saved in the file convention outlined above eg si_gamename.htm

      A home page or index file is the next step, created within the Pacman Project folder with individual hyperlinks to each game.  Though I will probably play with this idea a little if the embed code works here so that each game is accessible within a single project page.

      The "Pacman" folder containing all scratch files, java applets and html files were then uploaded to the school's web server clicking the following hyperlinks will allow you to see examples of how the games currently appear in individual html files.  Clcikcing the green flag will start the games, and use of the arrow keys will allow the games to be played.

      Unfortunately, for the time being at least, I am unable to embed the applet to run directly in my blog, but this is my next challenge.  I am sure there is tweak out there somewhere, something I am missing, and am hopeful that either another "blogger" user can help and leap to my rescue with this particular platform, or that some of my other more experienced visitors can help overcome the wider issue.  I hope this makes sense is useful.  I look forward to any comments, and thoughts from visitors.  Thank you in advance. :o)

      An Additional line of thought from a colleague

      After Posting at the weekend, I was contacted through comments about an additional means I could try to run the student's scratch games.  The above process still applies and is required for this idea and tool to work.  Having created the folder, added the scratch files themselves and created an html page for each file using the code above, these are then uploaded to the host web space as outlined above. Next an iframe within the new page.  Here is the code that I used in blogger...


      The file linked to above should be saved as is, and maintained as a text file, however changing the url and then saving the file makes it a template to be copied and pasted with minor editing needed to point the frame at what you want inside it.  Eg in the case of my iframe above the individual student games and so, all I needed to edit after copying and pasting was the html file name, in blue above.

      As of yet I have not tried this out in the VLE, but this is something to move onto next. Have a play and see how you get on.

      Scratch Embed Trial

      This is a trial space as I explore embedding some of my student's Scratch Games into web spaces for sharing.  Currently the scratch Applet is running fine within individual pages created for each game and placed on the school web server  These can be accessed via the hyperlinks if you'd like a look.


      The Applet itself is opening in my blog using the same embed code, but can't currently access the game files to run them.  Pondering whether this might be a firewall issue as files hosted on LA web Space!?  Any thoughts?






      Thanks in advance! :0)

      Building on comments from Sam R I have added an iframe linked to J's Frog Eating Thing.  This seems to have done the trick on Blogger as you can see below. The iframe links back to the holding page uploaded to the school web server, perhaps this is the solution to my other problems, will check this out, and update blog later with process.  Thanks to Sam R for all your help with this :o)