this is probably going to be pretty hard. I have this:
where enemies can move whatever way they want (360). What I have is that if distance between player and enemy is smaller then 400 than enemy starts to move in player's direction.
The problem is that there is wall and enemy goes straight to the wall of course and get stuck there :). I need to make it smarter to beeing able to walk around the wall smoothly. Whats the best way for this?
If I had only 4 way movement (up,down,left,right) then I know how I would probably do that. I could have variable which would store direction of enemy moving. Then from that I would be able to know from what direction enemy hit the wall and I could send it down for example or up whatever. Or I could have home some invisible direction sprites. But I feel in this case there must be something better.
What do you think?