Scrolling top to bottom iPad PORTRAIT
I've seen a bunch of tutorials on creating a scrolling left to right iPad background, but I'm still banging my head trying to create a PORTRAIT iPad scrolling background (top to bottom).
I have an image that is 1024(h) x 768(w) and I want this image to scroll from top to bottom. Getting the image to scroll down is no problem, but the endless scrolling isn't working. I'm trying to do the recycle method that Jamie Cross uses instead of the destroy actor ().
Is it possible that the issue is because the image is too large? I read something about GS not allowing images to be off the screen more than 500 pixels or something(?). If so, how would I fix this so that the image fills the scene on load and then scrolls endlessly from top to bottom?
Really appreciate any help anyone can provide.
Comments
If you are having trouble with the image auto deleting because it is more than 500 pixels off the stage, you can increase the stage size as needed in the Scene Setting of the Inspector.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Jamie,
Thanks for the reply. I made those changes and the second actor background (the one above the main background actor) now scrolls but does not recycle itself.
Setup:
• Move: 270 relative to actor
• Attribute self.Position.Y ≤ -self.Size.Height/2
• Change attribute self.Position.Y to game.Screen.Size +(self.Size.Height/2)-5
I set this actor in the scene, centered.
I duplicated this actor and set its bottom position to connect with the other actor's top.
I'm about 99% sure these are the same settings you used in your tutorial from your site for vertical recycle.
Any ideas?
Here are some screenshots:
https://dl.dropboxusercontent.com/u/12020581/gameSaladScreenshots/1prototype.png
https://dl.dropboxusercontent.com/u/12020581/gameSaladScreenshots/2mainActor.png
https://dl.dropboxusercontent.com/u/12020581/gameSaladScreenshots/3secondaryActor.png
https://dl.dropboxusercontent.com/u/12020581/gameSaladScreenshots/2mainActor.png
Hi Paul,
I've attached a file to this message that address the issue. Since the iPad size is so large (1024), images get deleted once they are too far off camera (more than 500 pixels). To fix that in this file I've increased the Scene size and adjusted the Cameras origin so the image will scroll correctly. Hope it helps.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Brilliant! Thanks, Jamie. That did it.
Also, loved your Udemy course.
Jamie,
I'm seeing that black line after a cycle on your demo and now on my game, too. What's the process to eliminate that?
Hi Paul,
You can adjust the Y offset when the background is moved to the top of the screen. You might want move it down a few pixels to eliminate the gap. It might only show up in Creator though, consider testing on the actual device to see if it shows there as well.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page