JPL
Careers
Education
Science & Technology
JPL LogoJPL Logo
Education
NASA OSTEM
JPL LogoJPL Logo
Education
Make a Moon or Mars Rover Game

Student Project .

.

Make a Moon or Mars Rover Game

Jet Propulsion Laboratory https://www.jpl.nasa.gov/ Last Updated: May 21, 2025
Want to teach this?
View the Lesson Plan
Subject
Technology
Time Required
1-2 hrs
Grade Levels
3-8
Want to teach this?
View the Lesson Plan
Standards .
Math Standards (CCSS - Math)
.

Use a pair of perpendicular number lines, called axes, to define a coordinate system, with the intersection of the lines (the origin) arranged to coincide with the 0 on each line and a given point in the plane located by using an ordered pair of numbers, called its coordinates. Understand that the first number indicates how far to travel from the origin in the direction of one axis, and the second number indicates how far to travel in the direction of the second axis, with the convention that the names of the two axes and the coordinates correspond (e.g., x-axis and x-coordinate, y-axis and y-coordinate).

Understand that positive and negative numbers are used together to describe quantities having opposite directions or values (e.g., temperature above/below zero, elevation above/below sea level, credits/debits, positive/negative electric charge); use positive and negative numbers to represent quantities in real-world contexts, explaining the meaning of 0 in each situation.

Find and position integers and other rational numbers on a horizontal or vertical number line diagram; find and position pairs of integers and other rational numbers on a coordinate plane.

Technology Standards (ISTE)
.

Students set learning goals, develop strategies leveraging technology to achieve them, and reflect on the learning process to improve learning outcomes.

Students understand fundamental concepts of how technology works, demonstrate the ability to choose and use current technologies effectively, and are adept at thoughtfully exploring emerging technologies.

Students critically curate a variety of resources using digital tools to construct knowledge, produce creative artifacts and make meaningful learning experiences for themselves and others.

Students choose the appropriate platforms and digital tools for meeting the desired objectives of their creation or communication.

Your browser cannot play the provided video file(s).

Create a Moon or Mars exploration game using Scratch, a visual programming language. Think like NASA space-mission planners to design your game!

Materials

Scratch project dashboard and a window showing options for Mars surface images.
  • Computer with internet access
  • Free Scratch account
  • Mars surface images – Download ZIP
  • Moon surface images – Download ZIP
  • Mars rover sprite image – Download PNG
  • Moon rover sprite image – Download PNG

