I'm looking to create an FoV implementation and I was wondering which algorithm is faster - raycasting or shadowcasting?
|
|
Raycasting and shadow casting are types of algorithms, not algorithms themselves (in this context). So neither have any performance characteristics, per se, and thus neither one is faster than the other. "Shadow casting" as a FOV technique isn't very common, I've only ever seen the term used widely in Roguelike development circles (and in fact the RogueBasin has a number of articles on shadow casting FOV techniques, such as the spiral path implementation and plenty of articles on FOV in general). You also might find this article from GDNet interesting. It's important to remember that there are more factors to consider than just performance -- while shadowcasting techniques tend to be faster than their raycasting counterparts, you pay a trade off in the shape of the results. Some algorithms generate more anomalies and artifacts than others, some procedures don't produce exactly uniform or symmetric results. |
|||
|
|