Side scroller: how to move the entire screen left right?

Hi,

I’m working on a side scroller. The basics work, I’m using moveWithCollision to move the player. I change the collisionresponse, so I can land on a platform sprite (slide) and have specific code for alpha collision with a cactus.

I want to keep the player in the middle of the screen and move the scene left or right. Do I need to move all of my sprites and bitmaps manually after the player has moved? Or can I move the scene? Can I add all of the visual elements to a master sprite, which I move (without collissions)

Thanks for your input!

You can do it with display.setOffset (sorry, I meant graphics.setDrawOffset), check out the “Level 1-1” example that comes with the SDK

1 Like

That works perfect, thanks!