I have a bit of experience with Cocos2d but it's also been quite a while since I've worked with it. That being said, I don't necessarily need code handed to me - just a pointer towards the right approach I should be taking to achieve my requirements.
My project is a simple block game, where players move blocks by swiping them (the blocks move at the exact speed of the swipe, no acceleration). What I want to achieve, is when the player swipes a block off screen, I want the part of the sprite which is hidden off-screen to appear at another edge of the screen and keep moving until the drag motion has stopped (a bit like the old mobile game, Snake II). When the sprite has completely moved off the screen, it should now be completely visible somewhere on the opposing side of the screen. (so the screen is like an infinite loop which the sprite can move on). For example, the sprite is 40% visible on the left of the screen, and 60% visible on the right of the screen (halved at screen boundary, 0.x). As the sprite moves left, it will become 35% visible on the left, and 65% on the right.
What is the best approach to tackle this? Should I be duplicating the sprite and then moving the new copy onto the screen in an opposing fashion? Or is this somehow possible with one sprite and some kind of mask?
Any help would be greatly appreciated. (I'm not at home now but I can add sample code and images later if my explanation isn't clear)
I'm using the objective-c version of Cocos2d.