Line Of Sight Algorithm?
Posted 24 May 2007 - 02:38 PM
Current method is to shoot rays to a 90degree angle, and following the rays path,
and checking stopLOS for each tile.
But it is tricky, since each cell has 4 tiles (floor, westwall,northwall and content eg: a barrel).
Do how do you decide which tile gets hit first by the ray??
Also this algorithm is somewhat inefficient, since at the beginning the rays overlap,
and create a overhead -> maybe a minor performance issue?
Also these rays have to go from down to up, also 90degrees.
So if anybody has any suggestions, comments, u r welcome!
Posted 24 May 2007 - 04:23 PM
Then you can use a probabilitic approach (nearer gets higher random value) if random is in the interval, then you see it.
Edited by red knight, 24 May 2007 - 04:24 PM.
Visit my blog at: flois.blogspot.com
Pookie cover me, I am going in.