Sprite seems to be duplicating when moved


Hi everyone, two of my students who pulled in outside image are having trouble with these sprites on movement. Sharing…when we click the space bar to jump little lines seem to remain after the sprite comes back down and we aren’t sure whey.

Appreciate your help.



It looks like the background is not being drawn every time through the draw loop.
Look at lines 40

  // draw background
  mario.velocityY = 0.5;

There is a comment there to draw the backgound but not the command to.


Thank you.

What would the command look like? I’m not sure about this part either.


background(‘white’) ;

I think…


Thank you. That worked for him. Much appreciated.