Re: fov algorithms comparison method
- From: jice <jice.nospam@xxxxxxxxx>
- Date: Mon, 26 Jan 2009 01:40:54 -0800 (PST)
On 25 jan, 21:50, gribblysday...@xxxxxxxxxxx wrote:
As the original author I have to admit responsibility here - you're
right, my fault sorry. And I sincerely apologise for not responding to
emails etc on the topic - I picked up a new job fairly shortly after
posting and haven't had any time to get back into it without
sacrificing other projects.
Oh that's cool ! I took the liberty to name your algorithm 'diamond
raycasting'. If you want to give it a more appropriate name, I'll
change the references.
Current goals are:
1. fix this bug
2. simplify the algorithm
3. determine if it has any comparative advantages over other methods
of FoV calculation
It definitely has. For example, it's the only algorithm I tried that
casts a shadow from a 1x1 pillar in every situations. Moreover, while
not being the fastest, it still has a pretty good speed and is really
elegant. The comparative study I've been doing for a few weeks
currently places it in the top 3.
4. if so, optimize it; if not, discard it
Don't discard it :)
My next step was going to be to try and speed things up by pre-
processing maps. For instance, if instead of describing a map as a
group of individual tiles, we described it as a set of visible and
obscure rectangular areas, then the algorithm could jump across large
areas through a couple of multiplications rather than processing
individual tiles. Of course, then I got stuck on determining the
optimal set of such rectangles for a given map...
I think this is exactly what this is doing :