My actor jumps across the screen

It compiled and it is still wrong

My actor jumps across the screen

This page is part of Intro to Java with Greenfoot. It assumes you have reached lesson 3.5. Opening it is not counted against you and is not tracked as progress.

What it actually means

move counts CELLS, not pixels, so a large cell size turns a small move into a big jump.

The usual causes

Ranked by how often each one turns out to be the answer. Work down the list.

  1. The world has a large cell size, so each cell is many pixels on screen.
  2. The move distance is simply too large for the size of the world.
  3. setLocation is being given pixel values where cell coordinates were expected.

How to fix it

Look at the third number in your super call. If it is large, either reduce the move distance to suit or rebuild the world with a cell size of 1 for smooth movement. Grid games want big cells; action games want a cell size of 1.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]