I do not understand. if I make a window, I only see the maze through the window, but not the sky and the Earth.
That's right. And you will not see all of the maze only parts of the maze.
To understand why this is requires a complex explanation which you may not understand but I will try.
On a 3D surface there is something called a Z-buffer.
When you draw a triangle the distance of each pixel is stored in the Z-buffer.
When you draw another triangle it will only draw the pixels if they are closer than the first pixels.
This works fine when a pixel is completely transparent (alpha=0, it will not update the Z-buffer) or not transparent at all (alpha=255, it will update the Z-buffer).
But what if alpha=128? Should it update the Z-buffer or not update the Z-buffer? Whatever it does could be wrong.
This is why partial transparency (alpha=1...alpha=254) is hard.
But the solution is...
1. Draw all not transparent at all/completely transparent first (the earth, the stars, the monsters...)
2. Sort all surfaces which contain partial transparency from furthest to closest and draw them in that order (in my version that is why it sorts the map's triangles based on distance)