//4df raycasting, can be extended to 6df,
//but slow so I haven't tried yet.
voxel[256][256][256];//voxel color data as 3D array
...
for each (x,y)//same xy coordinates in the terrain raycaster;
{
//here is something different but simpler
//draw one column voxels located at (x,y)
for(z=0 to 256)
{
if(voxel[x][y][z]!=0)
project voxel[x][y][z] to screen
}
//move to next position: x+=dx;y+=dy;
}
...

Other tips:
1. voxels have to be scaled to cover the screen(tutorial)
2. check the screen buffer before render the color to avoid overdraw
3. other tricks to speed up(low res, tables, fixed point, bitwise...)