📍 X and Y Coordinates
5th Grade 💻 Coding
X and y coordinates give every point on the screen an address made of two numbers: x tells how far right or left, and y tells how far up or down.
In Scratch, the stage is 480 steps wide and 360 steps tall, and the center is x: 0, y: 0. Going right, x grows up to 240; going left, it drops to -240. Going up, y reaches 180; going down, -180. The block “go to x: 100 y: 50” sends a sprite to an exact spot, and “change x by 10” moves it to the right.
In games, movement is really just changing x and y every frame. Watch out, though: in many other computer systems (web pages, for example), the zero point is in the top-left corner, and y gets bigger as you go down, the opposite of Scratch and of math class. So always check where zero is.
For example
- A sprite at x: -200, y: 0 is on the left side of the stage, halfway up.
- To make a ball fall, you make its y a little smaller each time.
📌 Remember: x = left–right. y = up–down. Center = (0, 0).
Quick quiz
What is the address of the center of the Scratch stage?
What happens to a sprite when its x gets bigger?
How wide is the Scratch stage?