NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

Camera & Smooth Scrolling Worlds

📌 What you will learn

Build worlds larger than 480×360 by tracking world coordinates (world_x, world_y) relative to a camera.

Core approach

Every object computes its screen position as (world_x - cam_x, world_y - cam_y). Smoothly ease cam_x toward player_x with ((player_x - cam_x) / 6).

  • Hide sprites whose screen coordinates fall outside [-240..240, -180..180].
  • Add parallax layers by scrolling distant mountains at 0.3 × cam_x.
  • Clamp cam_x at level borders so the camera never shows blank space.

Pro tip & next steps

Once you separate world coordinates from screen coordinates, scrolling becomes super clean.

All Techniques Browse more English guides in this section. Learn more → Scratch Block Dictionary Look up any Scratch 3.0 block with examples. Learn more →

FAQ

What is the best first step for "Camera & Smooth Scrolling Worlds"?

Hide sprites whose screen coordinates fall outside [-240..240, -180..180]. Once you separate world coordinates from screen coordinates, scrolling becomes super clean.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.