I'm making a running game with an infinitely looping environment.
The way I'm making the environment infinitely loop is to instantly teleport the Sprite that the scrolling follows to x coordinate 400, while simultaniously teleporting all game sprites 1 screen width back as well using "for each" to make sure it all happens hopefully before the next screen draw.
It works ALMOST perfectly, but there's a split secong graphical glitch, especially noticeable on the player character, but also some times part of the background made with sprites (which aren't being teleported). This graphic glitch is NOT the sprites simply not being in the new spot yet and therfore being invisible for a split second.. It's hard to see exactly what its displaying, but it almost seems like its displaying enlarged versions of the sprites or something like that.
Has anyone else come across such a problem?
Yes, my graphics drivers are up to date.