The tunnel is using an interesting dodge to keep the speed up and eliminate the need for any sorting or z buffer. essentially all I have done is to create a series of diminishing squares, these are treated as 3D points, but in fact it's no more involved than writing a 3D starfield. You see, the tunnel never actually moves, I just add a variable to it, the variable moves forward and when it's advanced by one square it is re-set. This means that the tunnel is always drawn from back to front. Then it is a matter of adding some sine and cos to each layer of the tunnel to make it bend, in the full version it rotates, but a simple rotation around one axis is not hard.
X = COS(theta) * XX - SIN(theta) * YY
Y = COS(theta) * YY + SIN(theta) * XX
Theta is just a posh way of saying rotation angle.