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

danpost's Comments

Back to danpost's profile

You should make this a horizontal scroller, as the window is way to wide. I cannot see the start area or the finish area on my screen.
@Dytanoth, I have incorporated the 'fillScrollingBackground' method into my scenario and uploaded it (with some minor comment changes). Hope this helps.
I guess what I was trying to say was this: When using scrolling, no coordinates are absolute.
Sorry, did not mean to submit yet -- continuation follows: each location have various universal coordinates.
@Dytanoth, you should be able to code their movement as normal using move(int) or setLocation(int, int). If using the 'setLocation(int, int)' method during game play, base the int values on the current x and y value of the actor; that is 'setLocation(getX()+xOffset, getY()+yOffset);'. Using absolute locations will not guarantee that the actor will end up in the world where you want because the scrolling world makes
@Dytanoth, my world did not have an act method in it. By you putting one in your world, it overrides the one in the 'SWorld' super-class. You just need to add the statement 'super.act();' in the 'act' method of your 'MyWorld' world class.
@Dytanoth, in the meantime, you may have to do that yourself and use the finished image as the scrolling background.
@Dytanoth, maybe I will add another method called 'fillScrollingBackground(GreenfootImage image, int wide, int high) and have it create the full-sized background image required from the 'smaller' image (to allow a 60x60, or whatever size, image to repeat and fill the background of the whole scrolling area).
@Duta, the source is open now.