How would you make the "bots" walk in the "pathways", ex, between the collision tiles in random directions? Just like the player would be able to walk.
And once they are close to you they should walk towards you, the player?
1 decade ago
by Jerczu
Check this out -
http://nervman.cdgn.co.uk - done by me with impactJS
And now to be more precise - you need to use a pathfinding algorithms -
http://www.policyalmanac.org/games/aStarTutorial.htm the most popular is the A* and this is the one I used in the game.
Just to make your job easier here's the impactJS plugin with A* algorithm all you need to do is to write a function that will read the resulting nodes and move your entity towards it. -
https://gist.github.com/827899
and here's the thread -
http://impactjs.com/forums/code/a-path-finder where you will find my approach to moveTowardsDestination function.
Hope it helps.
Thanks for the reply! Im reading through that now, Ill let you know if I get it working!
Nice game btw! Really nicely done
1 decade ago
by Jerczu
Thanks... Check the thread I posted you will find info how to make it work
Page 1 of 1
« first
« previous
next ›
last »