I am working on a simple game in Python, using the Pyglet graphics library. I have an image, 6000x300 pixels, that I want to use as a scrolling background for the game. At the moment, I have made a sprite with the image and move it left and right depending on the player's position. The problem I have is that the sprite is glitchy: sometimes the 400 or so pixels at the start are duplicated several times along the length of it, and the motion of the sprite is sometimes jerky and sometimes smooth.
Is this expected behavior for an image of that size? Is there a workaround? If not, can anyone suggest an better way to make a scrolling background?
Thanks in advance.
Well, it's a strange one. I got home and ran the program on my newer desktop (my laptop is about 8 or more years old...) with the intention of making a video to help to explain the problem, and guess what? It runs perfectly. Must be a bug with Pyglet and very old hardware...
Pyglet large sprites glitch