Mar 232023
 
  1. Use your Scratch Games Toolkit project (hide some spirtes) or start a new project

1 Main character movement

  • For platform game, use 4, 6 and 7
  • For two player game, add another sprite with different key controls

2 Add obstacles and/or baddies

  • Moving baddies 8, 13, 14
  • Make character react to baddy: 9
  • Could also have stationary baddies to avoid touching

3 Next level / game over

4 Coins / lives / points

Mar 152023
 
  1. Start a new project (or save a copy of your test project)
  2. Come up with an idea for a game called “Blackout” about a city in the Blitz – think of:
    • The aim – work through levels, get to as many houses and black them out,
    • what characters and backgrounds you will need – main character, enemies – ARP, spies, dogs,
    • controls – keyboard, mouse, 1 player/2 player
    • lives, coins, points, timed
    • levels
  3. Use blocks from Scratch Games Toolkit

Week 1:

  • Make spirtes – characters, doors, coins, movin objects….,
  • Make backgrounds – intro screen, game over, levels
  • Add variables for points, lives
  • Add messages for game states
  • Code ontrols and movement – ketboard controls, gravity, jumping….

Week2:

  • Code interaction between sprites
  • Losing lives, gaining points, changing levels
Mar 092023
 

Task 1 – Sign in to class account

  1. Go to Scratch
  2. Sign in: SM-Pine23 SM-Spruce23 SM-Willow23 (listen for the password)
  3. Then “Create”. “File – Load from your computer”
  4. Load your file from ast time, saved in Google Drive
  5. Rename your project with just your name

Task 2 – Games toolkit project

  • Finish working through Scratch Games Toolkit so your project includes everything on it
  • You will need different sprites and some different keyboard controls

Task 3 – Customise

  • We are going to create a game called “Blackout” about WW2 in the Blitz. Make sprites and backgrounds in your Gaems toolkit project suitable for this theme
  • You could:
    • edit existing sprite costumes
    • draw your own
    • search for images to use, save then upload into sprite costumes
  • WARNING – if you get rid of a sprite, it gets rid of all the code too. So just add and remove costumes, not whole sprites.
  • Some ideas: ARP warden, boy/girl character (could be same sprite and player decides who to play as), doors, ration book, houses, cars, street lights, …
Feb 232023
 

Character movement

1 Walking animation

2 Follow mouse

3 Keyboard controls (up down left right arrow keys)

For a maze: change each one like this:

(If it bmps into the wall, it bounces back in the opposite direction)  Same idea works for other movelment controls.

4 Keyboard controls (left-right)

5 Keyboard controls (forward and steer)

6 Jump

7 Gravity and platforms

Baddies

8 Follow a set path

Drag the sprite to each point before you choose each block

13 Random falling ovjects

 

14 Randomly timed objects

9 Sprite reacts to another sprite

I’ve made mine hide, but you could go bck to start, lose a life, score a point…

Next level/ game over

10 Door to next level

 

11 Game over

Coins / points / lives

12 Collect coins

15 Timer 

Challenges

  1. Theme your project for a game called “Blackout” bu changing costumes and backgrounds.
  2. Come up with an idea for a game about the blackout – think of the sim, what characters and backgrounds you will need, controls, 1 player/2 player, lives, coins, levels, points, whether it is timed,
Apr 042022
 
  • 1 Work on game
  • 2 Try each other’s games
  • 3 Evaluate your skills

1 Work on game

1 Work on game

  1. Work on your own or as a team – everyone needs to be actively coding and contributing.
  2. Create all sprites (characters, buttons, doors, objects) and backgrounds that you need – even if they are just sketches
  3. Choose which Scratch game toolkit blocks you need for your game.
  4. Adapt them to change timings, actions, triggers to suit your game.
    1. Movement of main character
    2. Movement of enemies/other characters
    3. Reaction to other sprites – enemies, doors, coins
      1. new background, respawn, hide,…
      2. Make sure these reverrt back “when green flag clicked”, eg “show”
    4. Scores, lives, timers
    5. Game complete/over
  5. Variables – if you have lives, score, timer…create variables for these. Remember to set them at the beginning (when green flag clicked) then change them when something happens.

Success: I have –

  • Chosen blocks of code to make my game happen
  • Created all sprites and backgrounds needed
  • Read code to check what I’ve told it to do

2 Try each other’s games

  • Compliment
  • Compare
  • Be Constructive

3 Evaluate your skills

Scratch self assessment

