coelurus wrote:Just using Bresenham can still force you to clip (if the view sees only a middle segment of a line), or even worse, walk along a super-long line outside the screen due to perspective projection (which gives something like coord*-z behind the view). Still, if you can somehow make sure you got atleast one end-point in the screen, drawing the line until you hit a screen border should work pretty well.
I think you're giving me too much credit - I meant using Bresenham to clip the line
before it is transformed to the screen. As in, I know that one (or both) of the points are off-screen, so I walk along the line until I am on screen and use that point as the new end. I then transform to the screen as normal, safe in the knowledge that the line is safely on-screen (in fact, I'd now know that the X coordinate is right on the left or right edge of the viewing space, saving a division).
Seeing as I'll be using fixed-height "sectors" for the moment, I'll just use a LUT for the heights of walls.
What are your plans for rendering the walls?
In terms of technique or code; none whatsoever as such.
I will
not be texturing the walls, though. If I feel especially creative (and have the clocks to waste), I might fill them a solid colour or dither them.
Of course, I'll need to sort back-to-front somehow. I don't know how good BSP would be for this sort of thing...
If I can get a basic, ugly, wireframe view up and running, that'll make me happy.
Do you figure out what sectors in the map are relevant to some view and transform only those?
All vertices are batch-transformed at the moment. Nothing clever is being done.
Windows?
Fixed-height sectors for the moment, so just walls, walls, walls. Of course, there's also the fun of trying to hide sprites behind walls and things like that which I haven't even dared think about yet.
I really wouldn't expect too much from me, as 99% of my 3D attempts have resulted in inglorious failure.
![Wink ;)](./images/smilies/grayscale_wink.gif)