Y5 How do I plan and make a maths game in Scratch?

Let’s decompose!

  1. Choose one of these games – what elements do they have?
  2. Find your entry from last week here
    1. Edit only your row (I can tell…)
    2. Look at your answers and improve by giving more detail
    3. Challenge: What blocks in Scratch might you use?

Planning

  1. http://www.j2e.com/stmarks/bwilliams/Scratch+game+planner/
  2. Save in your files

Tables game planning (if you need it…):

  1. http://code-it.co.uk/wp-content/uploads/2015/05/tables_planning.pdf
  2. http://code-it.co.uk/scratch/tablesgame/tablesgameoverview

Making

  1.  https://scratch.mit.edu/
  2. Explore tools and experiment
  3. Use your planner to build your game bit by bit – the better you have decomposed your game, the easier it will be.
  4. Edit your planner if your plan changes…
  5. Work on main sprite:
      • Start with the way it moves – keyboard controls? mouse? forever moving?
      • Now deal with how it reacts to other things – other sprites? the score? gravity? the floor/walls/platforms?
  6. Use some of the resources below:

 Resources

Last 8 minutes

  • Save into your folder with file name: “John S game”
  • In the learning conversation, reflect on what you have achieved
  • Screenshot your sprite code and paste into your scratch game plan

“Scratch mini tasks”

  • Go to Scratch – you can login if you like, but don’t need to – click on “create” to make a new project
  • We will be creating games next term so here are some mini tasks to get you warmed up.
  • Stick with the cat sprite with no background.

Work your way through these tasks

  1.  Gravity – put together:  When Green flag clicked, forever, change y by -1
    1. He should fall when you click the green flag
  2.  Gravity 2 – change your gravity block by adding:  if…then, < (in operators) , y position , 0
    1. He should fall until he gets to 0 height (the middle of the screen)
    2. Can you change the number so that he lands on the bottom of the screen?
  3. Jumping – start a new block with:  When space key pressed, change y by 50
  4. Walking
    1. click the “i” on the sprite, then change rotation style to the double arrow  <–>
    2. Make two new blocks:
      1. When left arrow key pressed, point in direction left, change x by -10
      2. When right arrow key pressed, point in direction right, change x by 10
  5. Random movement
    1. Create a new sprite – a ball
    2. Make this block: when flag clicked, point in direction, pick random 1 to 360 (in operators), forever, move 10 steps, if on edge bounce (only have the move inside the forever)
  6. A basic game!
    1. Add to the cat script: when green flag clicked, forever, if…then , touching ball, say “Ouch” for 1 second
    2. Play your game and see if you can avoid the ball!
    3. How could you make it easier or harder?  Try out your ideas
  7. Mouse control
    1. You could make it a 2-player game by controlling the ball with the mouse:
    2. Change the ball script to: when flag clicked, forever, point towards sprite1, move 2 step
    3. Play with a partner!