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

Report as inappropriate.

grfottox presents ...



This scenario contains a ScrollWorld class with which one can add
a lot of objects (also outside the current view/world) and scroll in
any direction unlimitedly. It may serve as a basic framework
for future scrolling games made in Greenfoot.
Suggestions for improvements and/or bug fixes are very welcome!
- move Tux with the arrow keys
- scroll the view with: 'A', 'W', 'S', 'D' to respectively left, up, down, right
- center view around Tux with: 'C'

11821 views / 1369 in the last 7 days

13 votes | 0 in the last 7 days

Tags: demo with-source scrolling extension framework

This scenario is a member of: Reusable actors & support classes, Scrolling games

open in greenfoot
Your browser does not support the canvas tag.
Very nice dad! I like it! I can't wait for the next version!


Nice! I was waiting for someone to finally get this idea working. My only complaint: off-screen objects do not receive input. I would suggest that this could be fixed by having a separate method that you use for the "act" method, and call this from the world, regardless of if the object is on the screen or not.


Hey, Nice idea, and well coded too - it's good to see someone using comprehensive javadoc comments and nice indentation!


I noticed the up/down scrolling is backwards? Or is that just me?


nice thought


thnks thanks thanks !! XD


@Zerg: An update scenario, called ScrollingWorld, will fix your request. @mjrb4: Thanks for you feedback, I'll hope my update will have the appropriate comments as well. @McChicken: Moving the View will move the actors in it in the opposite directions! @Others: I'll hope the updated version looks more polished and may inspire you to make real interesting scrolling games! Any new ideas/suggestions or bug-reports are welcome. Thanks in advance for your feedback.


i noticed you move the scroll in whole cell increments which makes the movement rather jerky. Stepping through the movement would make the move smoother. If each sell were 50x50 then 5 10 pixel steps at each act method tick would smooth the scroll.

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

Who likes this?

actinium MatheMagician charleson Flo6723 ThatOneGuy AlexDragen2 Advenging GameCode Yoinkinator qnanqing mjrb4 FolkertVanVerseveld limefortheworld