# Need some help here for my game

**URL:** <https://forum.kirupa.com/t/need-some-help-here-for-my-game/298076>\
**Category:** programming\
**Created:** [October 13, 2009, 12:49pm UTC](https://forum.kirupa.com/t/need-some-help-here-for-my-game/298076 "2009-10-13T12:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![birdkingz](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@birdkingz](https://forum.kirupa.com/u/birdkingz)\
**Post date:** [October 13, 2009, 12:49pm UTC](https://forum.kirupa.com/t/need-some-help-here-for-my-game/298076/1 "2009-10-13T12:49:46Z")

</div>

Hello guys, recently I’m developing a flash game…  
it is an action shooting game but in tile based form…  
the view i have used is top-down view… which u only see the head of the characters.

Ok, now my problem is… I would like to make some enemies chasing my hero…  
How am I suppose to implement that? and I will have some block tile too… I’m able to implement some simple chasing algorithms…

example :

/\*  
if (enemy.x \> hero.x)  
enemy.x –  
else if(enemy.x \< hero.x)  
enemy.x ++  
\*/  
//this apply to y-axis too

and I’ve added some collision detection within block and enemy… I’m able to do that but the problem is, after the enemy detected the front tile is unmovable, then the enemy just stuck at there… i dunno how to make the enemy try to find another path towards the hero T\_T…

Is there any other methods I can use for this case?
