Jump to content
  • Advertisement

Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65884

Pathing done

Sign in to follow this  
H_o_p_s

113 views

First of all you have to know that I had two different versions of path finding methods. The problem I found (after a couple of hours of searching) was that I was referencing THE WRONG DANG METHOD!!! I hate it when I do that. And you'll like this:

OLD METHOD: public void pathFind(Actor a, int x, int y)
NEW METHOD: public void PathFind(Actor a, int x, int y)

So it was all the difference between ONE LETTER!

Anyway.... arg.
Sign in to follow this  


3 Comments


Recommended Comments

Well, if you've got exchangeable algorithms for the pathfinding you should consider using the Strategy design pattern. Apart from that having a method name start with an uppercase letter isn't the code style. May I recommend calling that method 'findPath'?

Share this comment


Link to comment

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
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!