
When viewed together, these stacked layers simulate volume, height, and depth.
At its core, sprite stacking works by slicing an object into horizontal layers, almost like cutting it into thin cross-sections. Each slice is then drawn at a slightly different position. When animated or rotated, the offsets between these layers trick the eye into perceiving a 3D form.
In his tutorial, game developer Teo Chhim demonstrates how overlapping and offsetting sprite layers can turn flat 2D scenes into something that feels dimensional. He also shows how the same technique can be used to fake rotation, making textures appear as though they’re spinning in 3D space, without using any real 3D geometry.
This approach is especially popular in retro-inspired games because it maintains a pixel-art aesthetic while adding depth and visual richness. It’s also lightweight and engine-friendly, making it ideal for tools like GameMaker and other 2D-focused engines.
Sprite stacking is used effectively in Chhim’s upcoming GameMaker murder mystery Detective Fantasia: EXCALIMURDER, a Game Boy-inspired narrative adventure where Excalibur itself becomes the murder weapon. The technique helps the game’s environments and objects feel more immersive while staying true to its classic 2D style.
If you’re interested in more practical game development tips, Teo Chhim regularly shares additional tutorials and insights on X (Twitter).
Sprite stacking is a great example of how a small visual trick can dramatically elevate the presentation of a 2D game, proving you don’t always need full 3D to create depth.