Implementing field of view on a hexagonal grid

1 year ago
17

This is a continuation of map visibility that was started in the video on fog of war:
https://rumble.com/v3xrzvn-a-simple-implementation-of-fog-of-war-on-a-turn-based-grid.html

Insights on how to implement the field of view algorithm were taken from here:
https://forums.roguetemple.com/index.php?topic=3675.0

How to determine whether two circle sectors overlap:
https://stackoverflow.com/questions/11775473/check-if-two-segments-on-the-same-circle-overlap-intersect

How to merge overlapping circle sectors:
https://stackoverflow.com/questions/23618704/merge-all-overlapping-sectors-on-the-same-circle

I adapted the above merge algorithm to do intersections, which turned out to be similar to this solution that I found afterwards:
https://stackoverflow.com/questions/9800829/intersection-between-two-arcs-arc-distance-between-pair-of-angles

Commit: implement field of view on the adventure map (2023-11-29 23:12:54)

Loading comments...