Sign in to follow this  

When A* [seemingly] isn't enough...

This topic is 3674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here's the problem. I have a 2D map in the form of a simple grid. I need to find the shortest distance from point A to point B. Seems easy so far... The problem is that movement is not restricted to 8 directions! It seems that this would be a common problem, and it also seems that the solution to this problem should start with the A* path. Can anyone give me a nudge in the right direction?

Share this post


Link to post
Share on other sites
Quote:
Original post by 020644
Units can move at any angle. Sorry if I'm being dense!


Not if your map is a 'simple grid'.

How about you explain, nice and explicitly how your map is structured...

Share this post


Link to post
Share on other sites
strtok's solution works.

Telastyn, while the game map is a stored as a simple grid of passable and non-passable tiles, units on the map can move in any direction and aren't constricted to moving "tile-to-tile".

Thank both of your for your help! :)

Share this post


Link to post
Share on other sites

This topic is 3674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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