   How to Implement Field of View? (C#)
  I have a bi-dimensional array that's my map. There are enemies scattered around and the player character somewhere in it. They all (enemies and player) belong to the same class which has a FacingDirection enumeration which can be N, NW, W, S, SW, S, SE, E, NE.How could I build a function that would allow me to "see" (determine which elements of the bi-dimensional array should be printed or not) according to my position, facing direction and field of view angle?I'm having the impression it's a matter of summing up two linear functions, but it's been long since I was good at math.Can somebody help me?   
  Since the field of view basically is a triangle you could calculate the view frustum/triangle and do a point in triangle intersection test.   ;  I did this a long time ago using a bitmap grid for small range 2D maps (where the bit indicates if a tile in a NxN   (2R+1 X 2R+1)  window around the player is to be drawn (and a different bitmap for each facing).   Its static data built to match the desired boresite.More recently for 3D, I did a offset list with each of 32 facings (where each node of the list was a +/- offset from the player XYT position).  This list was used to determine which zones of a 3D world made of regular grid of square terrain heightmap meshes would go thru the render engine  (and culled those  'zones'  that wouldnt be seen from that facings boresite).  That windowwas a 15x15 zones  (center with 7 zones out from the one the player was in).On top of that I also had a LOD value that controlled what in the zone would be drawn  (smaller objects not drawn in outer ranges or terrain mesh simplification...)