Difference between revisions of "Talk:Permissive Field of View"

From RogueBasin
Jump to navigation Jump to search
(advertising my new algo)
 
m (→‎Bug report: minor fix)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Hi! I have a different algorithm, a mix of Recursive Shadow Casting and Precise Permissive Field of View. Seems simpler and does not inspect tiles behind obstacles, so should be much simpler on maps with long corridors. It's coded in Haskell. Please have a look and point flaws in it at https://github.com/Mikolaj/LambdaHack/wiki/Fov-and-los. Also, it's version modified for DFOV is even simpler and faster, so perhaps we could have DFOV in libtcod again? --[[User:Mikon|Mikon]] 02:26, 15 December 2010 (UTC)
==Bug report==
Ran some tests using the implementation from [[Roguelike Library For Java]]. It's very fast and I like how it looks. Found a "bug" tho. Generated random 40x40 maps filled with about 20% walls, around 1% of the checks didn't respect symmetry. I narrowed it down on a 5x5 map:
{|
!map
!report
|-
|
<pre>
 
 
01234
0..#..
1.....
2...#.
3##.#.
4##..#
 
 
 
</pre>
|
<pre>
(3,4) -> (0,2) : false
(0,2) -> (3,4) : true
 
(4,0) -> (1,4) : true
(1,4) -> (4,0) : false
 
(4,4) -> (0,1) : true
(0,1) -> (4,4) : false
 
(1,2) -> (4,4) : false
(4,4) -> (1,2) : true
</pre>
|
|}
On a similar note, gave shadow casting from the same library a try as well. It's a lot slower and crashes when range is too wide (like (0, 0) -> (35, 35)) because of recursivity (call stack). I didn't find how to contact the author yet. --[[User:Lulero|Lulero]] 17:25, 18 December 2011 (GMT+1)

Latest revision as of 16:27, 18 December 2011

Bug report

Ran some tests using the implementation from Roguelike Library For Java. It's very fast and I like how it looks. Found a "bug" tho. Generated random 40x40 maps filled with about 20% walls, around 1% of the checks didn't respect symmetry. I narrowed it down on a 5x5 map:

map report


 01234
0..#..
1.....
2...#.
3##.#.
4##..#



(3,4) -> (0,2) : false
(0,2) -> (3,4) : true

(4,0) -> (1,4) : true
(1,4) -> (4,0) : false

(4,4) -> (0,1) : true
(0,1) -> (4,4) : false

(1,2) -> (4,4) : false
(4,4) -> (1,2) : true

On a similar note, gave shadow casting from the same library a try as well. It's a lot slower and crashes when range is too wide (like (0, 0) -> (35, 35)) because of recursivity (call stack). I didn't find how to contact the author yet. --Lulero 17:25, 18 December 2011 (GMT+1)