Lesson 14: Build a Star Wars Game

Star Wars | Event


In this lesson, students will practice using events to build a game that they can share online. Featuring R2-D2 and other Star Wars characters, students will be guided through events, then given space to create their own game.


CS Fundamentals is not simply about teaching computer science, it is about making computer science fun and exciting. In this series, students will learn about events using popular characters from Star Wars. These puzzles blur the lines between "learning" and "fun". Also, students will learn to recognize regular programming practices in games so that when they play games at home, they can see common computer science principles being used.


Warm Up (15 min)

Main Activity (30 min)

Wrap Up (15 min)


Students will be able to:

  • Create an animated, interactive game using sequence and events.
  • Identify actions that correlate to input events.



Heads Up! Please make a copy of any documents you plan to share with students.

For the Teacher


  • Event - An action that causes something to happen.


Report a Bug

Teaching Guide

Warm Up (15 min)


Teacher Tip

If you're not quite sure if a student's response describes an event, try to break down the response. Is there an action and a response?

For example:

  • Crossing the finish line and having on screen characters congratulate you
  • Finding a big pot of treasure (or other item) and watching your inventory grow
  • Buying new items from the game's store and having the item to use
  • Pressing the buttons on a game controller and having your character do something cool

In a class discussion, ask the students what their favorite video game is (you might need to remind the students to only use games that are classroom appropriate). Ask the students what their favorite part of the game is.

Most of the time, students will respond with some kind of event. When you recognize a student response that describes an event, ask the student to describe it further.

Once the student is done describing their fun, take a minute to relate it back to the definition of an event.

  • Event: An action that causes something to happen.

Ask the students to try and relate some of their favorite parts of video games and how they can be described as events. Have them pair share and discuss the differences between their events and their partner's.

Main Activity (30 min)

Teacher Tip

Remind the students to only share their work with their close friends or family. For more information watch or show the class:

Course E Online Puzzles - Website

Students will likely be very excited to make their own Star Wars game at the end of this set of puzzles. If there's time, ask them to plan out what they want the game to do. The planning and preparation will help the students better recognize the key concepts this lesson is trying to teach. Encourage the students to share and remix each other's games at the end of this lesson.

Wrap Up (15 min)


Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

Journal Prompts:

  • What was today's lesson about?
  • How do you feel about today's lesson?
  • Give an example of an event you used in your program today?
  • Why is it important not to share private information online? How do you know if information is private?

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards

AP - Algorithms & Programming
  • 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.