Things have been moving slowly so I haven’t achieved much recently so here’s a small demonstration to show crude implementation of shader-based line of sight / fog of war and x-ray effect when behind other objects.
Backtop belong to the “upper floor” so it will only lit up if the character is on the same floor. I will improve the algorithm so that stuff that can be seen from the lower floor like trees should be lit.
Stress test 162 NPCs (can go higher if I zoom-in to avoid overdrawn) with their own light source, line of sight, x-ray, collision detection, and basic AI movement.
In the actual game there will be a maximum of 100 NPCs per map. So this is just to make sure I can still hit 60 FPS on this decade-old laptop when more features are added.