P7E Scratch Projects!

We had great fun today in P7E - learning about "code" - what it is, where you can find it and just how important it has become in everyday life.

Attached to this article are copies of the class code projects. Download them to your PC/Laptop and upload them into the Scratch website here: https://scratch.mit.edu/ (Remember... follow the CREATE link to get to the code editor!)

If you'd like to show family and friends what Scratch is all about, here's the introductory video that we watched together.

And finally.... we built a game app! "WPS Pong"! The code files for that project are also attached to this article - just download WPSPong.sb2 and have fun!

Attachments:
Download this file (Aaron-Anna.sb2)Aaron-Anna.sb2[ ]578 kB
Download this file (Alexandra.sb2)Alexandra.sb2[ ]1410 kB
Download this file (Callum-Gary.sb2)Callum-Gary.sb2[ ]1796 kB
Download this file (Emma-Mia.sb2)Emma-Mia.sb2[ ]23 kB
Download this file (Ethan-Rebekah.sb2)Ethan-Rebekah.sb2[ ]2112 kB
Download this file (Kaci-Adam.sb2)Kaci-Adam.sb2[ ]0 kB
Download this file (Katie-Bobby.sb2)Katie-Bobby.sb2[ ]0 kB
Download this file (Morgan.sb2)Morgan.sb2[ ]1841 kB
Download this file (Reuben.sb2)Reuben.sb2[ ]571 kB
Download this file (Sam-Abi.sb2)Sam-Abi.sb2[ ]835 kB
Download this file (Will-Amy.sb2)Will-Amy.sb2[ ]1764 kB
Download this file (WPSPong.sb2)WPSPong.sb2[ ]23 kB

P7E Scratch Project 2 - Angles - A Step Further

Try this one at home... save the attached Scratch file to your PC and then upload it to Scratch. This one has had a few extras added to make it more interactive

  • The ASK command asks the user "What shape do you want me to draw?"
  • Depending on the ANSWER... we drop into a number of different code blocks

Take a look inside and see if you can add some more! (we don't have a triangle done yet - 3 sides, 120 degrees per turn)

Attachments:
Download this file (Making Angles with choices.sb2)Making Angles with choices.sb2[ ]35 kB

P7E Scratch Project 2 Files - Angles

Our next project in Scratch Coding was to use a sprite to draw some shapes. We learned a LOT of new controls in scratch such as:

  • Moving a sprite to an X/Y position on the screen
  • Making a REPEAT loop - so that our snippets of code can repeat over and over (without us having to re-code it!)
  • Making a sprite "glide" from one place to another
  • How to work with the PEN - by putting the pen up/down and using the "clear" command to wipe the pen lines out!
  • How to set the "angle" of our sprite to make sure it is pointing the right way
  • How to rotate our sprite through a defined number of degrees
  • How to combine all of this to draw shapes!

Our example started off with our sprite (the shark) drawing a 6 sided hexagon. After drawing each side. the sprite rotated clockwise by 60 degrees. This process was repeated 6 times until the hexagon was drawn. 

We then worked in our groups to make our character draw all sorts of shapes! We drew:

  • squares (4 sides, with a 90 degree turn at each corner)
  • hexagons (8 sides, with a 45 degree turn at each vertex)
  • circles (by drawing 360 lines, each just 1 pixel long, rotating 1 degree after each line! Remember, computers cant draw curves!... they just join together lots of REALLY small straight lines to make it LOOK like a curve)

Here are some images showing samples of our code:

After we learned how to draw different shapes, we then had great fun, applying ALL of what we'd learned - creating some rather crazy shapes. Check out a couple of our videos below. Somehow.... one of the teams managed to include 5 sprites that were in fact "selfies" of the group.... and a shark from Belfast! 

You can download your team's scratch code in the attached files below. They are named according to where you were seated in the room. Open your classmates' projects to see how they did what they did! Have a go at remixing some of the code to add your own ideas.

P7E Scratch Project 1 Files - Try it at home!

Our first project was to learn how to start coding in scratch. We learned:

  • How to open up the Scratch coding editor
  • How to add a "sprite" (or character)
  • How to place our sprite on the "stage" 
  • How to move our sprite up/down/left/right
  • How to assign keys to these movements
  • How to add sounds
  • How to change our sprite's "costume"
  • How to start our app by clicking the green flag

Here are some pictures showing how we coded our first app in Scratch:

Here are 2 of our apps in action! When we press the up/down/left/right keys, our sprites moved across the stage! We started to experiment with adding sounds to the characters. 

Below are copies of some of our scratch code. These can be downloaded and tried at home. All you need is a PC, laptop or Mac.

  1. Download one of the attached scratch code files from class - save it to a folder where you can find it again! (maybe on your desktop)
  2. Goto the scratch website at https://scratch.mit.edu/ 
  3. Click the TRY IT OUT button
  4. Click FILE, UPLOAD FROM YOUR COMPUTER 
  5. Pick your school scratch code file, and upload. 
  6. Your project is ready to remix!

Not all of the projects got saved properly - so if your team's code isn't here, open up some of the other projects and have go at remixing it yourself!

 

 

Installing Scratch on your PC/Laptop/Mac

You can run Scratch online without needing ANY software. Just visit https://scratch.mit.edu and click the "TRY IT OUT" link. There you will find over 12 MILLION projects uploaded by children all  over the world, so you'll have plenty of ideas. If you like a project, just click the "SEE INSIDE" link to have a peek at how they coded it! Play about with the code and see what changes. 

Your other option is to install Scratch 2 on your PC which allows you to code OFFLINE (ie. when you don't have a wifi connection). This option also allows you to make videos of your scratch projects in action. Just follow the instructions on this page https://scratch.mit.edu/scratch2download/ 

Working with angles

Attached is a sample scratch project file - showing how we can make one of our sprites (characters) draw a hexagon. Try to remix this project... changing the angles and number of repeats to draw something different!

(Save the attachment to your PC - and then upload your project into Scratch 2.0 or on the scratch website @ https://scratch.mit.edu  )

Attachments:
Download this file (Different Angles.sb)Different Angles Scratch Project[Different Angles Scratch Project]932 kB