Game Design: Events
Read the statement below:
In this activity, you're going to create a racetrack game in Scratch. This game will teach you how to code events and motions. Events are a really important computer science and gaming concept. In most games, you use button presses on a controller or keyboard to move a character. These button presses are all programmed using events. Events are a computer's way of handling an action, like a button press.
Answer the question below in your VGD Notebook.
1. Explain events in your own words.
2. Imagine your favorite video game character, what do you have to do to move that character?
Activity 1
For an example of a game you will be creating today, check out the Project Showcase to the right. I only coded one sprite to move (it wouldn't be any fun playing the game by myself). Move the elephant using the the arrow keys on the keyboard.
Go to CS First using this link: http://www.cs-first.com/user/login
Follow along with the videos, they have all the directions you need to complete today's activity. If you get lost at any point you have two options:
Option 1
Check out the hint sheet:
Option 2
Follow the directions below:
Part 1
- Sign in with the username and password from your club pass.
- Start watching the first video.
- Create an event for the three arrow key presses.
- Add a "move" block to each arrow keypress event.
- Program the sprite to turn left when the left arrow is pressed.
- Use a "repeat until" block for each of your events to make your sprite move smoothly across your track.
- Customize your project by doing some of the add-ons.
- Once you finish one add-on, pick another one to try, or create something new for your project on your own.
- Click the "Share" button in Scratch.
- Show your project to a neighbor!
- Complete the CS First Reflection.
- Watch the Wrap Up Video.
