Sensing Game – Explore Sensors Through Coding
Home
Educational Resources
Challenges
Make a video sensing game

Make a video sensing game

This challenge has been written by EU Code Week Team and is part of the EU CODE WEEK CHALLENGES.

Duration

1 hour

Experience

Intermediate

Target Audience

  1. Teachers
  2. Students (10-14)

Purpose

  1. To code animated objects
  2. To develop understanding of how to control digital animation with physical movement
  3. To compose a song by mixing sound clips

Recommended Materials

  1. Scratch

Make a video sensing game

Teachers

Students (10-14)

Description

In this challenge you will create a simple game that uses a video camera as a sensor to detect motion, which means that you will be able to control your animation with physical movement. In this game, the task is to collect as many EU Code Week bubbles as possible in 30 seconds. Instead of collecting bubbles, you can create a game in which you chase a character or pop balloons with your hands.

Instructions

  1. Log in to Scratch.
  2. Click Add an extension and choose Video Sensing. It will detect how fast an object is moving. If the number is lower, it will be more sensitive to movement.
  3. Add a sprite. Choose a sound and add it to your sprite. If you want, you can add Create a clone to duplicate your sprite.
  4. Create two variables: one for Score and the other for Timer and add them to the sprite. Set the Timer to 30 and add Change Timer by -1.
  5. Create a new sprite Game Over to finish the game. You can also create a sprite with the title of your game, e.g., Collect all EU Code Week bubbles.

Share the link to your work in your Instagram Bio: tap the Edit Profile button on your Instagram and add the link to your work in the Website field. After that, create a new post, add a screenshot of your work, write “Link in Bio”, add the hashtag #EUCodeWeekChallenge and mention @CodeWeekEU.

Example

Play a video sensing game Collect all EU Code Week Bubbles. Feel free to remix this project.
Download this challenge as a word document