Greetings Game Wizards,
I am working on developing a ray casting engine for use in games. The
engine I have gotten to work so far runs under a protected mode
development kit based on DJGPP. It uses 640x480x256 and is adequately
fast for quite a few applications. Unfortunately it is based on the
engine given in "Tricks of the Game Programming Gurus" text and only
supports a set of equal height objects on a 2D regular square grid. This
allows the engine to be very simple but I want to be able to ray cast
objects which are of variable height and can be located in the z
coordinate space as well.
The only algorithm I can think of would be to raycast each pixel and
check for x/y/z intersections similar to the x/y intersection checking
done in the text. I can imagine this would be incredibly slow even using
32 bit integer math under protected mode.
There must be a better way. I've seen the results in games like DOOM.
Can someone suggest an algorithm which will allow this z-coord ray
casting but will be fast.
Thanks for your help,
\*...* * Jim Tsillas - Senior Software Engineer *
\**/ * Cascade Communications Corp. *
\/ * 5 Carlisle Road, Westford MA 01886 *