Small 3D map illusion in pygame
Credits to Mr DaFluffyPotato video on sprite stacking. Heres how to achieve the effect with Voxel models:
- Export voxel files as slices from Magicavoxel, then crop it into layers (the export file comes as a single png file out of magicavoxel, so you can create an script to separate them in individual files for each layer or manually create each layer out of the main image by cropping each slicd)
- With the help of pygame, stack those layers with a small offset one on top of another, this will give the illusion of 3D to your models.
- The map tiles on the ground are also 2D png files, everytime tou rotate the camera, make sure you place them to have the tiles closest to the camera (bottom) drawn first