This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

danpost presents ...


Horiz/Vert/Univ Scroller

A Scroll class that supports scrolling of the background of your world. It uses the size of the background image supplied to set the scrolling limits of your world. The methods used for performing the scrolling return any amounts of changes in the scrolling offsets so that actors can be scrolled to those amounts..

It is fairly well documented; at least, to the point where it should be clear as to how to implement the engine into another scenario.

Future update may include a method to scroll the actors as well; however, doing so may make things more complicated than I wanted.

3825 views / 559 in the last 7 days

6 votes | 0 in the last 7 days

Tags: demo with-source terrain scroll danpost

This scenario is a member of: Support Classes by danpost

open in greenfoot
Your browser does not support the canvas tag.


nice car


I think that the example of the car traversing 'rugged' terrain is more helpful to me than the scrolling world is, as I am (or was) trying to make a game where I needed that kind of car.


@shrucis1, your welcome.
A new version of this scenario was uploaded on Thu Dec 12 15:18:36 UTC 2013 More documentation added
A new version of this scenario was uploaded on 2015-03-09 16:55:06 UTC Updated version! Scroll class supports scrolling of background image only. Size of image determines scroll limits.
A new version of this scenario was uploaded on 2020-10-29 17:40:29 UTC

Want to leave a comment? You must first log in.

Who likes this?

MrSkyPanda ☾hloe sandra421 herusaputra Kartoffelbrot FlyingRabidUnicornPig