You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates a simple diagonal line near the player's starting point that SHOULD be solid in some scenarios, or at least, have the option for the user to make them solid and non-transparent.
Simplest fix: make Calculate methods in `FOV virtual to allow for custom implementations.
The text was updated successfully, but these errors were encountered:
Chris3606
changed the title
FOV can see through diagonal walls in all radius types.
Add FOV Implemenations/Options which Consider 1-Thik Diagonal Walls Opaque
May 28, 2022
Chris3606
changed the title
Add FOV Implemenations/Options which Consider 1-Thik Diagonal Walls Opaque
Add FOV Implementations/Options which Consider 1-Thik Diagonal Walls Opaque
May 28, 2022
Chris3606
changed the title
Add FOV Implementations/Options which Consider 1-Thik Diagonal Walls Opaque
Add FOV Implementations/Options which Consider 1-Thick Diagonal Walls Opaque
May 28, 2022
To clarify; this is not a "bug" in FOV's shadowcasting implementation so much as it's simply a feature which isn't implemented in GoRogue's implementation of that algorithm. It is, however, a valid use case that the library should have some built-in support for.
It is currently possible for a user to fix this on their own for a given use case; the GoRogue FOV system is now built around the IFOV interface, which provides an abstraction sufficient for a user to solve this by creating/implementing their own FOV algorithm which handles diagonal walls in this way.
Further, it is possible for the library to provide some FOV implementation or option that does this; it's just not implemented currently.
There are methods implementing checks into shadowcasting to solve this; so that's one option; we just need to make sure that if we do this, it doesn't affect performance of the overall algorithm. So there are basically 2 options; we can do 1 or both of these:
Modify the current recursive shadowcasting implementations to have an option which considers 1-thick diagonal walls opaque.
Create additional FOV algorithm implementations, such that some of which consider 1-thick diagonal walls opaque.
FOV calculations can see through diagonal walls that have a thickness of 1.
To see what I mean, use TheSadRogue.Integration, and add the following lines to
Program.cs
after line 70:This creates a simple diagonal line near the player's starting point that SHOULD be solid in some scenarios, or at least, have the option for the user to make them solid and non-transparent.
Simplest fix: make
Calculate
methods in `FOV virtual to allow for custom implementations.The text was updated successfully, but these errors were encountered: