Unit 3, Lesson 22 - Student having trouble with sprites showing behind sprite background


I have a student that is having trouble with her background? She wants the background to animate, which it will if we take it out of the draw loop. Not sure where the best placement should be? Also, the Sprite called background is causing all other sprites to be behind the background Sprite.

Looking for some direction on how to help the student to see the rest of her sprites within her game.


Hi Jason,

The background appears to be animating, so may the student was already able to solve that problem. Right now the main problem appears to be that all of the sprites are plotted at the edge of the screen and the conditionals that check their position are set that they are always true, so the sprites are getting constantly replotted back to the end of the screen. They are definitely in front of the background sprite, though. I’m not sure the exact problem the student is trying to solve, because the ones that you mention appear to be solved already, but the game doesn’t look like it’s functioning as intended.

One issue is that it looks like the student didn’t do enough intermediate testing on everything before running the game. There are so many different weird things going on, that it will be really hard to debug them all at once, because it’s often not clear how different bugs are affecting each other.

Let me know if there’s anything specific I can help with.



Thanks Elizabeth for getting back to me. After posting, I walked away from looking at the code and was able to find the issue. Yes she had many other issues with her code. Since we figured out the sprite issue. We have fixed most of the other issues.