X Tables
Coding And Maths

Scratch maths: sprite coordinates

Use Scratch projects to move sprites on a grid and connect positions to x and y coordinates.

Quick answer

Scratch maths: sprite coordinates help you move a character (sprite) around the screen by giving it a position using x and y numbers. The x number tells you how far left or right to go, and the y number tells you how far up or down to go. These numbers work like a map to find where the sprite is.

Learning outcome

By the end of this page, you will be able to use x and y coordinates to move a sprite to a specific place on the Scratch screen. Success signs:
  • You can explain what x and y coordinates mean
  • You can give the x and y numbers to move a sprite to a new position
  • You can use coordinates to make a sprite draw a shape or follow a path
  • You can spot how coordinates help in games and real life

Why this matters

Coordinates are used in many games, apps, and even real-world situations. When you play a video game, the character moves using coordinates. When you use a map to find your way, you're using coordinates too. In Scratch, you use coordinates to make your sprite move where you want it to go. This helps you understand how to describe positions and plan paths – which is useful for anything from building a LEGO house to designing a video game.

How it works

In Scratch, the screen is like a big grid. The middle of the screen is called the origin. From here, you can move your sprite in two directions:
  • X-axis: This goes from left to right. The number gets bigger when you go right and smaller when you go left.
  • Y-axis: This goes from bottom to top. The number gets bigger when you go up and smaller when you go down.
Every position on the screen has a pair of numbers:
  • The first number is the x-coordinate (how far left or right)
  • The second number is the y-coordinate (how far up or down)

Examples you can see

Let's imagine your sprite is at the middle of the screen, which is position (0, 0). If you want to move it:
  • Right 10 steps: x = 10, y = 0
  • Up 20 steps: x = 0, y = 20
  • Left 5 steps: x = -5, y = 0
  • Down 15 steps: x = 0, y = -15
Example 1: Making a square To make a sprite draw a square, you can:
  1. Move to position (0, 0)
  2. Move to (0, 20)
  3. Move to (20, 20)
  4. Move to (20, 0)
  5. Move back to (0, 0)
Example 2: Moving in a straight line If you want your sprite to go from (10, 10) to (30, 10), you only change the x-coordinate. The y-coordinate stays the same.

Try it as a mini adventure

Adventure: The Treasure Hunt You are a pirate looking for treasure on a desert island. The map shows the treasure is at coordinates (50, 30). You start at position (0, 0). How do you get to the treasure?
  1. First move: Go right 50 steps (x = 50, y = 0)
  2. Second move: Go up 30 steps (x = 50, y = 30)
Mini challenge: Draw a path from (0, 0) to (20, 20) to (40, 0) to (20, -20) to (0, 0) to make a diamond shape.

Common mistakes

  • Mistake: Mixing up x and y coordinates
    Why it happens: Children might say "I need to go up 10, so I go to (10, 0)" instead of (0, 10)
    Fix: Remember: x is left/right, y is up/down. Always say "x first, then y"
  • Mistake: Forgetting that coordinates can be negative
    Why it happens: Children think the screen only has positive numbers
    Fix: Show that moving left or down means negative numbers
  • Mistake: Thinking that moving to (10, 20) means going 10 steps right and 20 steps up
    Why it happens: Children mix up the order of numbers
    Fix: Practice saying "go to x = 10, y = 20"

Parent and carer guide

To help your child with sprite coordinates:
  • Use a grid paper to practice moving a toy or marker to different positions
  • Play a game where you give your child coordinates and they find the spot
  • Use real-life examples like a shopping map or a chessboard
  • Don't worry if they make mistakes – it's part of learning
  • Encourage them to talk through their steps out loud
  • Use Scratch’s "go to" block to show how coordinates work in the program

Practice questions

  1. What are the coordinates of the bottom-left corner of the screen?
  2. If a sprite is at (15, 10) and moves 5 steps left, where is it now?
  3. If a sprite is at (0, 0) and moves to (20, 0), what direction did it go?
  4. How do you move a sprite from (10, 10) to (10, 20)?
  5. If a sprite starts at (0, 0) and moves to (-5, 10), what did it do?
Answers:
  1. Coordinates are (-180, -150)
  2. It is now at (10, 10)
  3. It went right
  4. It went up
  5. It moved left 5 steps and up 10 steps

FAQ

What are coordinates in Scratch?

Coordinates in Scratch are two numbers that tell a sprite where to go on the screen. The first number is the x-coordinate (how far left or right), and the second number is the y-coordinate (how far up or down).

Why do we need coordinates?

Coordinates help us describe where things are. In games, they help characters move to the right place. In real life, they help us find places on maps or plan where to build something.

Can coordinates be negative?

Yes! Coordinates can be negative. If you go left of the middle, the x number is negative. If you go below the middle, the y number is negative.

How do I use coordinates in Scratch?

You use the "go to x: y:" block in Scratch. You type in the x and y numbers to move your sprite to that position.

What if I don't understand how to move my sprite?

Try starting at the middle (0, 0) and moving step by step. Practice with paper and pencil first to understand the direction before using Scratch.