Hello! I’m Charita Carter, and I work as a senior creative producer at Walt Disney Imagineering. My job is to lead teams that create the fun attractions you see at Disney parks. We always try to make these experiences better and more exciting by using cool technology.
Now that you know some basics about programming, let’s travel back in time to create a game with two famous Star Wars characters: R2D2 and C3PO. To make this game, we need to learn about something important that game programmers use all the time: events.
Events are like instructions that tell your program to watch for certain things to happen and then do something when they occur. For example, an event could be when you click a mouse, press an arrow key, or tap on a screen. When these things happen, the program knows to take action.
In our game, R2D2 will have a mission. He needs to move up to deliver a message to a rebel pilot and then move down to another rebel pilot. We’ll use events to control how R2D2 moves. When the player presses the up or down arrow keys, or clicks the corresponding buttons, R2D2 will move.
To make this happen, we’ll use a “when up” event block and attach a “go up” block to it. This means that when the player presses the up arrow key, the code connected to the “when up” block will run, and R2D2 will move up. We’ll do the same thing to make R2D2 move down.
Instead of writing all the code for R2D2’s movements ahead of time, we can let him respond to button press events. This way, he moves around the screen step by step, making your game more interactive and fun!
By using events, you can create games where characters respond to what players do, making the game more exciting and engaging. So, get ready to program your own adventures with R2D2 and C3PO!
Imagine you are a game designer! Write a short story where R2D2 and C3PO go on an adventure. Think about what events might happen in your story. For example, what should R2D2 do when he meets a new character? Share your story with the class and discuss how events make your story interactive.
Use Scratch to create a simple game where R2D2 moves up and down. Use event blocks to control his movements. Experiment with different events, like clicking the mouse or pressing keys, to see how they change the game. Show your game to a friend and explain how events work in your game.
Go on an event hunt around your classroom or home. Identify different events that happen, like a doorbell ringing or a light turning on. Write down what causes each event and what happens as a result. Share your findings with the class and discuss how these real-life events are similar to programming events.
Create a board game where players must complete tasks by triggering events. Use cards or dice to represent events that players must react to. Explain the rules to your classmates and play the game together. Discuss how the events make the game more exciting and unpredictable.
Create a piece of art that changes based on different events. Use materials like paper, markers, and stickers to design a scene. Decide what happens when someone claps their hands or says a word. Present your art to the class and explain how the events change your artwork.
Hello! My name is Charita Carter. I am a senior creative producer here at Walt Disney Imagineering. I lead teams that produce the attractions our guests experience, and we are always looking for ways to improve and enhance their experience, with technology at the core of our efforts.
Now that you’ve learned the basics of programming, we’re going to go back in time to build your own game featuring R2D2 and C3PO. To create a game, we need to understand something that game programmers use every day: events. Events instruct your program to listen for specific occurrences and then perform an action when they happen. Examples of events include listening for a mouse click, an arrow button press, or a tap on the screen.
In this game, we will make R2D2 move up to deliver a message to a rebel pilot and then move down to another rebel pilot. We’ll use events to control his movement when the player presses the up or down arrow keys, or the corresponding buttons. We will use the “when up” event block and attach the “go up” block to it. When the player presses the up arrow key, the code linked to the “when up” block will execute. We will do the same to make R2D2 move down.
Instead of writing all the code to control our droid in advance, we can allow R2D2 to respond to button press events that move him around the screen, step by step. Your game is becoming more interactive!
Events – Actions or occurrences that happen in a program, often triggered by the user or the system. – Example sentence: In the game, clicking the start button is one of the events that begins the adventure.
Programming – The process of creating instructions for a computer to follow using a specific language. – Example sentence: We learned programming by writing simple code to make a robot move forward.
Game – An interactive application designed for entertainment, often involving challenges or puzzles. – Example sentence: We created a game in class where players have to collect coins to win.
Move – To change the position of an object or character in a program or game. – Example sentence: I used the arrow keys to move my character across the screen.
Code – A set of instructions written in a programming language that tells a computer what to do. – Example sentence: We wrote code to make the spaceship fly through space in our project.
Interactive – Allowing a user to engage and participate actively with a program or game. – Example sentence: The interactive story let us choose different paths for the characters to follow.
Technology – The use of scientific knowledge for practical purposes, especially in computers and electronics. – Example sentence: We used new technology to create a virtual reality experience in our computer class.
Characters – Figures or symbols used in a game or program, often representing people, animals, or objects. – Example sentence: The game had colorful characters that each had special abilities.
Action – A specific task or function performed by a program or game, often in response to an event. – Example sentence: Pressing the spacebar triggered the jump action for the character in the game.
Mouse – A device used to interact with a computer by pointing, clicking, and dragging on the screen. – Example sentence: We used the mouse to drag and drop blocks of code in our programming lesson.
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. |