r/pythonarcade • u/qcaron • Feb 17 '20
Displaying a sprite on top/below another one
Hi everyone,
I am very new to arcade and got introduced to it through the Real Python tutorial. In the tutorial, you get to manage a player sprite, rocket sprites and cloud sprites.
I have been trying to find out why is the player sprite below the cloud sprites when they are more or less at the same position where the rocket sprites are above the player sprite. It is not consistent and seems to come from the images themselves which sounds weird to me.
Why would a sprite display in the foreground and another one in the background, relatively to another one (the player sprite in my case)?How do you get to display a sprite on top/below another one?
If this has already been answered somewhere I will gladly just read what you point out to me, but I could not find any answer by myself.
Thanks!!Quentin
View all comments
Show parent comment
1
u/pvc Feb 17 '20
I often keep things in separate lists and then draw the lists in back-to-front order.