i need to check if NPCs on my tilemap can see each other.
my problem is that the built in line of sight behaviour is way to cpu consuming for my project.
here is how i did it, make a second tilemap with all the sight blocking obstacles, make this tilemap solid, then use LOS behaviour and bam this game isnt build for running on mobiles :/
i think the los bevaiour is way to powerfull for my needs and im pretty sure there are many many algorithms that do that more efficiently (bresenham, raycasting) and when i read about it, it seemed so easy but im to dumb to understand any of them to do them in construct2. My floodfill approach did either too much or to less, i dont get how to check if the tile isnt just empty but also seeable from the position, so yeah, i did understand the raycasting approach but not how to build it.
My dream would be that i overlooked an plugin where i just specify the range of sight in tiles, blocking obstacles and then use it
can anybody help me? im not a native speaker so its possible i overlooked some good tutorials, the main problem in finding information was to me that there where so many and most of them where with complicted code that i didnt understand.