← Gallery

Coordinates and Collision

by Anonymous

Add to or subtract from x and y, where y grows downward, to move an object and use inequalities to tell whether two boxes collide.

Ready to remix β€” hit the 🍴 Remix button below. You'll sign up first, then this app is copied into your workspace.

πŸ”— Open in a new tab

About this app

Coordinates and Collision is an interactive coding basics lesson about using x and y values to position and move objects on a board. Learners practice the screen-coordinate convention in which x increases to the right and y increases downward, then build a comparison-based rule to determine whether two boxes overlap. Three guided tabs provide hands-on challenges for positioning, step-by-step movement, and collision testing.

Use cases

  • Beginners learning JavaScript coordinates
  • Students studying game programming fundamentals
  • Teachers demonstrating screen-coordinate systems
  • Learners practicing arithmetic and comparison operators

Features

  • Four coordinate-placement challenges using plus and minus controls
  • Step-based movement exercises with selectable x and y increments
  • Visual code snippets showing position updates and collision rules
  • Collision challenges requiring checks in four directions
  • Test layouts with immediate pass or error feedback
  • Reset, next-challenge, and optional sound controls