Sign in to follow this  
Tyler_911

[ADVANCED] How to make zombies move to user

Recommended Posts

http://img5.imageshack.us/img5/751/picspj.jpg The textboxes are were the zombies spawn and it's supposed to make them go around the maze all the way to the guy. Or multiple guys it's going to be an 8 man game with bullets ammo and stuff. Like CoD 5 Zombies. If someone could tell me an idea on how i can make this happen for the zombie to go up and down and right and left around the maze to actually get to the guy.

Share this post


Link to post
Share on other sites
Dijkstra's algorithm might be useful in this case. You represent your map as a graph with nodes and edges. Each corner could be a node. Each edge stores the distance to the next node. Dijkstra's algorithm can then be used to calculate the shortest path from node v to w. Choose v to be the zombie location, and w to be the player location

Share this post


Link to post
Share on other sites
As long as no one's replied to them, you should be able to delete your duplicate threads using the 'edit' button in the upper-right.

Share this post


Link to post
Share on other sites
One thing is for sure, you arent going to have much luck with command buttons.

I recommend you look into tile mapping instead. That way, you have a regular grid and you can apply Dijkstra or a* on the grid.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this