Mar 182022
 
  • Visit this blog post: Scratch game toolkit
  • Try out any blocks that you might use in your game
  • Can you adapt them to change timings, actions, triggers?
  • Are there any other actions that you need to code?
    • Can you work it out?
    • Do you need some help?
      • Other people in your class?
      • Help sheets?
      • Example code (in j2e, shared files, your class)
      • Scratch tutorials? Scratch forums?
      • Mr W?

Success: I have –

  • Made 3 different blocks of code (each person)
  • Made all sprites and backgrounds (may be sketches/blank) as a group
  • Decided as a group on what happens in the game

Mar 032022
 

LF1 Add a sprite and make it walk

  1. Go to Scratch
  2. Choose backdrop “Savannah”
  3. Add a sprite: Zebra
  4. Click on the zebra sprite and drag out these blocks.
  5. What do you think will happen if you add these blocks inside the forever block
    1. Add them and see

LF2 Add more sprites and code

  1. Add more animal sprites:
    1. Lion
    2. Giraffe
    3. Grasshopper
    4. Snake
  2. Delete the cat sprite
  3. Change the size of your animals to add perspective
    1. Near the front = big
    2. In the distance = small
    3. Change the number to change the size
  4. Copy the code to the other animals by dragging it

LF3 Tinker

  1. Tinker with the code making animals move at different speeds
  2. Add more animals:
    1. Right-hand click on an animal sprite and click “duplicate” to make another one with the same code.
    2. Can you make a herd of zebra moving across the screen?
  3. Can you make the lion move slower?
  4. Safari truck
    1. Download this sprite file
    2. In scratch upload a new sprite from you downloads/Google Drive folder
  5. Extra tip
    1. Use this block to move sprites up and downa level so animals at the back are behind animals at the front:
      1. You don’t need to attach these blocks, just click on them to make them work

Challenges

C1 Add  African safari music that plays when you click on the green flag

  1. I have put some music in “shared with me” in j2e, your class – go to j2e – my files – shared files – your class
  2. Click play button to listen.  Click on the “i” and then “download”
  3. In Scratch – Click on “background” bottom right, next to the sprites
  4. Click the “sound” tab, top left
  5. Find the music you just downloaded.
  6. Add this code:

C2 When you click on an animal, it tells you some information about that animal or about safaris

  1. This could be using “say” blocks in Looks
  2. Or you could use the text to speech add on
  3. Can you mute the music when it speaks, then start the music when it has finished?
      • Background code
      • Animal code

Safari facts: https://kids.nationalgeographic.com/pages/topic/safari

Scratch self assessment

Mar 022022
 

LF1:  Decomposing the game

  • Have a go playing this game.
  • Then have a think from a coding point of view.   How many different elements can you list – characters, moving parts, actions, consequences, backgrounds…?
  • By answering the questions above, you have decomposed  the game = broken it up into simpler parts.  This is a great way of thinking about how to code something as you can code each simple part one at at a time.

LF2 Characters, actions and consequences

This whole unit will be thinking about those elements and how we can translate them into Scrach.

  • Characters and moving parts will be sprites
  • Actions will be blocks – may be movement blocks and control blocks
  • Consequences might be if…then blocks

https://scratch.mit.edu/projects/502331640

Please let me know by commenting on this post if you get stuck or need another video later on…

Jungle Rush Sketch videos:

  1. Video 1  – Home screen – gliding on title, sprite and play button
  2. Video 2 – Move to play mode – title, play disappear, sprite to correct position
  3. Video 3 – Moving background – trees
  4. Video 4 – Sprite jumping
  5. Video 5 – More background – clouds
  6. Stage 6 – Enemy sprites
    1. Make a new sprite
    2. When it receives play message, show, go to the right hand side of screen, glide to left hand side of screen – keep doing this (forever).
    3. When green flag clicked, hide
    4. Electrify enemies
      1. instead of hide – what do you want to happen?
  7. Stage 7 – Back to home screen when dead; Two states home/play
    1. Enemy sprite code – when it hits the cat (forever, if, touching cat sprite), broadcast – new message “home”
    2. Replace all green flag code starters with “When I receive home” blocks
    3. Make one block with: when green flag clicked, broadcast home
  8. Stage 8 – Timer/score
    1. Variables: Make a new variable “Score”
    2. Two blocks:
      1. When I receive home, stop counting
      2. When I receive play, set to 0, start counting
  9. Can you announce the score before going back to the home screen?
    1. Change background? Sprite says score? Wait for a few seconds then go to home screen
    2. You could have a message called “score” for this?

Continue reading »