Posts: 9
Threads: 2
Joined: Mar 2003
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.
Posts: 2,020
Threads: 24
Joined: Jun 2002
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]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 9
Threads: 2
Joined: Mar 2003
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.
Posts: 6,419
Threads: 74
Joined: Mar 2002
Look in google for a bresenham algorithm.