Hello,
I'm working on tile based line-of-sight, in my case there is Unknown tiles, Out-of-sight tiles (OOS tiles) and shadow tiles.
They work in way that is hard to explain, so here is example:
Now it works and looks good, but issue is performance.
The way I implemented line of sight related to walls, seems to really choke performance.
For example, OOS tiles, I hide them if you have line of sight to it. Of course, issue is that if wall (sight blocker) and that OOS tile are in same tile then player will never have sight to that.
So I made
player has LOS on wall
Wall is overlapping a OOS tile
Then > hide OOS tile
Map size (more OOS tiles) doesn't really impact performance but as I add more walls performance start to fall. I assume there's something with that "Wall is overlapping a OOS tile" that causes issues...
Any suggestions how I make that detection properly?