Hi there
I've found a lot of great articles here and on the web around FPS style games and using the 'cameras' frustum to calculate if something is visible or not.
What my issue is:
Camera is largely irrelevant as i have a math/server side question: given player 1 is at 0,0,0, and player 2 is at 0,1,1 there are no obstacles - given each player has a frustum facing each other - they 'can see' each other (two people looking at each other on a flat surface).
If i introduce obstacles and alter angles - say now P1 can see P2 but P2 cannot see in return - either due to occlusion / blocking by another 3d world object - or for other reasons (angles/etc).
I cannot wrap my head around how i can do these calculations server side with math only - my game has a core mechanic riding on it - but i'm not even sure how to begin researching as most topics seem to worry about culling for the purposes of frame rates etc.
Essentially (and assume this is true): i need server side to know geometries, positions and fields of view; it should then be able to say 'can p1 see p2?', 'can p2 see p1?' - ideally just using the underlying math - something i'm struggling to get when i look at the likes of a unity thread; https://answers.unity.com/questions/8003/how-can-i-know-if-a-gameobject-is-seen-by-a-partic.html
For the record i'm using nodeJS server side (for now); and front end is JS/canvas - i don't mind too much about implementation; if someone has any idea what math i should research or begin looking for it'd be a massive help
thank you, fellow gavedevs