Project Steps

  1. Step 1: Get set up

    Step 1: Get set up

    1. Download the Moon or Mars surface images and the Moon or Mars rover sprite image, and save them to a computer. Unzip the surface images zip file into a new folder.
    2. On the Scratch website, click Create to begin a new project. (Sign in or create an account, if you want to save your work so you can revisit or redesign your game in the future.)
    3. Create a new backdrop by moving the mouse over Choose a Backdrop in the Stage window and selecting Upload Backdrop. Choose the Moon or Mars surface image of your choice. The Stage area of the screen should now display your selected backdrop image. Click for example (image).
    4. Create a new sprite by moving the mouse over Choose a sprite in the Sprite window and selecting Upload sprite. Choose the rover sprite image. There should now be a rover placed over your backdrop image along with the original cat sprite. Click for example (image).
    5. Delete the existing cat sprite by clicking on it in the Sprites window and clicking the “x” in the corner.
    6. With the rover sprite selected, you’re ready to create the code that manages the game and controls the rover!
  2. Step 2: Make the rover drive

    Your browser cannot play the provided video file(s).

    Step 2: Make the rover drive

    NASA explores Mars with orbiters that travel around the planet, stationary landers on the ground and rovers that can travel many miles on the surface. Astronauts have also explored the Moon with a car-like rover – and might again in the future. For rovers to explore the Moon or Mars, they must be able to drive. Rovers on Mars aren’t controlled with joysticks or keyboards. But in the future, astronauts in orbit around Mars or on the surface of the planet could use remote controls to drive rovers. Your game can use keys on the keyboard to make the rover drive.

    Tasks

    1. Make the rover move up, down, left and right on the screen using four different keys on the keyboard. Hint: See if a block in the Events section will help. Click for example (image).
    2. Specify how far the rover will move each time one of those keys is pressed. Select a distance that makes the rover movement appear smooth when the key is pressed and held. Hint: See if a block in the Motion section will help. Click for example (image).
    3. Make the rover rotate so it points in the direction of travel.
    4. Bonus: Make the rover move diagonally using keys other than the keys already assigned.
  3. Step 3: Add science targets

    Your browser cannot play the provided video file(s).

    Step 3: Add science targets

    NASA sends rovers to Mars to collect data and carry out scientific studies. Astronauts on the Moon will drive rovers to areas of scientific interest. “Science targets” are the locations and objects on which these studies are carried out. You should create science targets to provide destinations for your rover. By studying the backdrop images closely, you can identify areas that look interesting and that you think scientists might want to study.

    Tasks

    1. Add three or more science targets to visit during gameplay by placing additional sprites representing the targets on the backdrop image.
    2. Make the science target sprites disappear when they are visited by the rover. Hint: See if a block in the Control section will help. Click for example (image).
    3. Make the science target sprites reappear when players click the green flag to restart the game.
  4. Step 4: Add a countdown timer

    Your browser cannot play the provided video file(s).

    Step 4: Add a countdown timer

    NASA’s missions to Mars and other destinations have a planned life expectancy. Some missions, including every Mars rover to date, have been extended and operated beyond their planned mission life expectancy, while others experience problems that shorten their mission. You can create a timer that counts down to the end of the mission and ends the game. Your timer should not be so short that the game is unplayable or unwinnable, but it should not be so long that there is no challenge to playing the game. As a bonus, you can create code to extend or shorten the planned mission time.

    Tasks

    1. Create a timer that counts from a set time down to zero. Hint: Create a Time variable that you can program to change. Click for example (image).
    2. Make gameplay stop when the timer reaches zero.
    3. Make a “Mission Over” message appear when the timer reaches zero.
    4. Make the timer start over when a player clicks the green flag to restart the game.
    5. Bonus: Develop code that will increase or decrease the amount of time on the timer by one or two seconds at random.
  5. Step 5: Add a scoring system

    Your browser cannot play the provided video file(s).

    Step 5: Add a scoring system

    Rover missions on Mars don’t have a scoring system, and astronauts aren’t given points for science discoveries on the Moon. But the science they collect is valuable, and some discoveries may be more exciting, interesting or important than others. To determine how well players are doing while playing your game, you can develop a scoring system that includes points earned for reaching science targets. How points are totaled is up to you. You could also program your game to reduce point totals in certain scenarios.

    Tasks

    1. Develop code to create a scoring system.
    2. Increase the score by one or more points for each science target visited.
  6. Step 6: Add hazards

    Your browser cannot play the provided video file(s).

    Step 6: Add hazards

    Space travel is fraught with hazards, both in space itself and on planets and moons. From steep slopes and deep sand to sharp rocks and high radiation, there are countless ways a mission can be delayed or end unexpectedly. Program your game to include hazards that players need to avoid. Look for dark areas in your backdrop image. These shadowed regions are often steep slopes that a rover could get stuck on.

    Tasks

    1. Develop code that identifies hazardous locations on the backdrop image.
    2. Add in undesirable outcomes that occur when the rover reaches hazardous locations. (For example, the game could stop, time might be taken away, points might go down, etc.)
    3. Make a “Hazard” message appear when players encounter a hazard.
    4. Make some hazards hidden and some visible.
    5. Bonus: Make a hidden hazard that changes location each time the game is restarted.
  7. Step 7: Add landing code!

    Your browser cannot play the provided video file(s).

    Step 7: Add landing code!

    Every Mars rover had to first land on the Red Planet before it could start exploring, as will rovers on the Moon in the future. You can specify a landing site by creating scripts that place the rover at a certain location at the beginning of the game.

    Tasks

    1. Create code that puts the rover in a specific location at the beginning of the game.
    2. Bonus: Modify your landing code to make the rover land in a random location on the backdrop image, or in a random location within a smaller section of the backdrop image.
  8. Step 8: Take it farther!

    Now that you’ve created your game, let others play it and suggest improvements! Also, check out this Mars rover game from NASA for more inspiration.

Lesson Last Updated: May 21, 2025

K-12 Resources
Education Resources
Lesson Plans
Student Projects
Teachable Moments
Collections
Internships
JPL Internships
Explore Programs & Apply
Internships FAQ
News & Events
All Education News
All Education Events
About
JPL Education
K-12 Education
Higher Education
Informal Education
NASA OSTEM
Get the Latest from JPL
Follow JPL Education
More from JPL
About JPL
JPL News
Missions
Images
Virtual Tour
Careers
About JPL
JPL News
Missions
Images
Virtual Tour
Careers
Related NASA Education Sites
Space Place
Climate Kids
Kids' Club
Space Math
Universe of Learning
STEMonstrations
Basics of Spaceflight
NASA’s Eyes Interactives
NASA
Caltech
Privacy
Image Policy
FAQ
Feedback
Version: v3.1.0 - 409b2d2
Site Managers:David Seidel, Ota Lutz
Site Editor:Kim Orr