App Game Kit offers a function that sets the depth of a sprite. The depth values are used in deciding the order sprites are drawn in. A sprite drawn after another sprite, will be drawn on top of or ‘in front’ of that sprite. This is now applied in such a way that the floor tiles are always drawn first, while the drawing order of the player and the wall tiles is made to depend on their vertical location on the screen. For example, a wall lower on the screen than the player is drawn after the player, so that the wall is in front of the player.
To give the player something to disappear behind the wall tiles were made a bit taller. I have not made them so tall as to completely hide the player and other game characters. The small dot indicating which way the player is looking, is always drawn on top of everything, as it is considered part of the interface.