Efficient line of sight algorithm I want to implement a line of sight feature for my game's enemies to detect the player. For example, an enemy will detect the player if there are no obstacles on the line that connects the enemy and the player, and will not detect the player if there are.

I'm struggling to find an efficient approach for this feature - any ideas?