Hello! My name is Sharita Carter, and I work as a senior creative producer at Walt Disney Imagineering. My job is to lead teams that create amazing attractions for our guests. We always try to make these experiences better and more exciting, and technology plays a big part in that.
Great job on programming BB-8! Now, let’s take on a new challenge. We’re going to travel back in time and create a game featuring R2-D2 and C-3PO. To do this, we need to learn about something important that game programmers use all the time: events.
Events are like signals that tell your program to wait for something to happen. When that thing happens, the program does a specific action. For example, events can be listening for a mouse click, an arrow key press, or a tap on the screen.
In our game, we want R2-D2 to move up to deliver a message to a pilot and then move down to another pilot. We’ll use events to make him move when the player presses the up and down arrow keys.
First, we use a block called “when up.” We attach a “go up” block to it. This means that when the player presses the up arrow key, R2-D2 will move up. It’s like giving R2-D2 a command to follow when he hears the signal.
Next, we do the same for moving down. We use a command called “when down.” When you drag this command out, you’ll notice it has curly brackets. These brackets are like a container where we can put other commands. Every command inside these brackets will run when the player presses the down arrow key.
So, to make R2-D2 go down, we put a “go down” block inside the “when down” command. This way, R2-D2 will react to the button presses and move around the screen, making your game more interactive!
By using events, you can make your game characters respond to player actions, making the game more fun and engaging. Keep experimenting with different events and see what cool things you can create!
Try creating a simple game where you program R2-D2 to move around the screen using the arrow keys. Use the “when up” and “when down” events to control his movements. Experiment with adding more events to make the game even more interactive!
Work in pairs to brainstorm different events you can use in a game. Think about what actions could trigger these events, like mouse clicks or key presses. Share your ideas with the class and discuss how these events could make a game more engaging.
Imagine a new game featuring your favorite Star Wars characters. Plan out how you would use events to make the characters move and interact. Draw a storyboard of your game and explain the events you would use to a classmate.
In groups, take turns adding code blocks to a shared project. Each student adds an event and a corresponding action for R2-D2 or another character. Pass the project to the next student to add their event. See how many events you can include in your game!
Create a short story where events play a key role in the plot. Write about how characters respond to different signals or actions, just like in a game. Share your story with the class and discuss how events drive the narrative.
Sure! Here’s a sanitized version of the transcript:
—
Hello, my name is Sharita Carter. I am a senior creative producer here at Walt Disney Imagineering. I’m responsible for leading teams that produce the attractions that our guests get to experience. We are always looking for ways to improve and enhance the experience for our guests, and technology is at the heart of that.
Congratulations! You programmed BB-8. Now, I think we’re ready for something more challenging. Let’s go for it! Now that you’ve learned the basics of programming, we’re going to go back in time to build your own game starring R2-D2 and C-3PO.
To create a game, we need to learn about something that game programmers use every day, called events. Events tell your program to listen or wait for something to happen, and then, when it does, it performs an action. Some examples of events include listening for a mouse click, an arrow button, or a tap on the screen.
Here, we’re going to make R2-D2 move up to deliver a message to a Rubel pilot and then move down to the other Rubel pilot. We’ll use events to make him move when the player uses the up and down arrow keys or buttons. We use the “when up” event block and attach the “go up” block to it. When the player presses the up arrow key, the code attached to the “when up” block is executed.
We’ll do the same thing to make R2-D2 move down. To do this, we’ll use a command called “when down.” When you drag the command out of the toolbox, you’ll see that it starts and ends with curly brackets instead of a semicolon. This gives us space to put other commands in the middle. Every command we place in these brackets will run when the player presses the up arrow.
We want R2-D2 to go up, so let’s put a “go up” block inside the command, and we’ll do the same thing to make R2-D2 go down. Instead of writing all the code to control our Droid in advance, we can let R2-D2 react to button press events that move him around the screen step by step. Your game is getting more interactive!
[Music]
—
This version maintains the original content while removing any informal language and ensuring clarity.
Events – Actions or occurrences that happen in a computer program, often triggered by the user or another part of the program. – When you press a key on the keyboard, it creates an event that the computer can respond to.
Programming – The process of creating instructions for a computer to follow, using a specific language. – We learned programming by writing simple code to make a robot move forward.
Game – A software application designed for entertainment, often involving challenges or puzzles. – We created a simple game in class where you have to catch falling apples with a basket.
Move – To change the position of an object on the screen, often using code. – In our coding project, we programmed the character to move left and right using the arrow keys.
Signal – A message sent to a computer or device to perform a specific action. – The remote control sends a signal to the TV to change the channel.
Command – An instruction given to a computer to perform a specific task. – We used a command to make the turtle draw a square on the screen.
Interactive – Allowing a user to engage and participate actively with a computer program. – The interactive story we coded lets you choose what happens next by clicking on different options.
Mouse – A device used to control the movement of a pointer on the computer screen. – I used the mouse to drag and drop the blocks into the correct order in the coding puzzle.
Click – Pressing a button on a mouse to select or interact with something on the screen. – To start the game, click on the green flag at the top of the screen.
Screen – The display area of a computer or device where information and programs are shown. – We watched the animation play on the screen after we finished coding it.