Raytracing algorithms in Design Philosophy
|
|
I was wondering if anyone around here came up with any decent raytracing algorithms. The only one I'm aware of is the one in Shadowdarke's Pixel Projectiles library.
Right now, I've encountered a teensy problem with visual events in Haven's output system. The way it's set up, you can "see" things happening at a distance well beyond world.view, provided the event's visual strength is stronger than world.view. For instance, you might see someone attacking someone else even if it's well off screen -- your character isn't assumed to be so narrow minded that he suddenly loses track of someone just because they're no longer ten metres away. This appears in the form of a text message: "You see someone hit someone in the arm!"
However, the problem here is that view() fails completely at those ranges. My aim is to raytrace between an observer and the source for visual events that are larger than world.view, so that distant observers can still witness them. Obstructions that block line of sight at range will obviously prevent someone from "seeing" anything at range.
In the meantime, you can still "see" visual events at range, but they are visible through walls and the like, which is rather game-breaking to say the least...
|
These may help:
[link]
http://sc.tri-bit.com/Computing_LOS_for_Large_Areas
http://www-cs-students.stanford.edu/~amitp/Articles/ LineOfSight.html
http://roguelikedevelopment.org/php/category/ showCategory.php?path=development/&category=LOS