Vertical Background Loop
-
So this has been mentioned on my previous thread but that thread wasnt directly for this problem. Hopefully other members here can shed some light on how to make this happen. I would like to seamlessly loop a vertical background image. So as the player goes upwards. He actually looks like hes going upwards. I and some members have tried screen wrap but that shows very inconsistent as it leaves gaps between images. Below is an example of a seamless vertical background image I would like to loop. Any help or maybe even a better feature of background image support would be very much appreciated. Maybe a dedicated wrap image around screen behavior?
-
@SplitMindGaming Making it yourself could be easy if you have enough knowledge ( I could be wrong, I've never tried to make a dynamic wrap around screen behavior myself ). But if you want a specific thing to happen in your project and the simple way doesn't work, try to find other ways to do it 😉 I'll try to find something you can work with 🤷
-
@XxWhiteHearrxX yes I have found cocosd coding on how to do it actually. But the coding looks way beyond my field of expertise. I just feel like a background loop should be an easy thing to add for hyperpad. I shouldnt have to go through great lengths to actually go learn how to code from scratch just to achieve a background loop. Just my opinion.
-
@SplitMindGaming It's better cause it gives you the opportunity to push the boundaries of your knowledge. And never tell that things has to be easy, if it is not then you can still find other ways. And finding other ways will teach you more than you think!
-
@SplitMindGaming You can make it so when your screen or player collides near the edge of the image, it moves so it looks like it's going forever.
If you have the image height of 10m, you can make it so everytime the player moves up 10m, the image moves 10m.
-
@RobinsonX how do you set up the behaviors?
-
@SplitMindGaming Here's what I've come up with first:
https://go.aws/2PW3Mv2 (copy paste this into safari to download the project)It's not perfect, it stutters a little bit every time it loops, but it never gets gaps. This exact logic will only work if the game is portrait iPad background size (otherwise the numbers just need to change a bit).
The logic is all in the main background object (on the Background layer). It works on both y and x axis (so it loops both ways) but if you don't need it to loop in the x direction you don't need half the behaviours (the ones marked with ❌). It works by having 4 objects, one of them does the looping logic and teleports all the others next to itself. Again if you only need y, you don't need the two background objects to the right.
I hope you can look through it and understand how it works. I think I might know how to make a seamless one that never stutters, but it would be more complicated.
-
@Aidan-Oxley i see what you did there. Very smart. Really is complex for just a background loop. Would love to see hyperpad get a behavior feature where it can automate this process for us much easier.