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

Report as inappropriate.

danpost presents ...


Scrolling SuperWorld

An easy-to-use world superclass that implements scrolling actors and background. Fully documented with instruction and code.
When using cell sizes greater than one, all dimensions (world and universal) are rounded up to next odd integer.

jump: up arrow
move: left and right arrows

20355 views / 57 in the last 7 days

36 votes | 0 in the last 7 days

Tags: demo with-source scroll danpost superclass supportclass superworld

This scenario is a member of: Scrolling games, Support Classes by danpost

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


@danpost i tried your idea but it still does the same thing, shoot from the starting point of the Actor. but i did find a great scenario at and in his SWorld class he just had a little bit of changes than your SWorld, in your SWorld in the you had the methd [code] public int getUnivX(int worldX) { return (scrollingWidth-getWidth())/2+worldX+scrolledX; } [/code] all he did was change it to [code] public int getUnivX(int worldX) { worldX+scrolledX; } [/code] and it worked anyway i appreciate your reply


@AreebRaza, in the 'getUnivX' and 'getUnivY' methods, the amounts returned do appear to be totally screwed up. I must of had a brain-fart the day I wrote them. Maybe I should just have a 'getScrolledX' and 'getScrolledY' methods and let the user determine what to do with the information they return (so the above could be ascertained with 'int x = getX()+getScrolledX();'). Those methods are not used within the SWorld class itself, so changing them wont hurt anything.
A new version of this scenario was uploaded on 2016-05-22 10:07:48 UTC Simplified troublesome methods ('getUnivX' and 'getUnivY' changed to 'getScrolledX' and 'getScrolledY').
A new version of this scenario was uploaded on 2016-05-22 15:13:38 UTC


Hey I would really appreciate your help, I'm making a jump and run game for school and when walking left and right the blocks I jump on just move with me, how can I make them static?


@Tanonic, you should probably start a new discussion thread on this. Show the code you are using for placing the actors in the world and the movement code of your main actor.


this website is related to technical thing i can gather so much od information from here but i have some other issues which is related to QuickBooks billing system it is the very easy way to manage the account in our devices but if you face any problem with this QuickBooks kindly contact to this website


is it possible if you could contact me via email dan? to discuss some of ur games thanks


game is great but slow startup


Best game ever seen

See all comments

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

Who likes this?

Goku555 Sonal julius68 matthijs124 Kevroa Super_Hippo AreebRaza MusicalScore Jellyfish etbillder getreides Ruvero Dillybar Heavenly_Father_Banting Mimagic awesomeinmyworld Homicdle_moth asterodia al_griff sametguzelgun