Talk:Permissive Field of View

From RogueBasin
(Difference between revisions)
Jump to: navigation, search
m
m (Bug report: minor fix)
 
(3 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 faster 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, its 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 18:27, 18 December 2011

[edit] 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)

Personal tools