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

2014/8/9

Camera Position Change

Jeb_CC Jeb_CC

2014/8/9

#
So I'm making a small game sort of thing and it has a very long 'runway' sort of world. 1800 by 480. I don't want to have a scrolling edge, too difficult. I'm thinking of just changing the camera position once the player reaches the end of the screen if that's possible. Any way to do this?
danpost danpost

2014/8/9

#
Jeb_CC wrote...
I'm thinking of just changing the camera position once the player reaches the end of the screen if that's possible. Any way to do this?
Well, yes. But to do so would be to 'step-scroll'. In other words, you would basically be using code to scroll -- just using larger changes in the scroll position. If you manage to do that, you might as well go all the way and make it a basic scroller that scrolls anytime your camera actor moves.
Jeb_CC Jeb_CC

2014/8/9

#
I see. No real easy way to go about it then. :3 Thank you.
KalleLarsson KalleLarsson

2014/8/19

#
if you want a ready-made example (infinite) scrolling scenario, which you can learn from, or just add your game to, you can use scenario 12055 which I've uploaded. Its really an empty shell which you can bulid your game into, the actors you see when you run it are just there to show that the scrolling works
You need to login to post a reply.