and keep the movement in 4 directions only like in this capx:
https://dl.dropboxusercontent.com/u/55828593/AI.capx
I've found some way with adding 8 direction movement to them and solid to walls, but it's jerky and make them move in diagonals.
Hi balsh,
I made an example that seems to work.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
But I had trouble that an enemy stuck on another enemy after some amount of time. The same effect did I had with the solid behavior.
So the enemies now hold a distance from 2 pixels if they collide. Fewer and they will stuck. It is possible that if your game get choppy they will stuck on each other again. Then you have increase the distance.
Develop games in your browser. Powerful, performant & highly capable.
Thank you it's better than what I had but still not perfect sadly. If three of them overlaps one will still be pushed in diagonal it seems, and even will go through walls some times.
I'm bumping this cause I still can't figure it out.