Lesson: Make Games - 2-Player Battle Game
Time: 45+ mins
IntroductionGame on! In this lesson, campers will apply what they've learned so far to create a 2-player game where two players can battle each other on the Stage.
- Computer, laptop, or tablets (1 per camper)
New Code Blocks
: Run the code attached to this block when the Play button is clicked. : Make the Actor disappear from the Stage. : Make the Actor appear on the screen. : Keep repeating the blocks inside this loop forever. : If the condition is true, then run the code inside the block. : Make the Actor repeat this loop until a true or false (boolean value) determines when the block should stop repeating the code inside it. : Repeat blocks inside this loop a specified number of times. : Pause the current script until the parameter condition is true. : Play the specified sound file. : Set the position of an Actor to the potion of the parameter (e.g., mouse-pointer, touch location). : Point the Actor at the specified degree.
- Coding: Using a computer language to tell the computer what to do
- Sequence: The order in which steps or events happen
- Actors: Tynker characters and objects that can talk and interact with each other
- Command: A specific action or instruction that tells the computer to do something
- Stage: The background of the project where the Actors are placed
- Loop: An action that repeats one or more commands a specific number of times
- Infinite loop: A loop that repeats forever and does not end until the program stops
- Condition: A logical expression that evaluates to true or false
- Conditional statement: A type of statement that executes different parts of the code based on whether a logical expression evaluates to true or false
- Use code blocks to create a 2-player battle game
Getting Started (5 minutes)
- Tell campers that they will be creating a 2-player tank battle with Actors that fire lasers at each other! Next, open the "2-Player Battle Game" module and play the provided example in "Step 1" of the tutorial. Players will have to share the same keyboard!
Coding Activities (40+ minutes)The lessons are intended for self-directed learning. Your role will be to facilitate as campers complete the Make Games - 2-Player Battle Game modules on their own:
1. Introduction (Video)
- A friendly robot tells campers that they can decide which game they'd like to create next.
- Tell campers to press any key to continue on to the next module.
- Campers will follow the step-by-step tutorial to create their very own 2-player battle game with tanks, lasers, and more!
- Activities include adding a background and Actors; programming lasers to fire; using nested loops to create health that gives each player 3 lives; and adding special effects.
- If campers finish early, ask them to…
- Brainstorm ways to make their game more challenging
- Play their game with a friend
- Create a new theme by using different Actors and a different background
Wrap UpUnplugged Activity: Discussion
Review today’s coding adventure by leading a discussion. Ask campers:
- What is your favorite 2-player game? Is it an arcade game? Racing game? A fighting game game?
- Can you think of another 2-player game you'd like to create using Tynker? What's the goal of the game? How do you play?
These student-facing slide presentations help educators seamlessly run Tynker lessons in a virtual or physical classroom setting. Each lesson has its own set of slides that introduce the big ideas, suggest unplugged activities, and include a section for each activity module. While running lesson slides, you can switch back and forth between the activity, the slides, answer keys and other lesson materials.
A sample slide presentation is available for your review. Please log in to view all the class presentations available with your plan..
Lights, Music, Action
Make Games - Animated Greeting Card
Make Games - Music Video
Make Games - Maze Game
Make Games - 2-Player Battle Game
Make Games - Animated Story