Split drawing into more functions.  Had a bracket error that was messing up the entire script, not sure how it was working in the last revision (or did I not test it?).
Trying out fractional move distances, mostly works but sometimes there is a one pixel gap between perspective walls and flat walls.  Also had to adjust z-indices.
Get rid of pixel gap.
Shift center of 3d view to right.
Don't draw offscreen to the right- this still draws some off-screen, but limits it more than before.
Drawing left hand walls now in perspective.  Plenty of little 1 pixel errors.
Trying to cover 1 pixel gaps, also trying to avoid unnecessary drawing of walls.  Much more robust occlusion is possible of course.
Prevent walking through walls, doesn't work well yet.