I’m not really sure how to explain clearly what I’m trying to do, but picture I have the screen “Sprite” that fills the whole screen, let’s say it’s 1000 x 1000 for simplicity sake.
Then inside of that, centered on the screen I have a “game area” that is 500 x 500.
I am using drawTiles to draw my objects inside the game area. What I’d like to happen is when I draw one near the bottom that extends off the bottom, I’d like it to wrap around to the top.
I’m currently faking it by check to see if my draw.y + sprite.height > gamearea.height and if it is, I draw a duplicate of that sprite at the top - which works fine, EXCEPT you see two WHOLE tiles, not the top part of the bottom one and the bottom part of the top one because the container sprite I am drawing them in resizes automatically to the new size so nothing get’s cropped…
Is there a fast way to mask/crop anything outside of the initial game area and not to resize? Or… to force the container sprite to “wrap” from top/bottom?
If that makes any sense…