Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

6. Wrap-up: A Racing Game

Transcript

In today's project, you learned to use an important computer science and gaming concept, events.

Events are actions that tell the computer to wait for a response.

In the game you created today, you used key press events to allow a user to move sprites.

Events are used in computers all around you and in some places you might find surprising.

Take a look at how events are used to program a smartphone or tablet.

Anytime the user touches the screen, an event is triggered.

For example, to send a message to a friend, the user types using the keyboard on the screen just like you see here.

The computer scientist programmed the app to type an a when the a key is pressed and a b when the b key is pressed and so on.

Gestures such as swiping and pinching are also events.

For example, in the Google Maps app, the map moves to the left when you swipe to the left and it zooms out when a user pinches the screen.

Tapping and swiping aren't the only events.

There are also events for tilting, shaking, and even talking.

Smartphones and tablets could not be programmed without events.

Next session, you will build on the computer science knowledge you gained toady by programming a maze game.

In this game, you'll need to move a character from start to finish without touching any maze walls.

This game will introduce if statements which allow you to program computers to make decisions.

Until then, have fun creating and coding.

See you next time.

arrow_backward Back
Next arrow_forward
Instructions
Write a G+ shout-out!
Attributions
  • "Is This the Future of Typing on Your Smartphone" by Tabz Torque (https://www.youtube.com/watch?v=dPcjTxuDaaM) -- Licensed by Creative Commons Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Video trimmed to needed length | Audio removed
  • "Reliance Vizualizance Tablet Smartphone" by GEOVAP (https://commons.wikimedia.org/wiki/File:Reliance_Vizualizace_Tablet_Smartphone.png) -- Licensed by Creative Commons Attribution-Share Alike 3.0 Unported (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- No modifications made
  • "How to Use Google Maps Offline on iPhone" by hisssio (https://www.youtube.com/watch?v=BhytF3bCXvY) -- Licensed by Creative Commons Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Video trimmed to needed length | Audio removed