Welcome to “The Big Event” lesson! Today, we’re going to learn about how we can control programs and make them do different things using events. Imagine using a paper remote control, just like the ones for video games, to understand this concept better.
An event is an action that makes something happen. For example, when you click a button on a mouse and a webpage opens, that’s an event. When you swipe your finger on a tablet to scroll, that’s also an event. Events are super useful because they let people interact with programs whenever they want.
Think about things that happen in your daily life that make you do something. For example, when you feel hungry, you might go to the fridge to get a snack. Or when you hear the mailman, you might go outside to check the mail. These actions are like events because they trigger you to do something, just like pressing a button or moving a joystick in a video game.
In video games, there’s a special event called “update” that happens 30 or 60 times every second. This event is super important for game programmers. It helps them check if someone has pressed a button or moved a joystick during each tick, or frame, of the game. They ask, “Did someone press the button this time? Yes or no?”
Without events, players wouldn’t be able to move their characters or make them jump. Games wouldn’t be able to show animations or make things move. It’s because of events happening over time that we can create cool animations and make games exciting and interactive.
So, next time you play a video game or use a computer program, think about all the events happening behind the scenes that make everything work smoothly!
Design a paper remote control with buttons that represent different events. Think about what each button would do if it were a real remote. Share your design with the class and explain how each button triggers an event, just like in a video game or computer program.
Play a game of charades where you act out different events from everyday life or video games. Your classmates will guess what event you are portraying. This will help you understand how events trigger actions in both real life and digital environments.
Write a short story where the main character experiences different events that change the course of the story. Share your story with a partner and discuss how each event influenced the character’s actions and the story’s outcome.
Go on a scavenger hunt around your classroom or home to find examples of events. For each example, explain what the event is and what action it triggers. This activity will help you identify events in your surroundings and understand their importance.
Create a simple board game where players must perform actions based on events. Use dice or cards to trigger events that affect the players’ progress. Share your game with the class and explain how events make the game exciting and interactive.
This lesson is called “The Big Event.” It’s all about how we can control our programs and change the way a program runs on the fly using events, like the push of a button or the click of a mouse. For this lesson, you’ll be using a paper remote control, similar to a real video game.
An event is an action that causes something to happen. For example, when you click a button on a mouse and a webpage loads, that’s an event. When you touch your screen on a tablet to scroll, that’s also an event. Events are a great way to let users direct your program whenever they need or want to.
There are things that happen in our daily lives that we all respond to. For instance, we feel hungry and go to the fridge, or we hear the mailman and go to get our mail. These are similar to the events of pushing a button or moving a joystick; they trigger us to take action.
In video game programming, there’s one event that everyone refers to as “update,” which occurs 30 or 60 times a second. For video game programmers, this event is often more important than the buttons or joystick because we tend to watch for this tick and then check the joystick during that tick. We ask ourselves, “Has someone pushed the button this frame? Yes or no?”
Without events, players wouldn’t be able to move or jump, and the video game wouldn’t be able to animate anything. It’s only because of the events of time passing that we can create animations and make things move.
Events – Actions or occurrences that happen during a program’s execution, often triggered by the user or the system. – When you click the mouse, it creates an event that the computer program can respond to.
Programs – Sets of instructions that a computer follows to perform tasks. – We wrote programs in class today to make the robot move forward and backward.
Control – Commands that manage the flow of a program, such as loops and conditionals. – Using control structures like “if” statements, we can make decisions in our code.
Action – A specific task or operation that a program performs. – The action of pressing the spacebar made the character jump in the game.
Video – A digital recording of moving visual images made available for viewing on a computer. – We watched a video tutorial to learn how to code a simple game.
Games – Interactive programs designed for entertainment, often involving challenges or puzzles. – We used Scratch to create our own games in computer class.
Button – An interactive element in a program that can be clicked to perform an action. – I added a button to my app that plays a sound when you click it.
Mouse – A handheld device used to interact with a computer by controlling a pointer on the screen. – I used the mouse to drag and drop the blocks in my coding project.
Computer – An electronic device that processes data and performs tasks according to a set of instructions. – We use a computer to write and test our code in class.
Animations – Sequences of images or frames that create the illusion of movement when displayed in order. – We learned how to create animations to make our characters move smoothly in the game.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |