ok… so im trying to make a top-view maze game wherein the character needs to get from one side of the maze to the other… there will be enemies roaming around and if they “see” the player, they will run towards him… (a bit like pacman)
my idea for the AI for this is… let the AI get the location (x, y) of the player. the AI will then cast an invisible beam to the direction of the player. if the beam is not interrupted, that means that the AI can now run towards the player. if the beam is interrupted, that means that there is a wall in front of the AI and the AI cannot / should not move forward…
will this idea work? i need some help in implementing it…