I am working on a simple tile-based multiplayer game. I am rather experienced programmer, but not so experienced game developer.
The players will see each other depending if there is a blocking object between them or not. The objects can be moved around, so the map is not static.
If A moves (or performs other action) and B sees that (LOS is not blocked) then B client will be notified and will update it's view. If B does not see A, then B will not be notified.
- Should I notify client A about B's movement regardless of LOS, perform all the LOS checking on the client-side and update the view accordingly, or...
- should I do all the LOS server-side and notify client A only in case of visible movement?
I know than, in principle, I should not trust client-side and not send anything to the client that is not necessary (client code can be hacked and show movement out of LOS). But, if there is a significant number of players at once, then I am afraid than the server will not cope with tracking all LOS for all the events and all the players.
How to cope with this problem? Is there some "standard" solution here? I know that it might be a premature optimization (I don't have this problem yet), but protocol and map data structure will depend on that.
The client and the server will be open source, so hacking the client will be easy