Qbasicnews.com

Full Version: Line of Sight Code Needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need a good or at least working raycasting or preferably shadowcasting code for use in a textual game (Nethack). If you do not know what i mean just tell me and i can provide more information or some good websites.
well, if you dont want to make your own engine, the rte engine by angello motto was made for exactly that purpose (currently the only game using it is nebula capture the flag).
I guess what I really need to know is how to make a good line to cast the rays. I just need the code to draw a line from x1,y1 ro x2,y2.
Look in google for a bresenham algorithm.