bgx = 0
bgx2 = bgx + width
def move():
bgx -= 40
bgx2 -= 40
While True:
if bgx <= width *-1:
bgx = width
if bgx2 <= width*-1:
bgx2 = width
display.blit(bg,[bgx,bgy])
display.blit(bc,[bgx2,bgy2])
I am trying to create a scrolling bg , whenever I click a key move function is called
When it's time for the second image with bgx2 to show up on screen ,a glitch like something happens like in the attached image
What is the reason for that Is the code drawing a new "second" image every loop instead of scrolling?