About to have to step away, but found this interesting tidbit that may point to rendering issue.
I THINK there’s a bug in field_of_view_set()
that doesn’t “see” x == 0 or y==0
In the fov.rs file, after
fov.visible_tiles = Some(field_of_view_set(*pos, fov.radius, map));
I added:
println!("FOV @{:?}={:?}",pos, fov.visible_tiles);
(NOTE: in both cases, I dumped the map to the console to verify there were walls along the top row and left side, and went to a floor tile at y ==1 or x == 1. I would expect their FOV sets to include the walls a x == 0 or y == 0). (Found a map with both, so player is at (1,1)
Map dump:
----------------------
Drunken Map
----------------------
################################################################################
#...####............##....#.#....##.......####.....#.....###..#.....#.##.#######
###....#.#................#......###....#######........#.####..##........#######
#####...........##...............####....######..........####..####...#..#######
#######.##..#...###...###...##...........##......#..#......###..##....#..#######
######..........#...#........#..####.....##..#..........##.#....###..##..#####.#
#######....#......####..#.........###.#...#....##..#....##..#.###..........###.#
#########.##.......####.#.............###...............###....##..#..##..####.#
########........##..##......#...#.....###...##......##..####..####.#..###......#
#########........##..#......#...##....####..#..#..#.##.#####..####..#........###
##########.......###.....#........##..###......####.##.#####..#....##.....##.###
##########...##..####.......##....#.........#######.....####..##.#####....##.###
##########...##..###.........#..###...........##........###....#..#####..##..###
###########..#.....#....##...#..#...#...##....###....#..##....##.######......###
##########...#.##..#..............##....#....####..#....####.##..####.....######
#........##..#.###.....................####..####....####.........####....######
#######..........#........###...##.....####.####...######...###..####....#######
#####....#.....#..........##....##.#....###.#####....####.#####..###..##...#####
####...#####...###...........#...#.......##.###.....#####...###......#####..####
####....###..#.###.......##.##.......##.#...######..######.######...######..####
#####....##.#................#......###.#.########..###....#####..#.######..####
###......##......##......#######...###..#..######...###..######..#....###..#####
############.##..##......#######...###.##..#####..#..#...######....#####..######
###########..##..............##..#........#####..##..##########....#####.#######
###########......#...........###....#.###..########...#########....####..#######
#############...##....###.....#..####...@.###########.#########.#######.########
#############..###....####......########..###########.########...#####....######
##############..#.....#####......#######..########....#########....######...####
##########.............#####....#########....#####..######################...###
##########...##..#.##...######..###########.######..########################.#.#
#########..####.#..#..#..####........####...#####..#########################...#
#######...####.......###...#########.####..######..#########################..##
#######.#####..#..##..####.#########.#####.######..########################....#
#######....##.###..#....##.########..#####..###...##########################...#
##########.##...#....##.....########.######..##.############################...#
##########..###.###.####..#..###############....###########################..###
##########.###..###.###........#############...###########################..####
##########......###.####..##################...###########################A#####
##########.#..#####.####..###################..#################################
##########.#..#####.#####..###################.#################################
##########..#.....#.####...#################...#################################
##########...####.#.##....#################..###################################
###########..###.....####.##############....####################################
##########..####...######..############..#######################################
##########.#####.#########.###########..########################################
##########..####.#########...###################################################
###############..########....###################################################
################....##....######################################################
#################..#############################################################
################################################################################
(Got lucky with a top-right corner that demonstrates both)
Field of view for:
log (reformatted for readability)
FOV @Point { x: 1, y: 1 }=Some(
{Point { x: 1, y: 1 },
Point { x: 6, y: 3 },
Point { x: 3, y: 2 },
Point { x: 5, y: 3 },
Point { x: 4, y: 1 },
Point { x: 2, y: 2 },
Point { x: 3, y: 1 },
Point { x: 8, y: 4 },
Point { x: 4, y: 2 },
Point { x: 8, y: 3 },
Point { x: 5, y: 2 },
Point { x: 6, y: 2 },
Point { x: 7, y: 3 },
Point { x: 2, y: 1 },
Point { x: 1, y: 2 },
Point { x: 7, y: 4 },
Point { x: 4, y: 3 },
Point { x: 7, y: 2 }
})