An adventure in coding

Parry

Coming later

Designed for kids age 10 to 12

Two kids seen from behind playing a two-player table tennis duel with game controllers on a flat-screen computer, drawn in pen and ink

Designed for ages 10–12

Build a two-player table tennis duel with a partner, and learn how browser games really work!

Follows Summoning and teaches browser game programming. The core lessons stay in the browser.

You and a partner split the work: one writes the paddles, the other writes the ball and scoring. You design the ball-paddle bounce together.

Planned outline

Game programming in your browser, then a paired final project

  1. Handle click events

    Listen for clicks on the page

  2. Read the keyboard

    Move things with key presses

  3. Draw on a canvas

    Paint shapes with code

  4. Run a game loop

    Make things move smoothly on screen

  5. Detect collisions

    Check overlaps and keep score

  6. Snake warm-up

    Move on a grid and avoid yourself

  7. Breakout warm-up

    Practice objects and pair-programming roles

  8. Then: the final project

    Two-player table tennis duel with a partner

Final project

Build a two-player table tennis duel

Work with a partner. The left paddle uses W and S. The right paddle uses the arrow keys. Student A writes the paddles. Student B writes the ball and scoring. You design the ball-paddle bounce together.

Optional bonus

Parry leaderboard

Share scores with the class: send names and scores to a shared leaderboard.

How long

A short weekly course

Sessions of about an hour and a half

What you need

Windows laptops

We'll supply them, with Notepad and a web browser. Or bring your own.

Builds on

Summoning

A follow-on course in browser game programming

A first look

You'll write code that listens for clicks. Later you'll read the keyboard and draw to a canvas.

// move the left paddle up
leftPaddle.y = leftPaddle.y - speed;
  • Left paddle: W up and S down
  • Right paddle: ↑ and ↓
  • Build it with a partner!

Contact us for information about scheduling in your school or area.