February 20, 2026

Create a Downhill Skier Game

DOWNHILL SKIER GAME CODING CHALLENGE

The Challenge

Your mission is to create a downhill skiing game.
The skier stays near the top of the screen while the world moves toward them.

Goal:
Avoid obstacles for as long as possible.

This game uses a classic trick in game design:
If the environment moves, it feels like the player is moving.


The Big Idea

Even though it looks like the skier is racing downhill:

  • The skier only moves left and right
  • The obstacles move upward toward the skier
  • The player survives by dodging obstacles

Obstacles can include:

  • Flags
  • Rocks
  • Trees

Play our html version of the game.


Step 1: Create Your Skier (Player Sprite)

Start with your skier — this is your avatar.

Requirements:

  • Place the skier near the top of the screen
  • Allow the skier to move left and right

Tip #1: Player Movement

Think carefully about how the skier should move.

You might:

  • Use the left and right arrow keys
  • Make the skier move toward the mouse

There is no single correct solution — choose what feels best for your game.


Step 2: Add Your First Obstacle

Obstacles create the challenge.

Start simple:

  1. Create one obstacle
  2. Spawn it at the bottom of the screen
  3. Move it up the screen toward the skier
  4. When it goes off screen, reset it to the bottom

Tip #2: One Obstacle First

Do not add everything at once.

  • Get one obstacle working
  • Make sure it moves correctly
  • Then add more obstacle types

Step 3: Create the Downhill Illusion

The skier does not move downhill — the obstacles do.

Obstacle Rules:

  • Move at a constant speed
  • Only move on the Y-axis
  • No left or right movement

Tip #3: Keep the Physics Simple

Simple movement makes debugging easier.

  • No X movement
  • Only Y movement
  • Smooth, steady speed

This keeps the focus on gameplay, not complex math.


Step 4: The Game Loop

Every frame, your game should:

  1. Move the skier left or right
  2. Move obstacles upward
  3. Check for collisions
  4. Repeat

This loop continues until the skier hits an obstacle.

Check out our MakeCode Arcade Version of the Game!


Game Over

When the skier touches an obstacle:

  • End the game, or
  • Display a Game Over message

Extension Challenges (Optional)

Want to take your game further?

Try adding:

  • A score based on time survived
  • Faster obstacles over time
  • Sound effects
  • Multiple levels or difficulty modes

Final Thought

Start small. Test often.
Every great game begins with something simple.

Happy coding.

Sprattronics Learning Lab

Maximize your education!
Get the Gold

Get the Gold! LEGO® Education Computer Science & AI Grade 3 - 5 Unit 1 • Lesson 1 Student Sheet Mission A treasure of gold is waiting! Your job is to build a horse and carriage, then write a program that helps your robot travel from the castle to the gold and safely back home […]

Read More
LEGO Education Computer Science & AI Kit: The Ultimate Getting Started Guide

LEGO Education Computer Science & AI Kit: The Ultimate Getting Started Guide You Placed Your Order and the Kit is on the Way... Now What? Congratulations! You've ordered the LEGO Education Computer Science & AI Set. Whether you're a classroom teacher, homeschool parent, after-school educator, or robotics enthusiast, you're about to unlock dozens of engaging […]

Read More
Control a LEGO Spike Robot with Motion: Using the Gyroscope

Control LEGO Spike Essential with Motion: Using a Gyroscope Introduce Today we are going to learn how to control a robot in a completely different way. Instead of pressing buttons or using a controller, we will use motion. The LEGO SPIKE hub has a built-in gyroscope that can detect how it is tilted, and we […]

Read More
Digestion Dash: The Ultimate Body Adventure!

Digestion Dash: The Ultimate Body Adventure! Get ready to race through the human body in Digestion Dash! In this game, you’ll follow food on an epic journey—from the first bite all the way to the end. Along the way, you’ll play mini-games and learn how your digestive system turns food into nutrients your body can […]

Read More
Build a LEGO Elevator!

Architecture Week Challenge: Build a LEGO Elevator! Can you design and build a working elevator using LEGO Robotics? This week at Sprattronics Learning Lab, your mission is to take your minifigures from low to high—just like real engineers do in skyscrapers around the world! Watch the Challenge Video First Before you start building, watch this […]

Read More
Can You Design a Video Game About Animal Senses?

Can You Design a Video Game About Animal Senses? Your Challenge Create a video game where the main character survives using its senses. You’ll need to: Your mission is to design a game that shows how animals sense, process information, and respond in order to survive. Why Animal Senses Make Great Video Games Animals experience […]

Read More
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram