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

Report as inappropriate.

grfottox
grfottox presents ...

2009/2/21

scrollworld

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!
Usage:
- 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'

12745 views / 23 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!
ZergZerg

2009/2/23

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.
mjrb4mjrb4

2009/2/23

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

2010/7/27

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

2010/9/17

nice thought
AlexDragen2AlexDragen2

2011/8/4

thnks thanks thanks !! XD
grfottoxgrfottox

2012/6/14

@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.
actiniumactinium

2012/12/2

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