I'm working on a voxel based fake 3D firstperson engine in Game Maker. To do this I've got one object that draws the voxels based on the angle compared to the camera angles and the distance to the camera. Also, the voxels are drawn on a grid
The only problem I've got so far is the fact that I can't set the depth in the draw event, so I've got to draw the voxel in the right order that the nearest voxels are drawn later on then the furthest points on the grid.
Is there a way that I can get the furthest X and Y on a grid, and then repeating this but every time I draw a voxel I get X and Y of the grid one spot nearer as the last one I got?
Here's a sexy pic if you want to see the engine in action