In this activity, 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 createdtoday, you used keypress 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.
Any time the user touches the screen, an event is triggered. For example, to send a messageto a friend, the user types using the keyboard on the screen, just like you see here. Thecomputer scientist programmed the app to type out an “a” when the “a” key is touched,a “b” when the “b” key is touched, and so on.
Gestures, such as swiping and pinching, are also events. For example, in the Google Mapsapp, the map moves to the left when you swipe to the left, and it zooms out when a userpinches the screen. Tapping and swiping aren’t the only typesevents these devices use. There are also events for tilting, shaking, and even talking! Smartphonesand tablets could not be programmed without events.
Next session, you will build on the computer science knowledge you gained today by programminga maze game. In this game, you will need to move a character from start to finish withouttouching any maze walls. This game will introduce if statements, which allow you to programcomputers to make decisions.
Until next time-- have fun creating and coding. See ya next time!
"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