I am developing a stealth game. In the game when enemy sees player he starts chasing it. But there are a lot of covers. If player just goes behind of a wall it will be out of sight for this enemy. But I want my enemies little bit more realistic.
So i did do some further implementations... For example if player goes out of sight enemy remembers last seen position and goes there anyway.
Than i save the move direction of player on the position where he was last seen. So when enemy goes there he looks this direction which he may probably catch a glimps of the player and start chasing again.
But if player is still no where to be seen I want my enemy to look around little bit, search for the player maybe. I couldnt come up with an algorithm to do that.
Also if on the last seen position and last move direction there is another wall, enemy goes this position and looks stupidly to the wall which also dont seem realistic at all...
Does anybody have any suggestions?