Talk:Petit Computer 3/@comment-15296152-20140502215139/@comment-15296152-20140502233235

There isn't a Z-axis for 2D sprites in 2D hardware in the same way it is dealt with using 3D hardware. It is more of ordering based on certain criteria. With 2D hardware like on the SNES, GBA and DS, there is a priority value for sprites (from 0 to 3, integer), which only determines a sprite's placement against the background layers. Sprites with the same priority will all be either in front or behind a certain background layer. The only other ordering done after that is based on the sprite's control number, where a lower control sprite will be rendered above higher control sprites. Control #99 with a priority of 0 will always be in front of any sprite with a priority greater than 0, but will be behind any sprites with the same priority, just like control #0 with a priority of 1 will be behind all spites with a priority of 0 but in front of all other sprites with the same or greater priority. The only way to change the order while maintaining the same priority against the backgrounds is to set the sprite with a different control number.