Student using sprite as a background and other sprites not showing

I have a student using a sprite as a background. He then adds other sprites which I expect to show up on top of his background. I am not seeing his sprites and don’t have an answer as to why it is not showing up.

Eugenie,
This one took me a while to figure out. The problem is that he is the command P1.collide(G1); which makes the player unable to occupy the same space as the ground. The problem is that the ‘ground’ animation is 400x400 pixels, even though most of it is transparent. That is going to force the P1 and P2 sprites to be moved off the screen entirely as soon as the game begins. It’s not that they are hidden behind the background. My clue about this was setting a watcher for P1.x and seeing a negative value:

To fix this problem, the student will likely want to crop the image just to just the skinny rectangle that actually makes up the ground. This animation shows how:


He’ll need to be aware that this will also seem to change where this sprite is drawn because it no longer has the same center point. Hope that helps!

1 Like

Thanks! I made changes on my remix of this project and it resolved the problem. I appreciate your help.

1 Like