One of my students is creating a game using code.org for Game4Changes. He wants the background to extend when the sprite walks to the edge of the screen. Is there any way to do that in Game Lab? Thanks!
Is the student looking to have the background extend or scroll? The viewable area is always going to be 400 x 400 px. However, they can get creative with sprites if they want the background to appear to be scrolling. I’d have them check out the model games at the back half of Unit 3 if they need ideas.
Hope that helps,
Okay. Thank you for your response!!
If you student is advanced, it might be worth checking out the “camera.x” and “camera.y” properties, which change the part of the game that is visible on the screen. This might be an easier way to scroll a game than trying to scroll every element. There’s not a lot of documentation on these properties, so it might take a bit of playing around with them.