Mar 192015
 
  • Write/think what you want your sprite to do – in detail
  • Try to think like a computer

Try these examples

Keyboard controls

  • If I press right arrow, move 10 steps
    • Test it out
  • If I press right arrow, move 10 steps left (use -10)
    • Test it out – you should now be able to move left and right…
    • But does it look good?  How can we improve it?

Gravity

  • Move sprite down all the time
    • Moving down means reducing the y coordinate
    • All the time = forever loop

Platforms

  • If sprite is standing on a platform, don’t fall 
  • Draw some platforms on the background.  Make them the same colour
  • You need to add an “if” part of your gravity block:
  • if sprite not touching colour of platform then fall
  • You need to find a NOT block for this

Jumping

  • When I press space bar, jump
  • Jump is the opposite of fall – change the y value
  • Can you jump in mid-air?  How can you stop this?

 

 

Sprites for your game

  • Search for png images, eg “zebra png” (This will find pictures with no background)
  • Use “search tools” – “usage rights” – “labelled for non-commercial use”
  • Save image as…  then in Scratch import sprite from file
  • You may need to edit pictures if you want different costumes

 

  2 Responses to “Y5/6 Scratch LQ: How do I turn my ideas into code?”

  1. I really enjoyed today!I’m looking forward to making my real game!

    How do i transfer script from 1 sprite to another?

    • Glad you enjoyed it. I’m also looking forward to everyone getting going on their games. You can transfer script by dragging it and dropping it onto another sprite.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.