A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Powerful Pathfinding FLA

  1. #1
    gskinner.com
    Join Date
    Feb 2002
    Location
    N.America
    Posts
    455

    Powerful Pathfinding FLA

    Greetings all.

    Just wanted to let everyone know that I have finally released my Pathfinding source code. I said I'd do so months ago, but this is a complete re-write, and is 2-3 times faster (about 0.3ms per step on the highest accuracy level on my 1.3ghz duron).

    It is available in the lab section of my new site:
    http://gskinner.com/

    From the Read Me:
    Description:
    The Pathfinder class was developed to be a flexible, happy medium for pathfinding in Flash. To that end, it is much more accurate than simple "move towards" algorithms, and vastly faster than A* (~1ms per step on highest level on 500mhz system). Also, it's speed scales in a linear fashion with the length of the path, rather than exponentially as with A*, and speed is unaffected by map size.

    It uses a ranked movement algorithm (move towards, move laterally, move away), paired with backtrack avoidance and looping detection. It also utilizes up to 4 different pathfinding approaches (forwards or reverse, favouring horizontal or vertical movement).

    It offers a fair amount of flexibility, with the ability to set the maximum path length, and to scale the number of different approaches the system will attempt. You can also change any parameter at any time, and re-run the pathfinding routine (which allows for characters changing direction at any time), etc.

    If you have any feedback, questions, or ideas, you can contact me through my site at http://gskinner.com/ .

    License:
    The Pathfinder class is free for use in non-commercial projects, all that I ask is that you fire me an email and let me know what you're using for, and what you think of it (hearing back from you makes developing and releasing code for free worthwhile). I would also really appreciate credit and/or a link back to my site at http://gskinner.com/ , if possible.

    If you would like to use it in commercial contracts, please contact me for license information. Often, it will be as simple and inexpensive as giving due credit.

    You may NOT sell the Pathfinding path as it is, in a modified format, or as part of a derivative work without prior written consent.

    The Pathfinding class is copyright 2002, Grant Skinner, all rights reserved.
    http://gskinner.com/ - Flash application development and source code
    http://gmodeler.com/ - free online uml diagramming and documentation tool

    Team Macromedia Voluteer for Flash.

  2. #2
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    great source zeroera,don´t have a lot of time to look at the code right now,jsut wanted to say this,besides that congrats on your page,very intuitive,slick design and functionality (these two don´t come together very often)

  3. #3
    Phantom Flasher... Markp.com's Avatar
    Join Date
    May 2000
    Posts
    16,034
    Yup cool site... v2 looks cool too... I did have a few problems with the path finder though... is there a limit to how far he can "see"?

    I found that the little man could only see about 15 or so squares in paths with more than a around 8 turns in them.

  4. #4
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    Indead - nice site and algorithem indead.

    Markp, like he explained, it's one of the settings you can set..

    | "Keep Flashing!"-Jeroen
    PHP multiplayer? Check this thread: PHPgateway

  5. #5
    gskinner.com
    Join Date
    Feb 2002
    Location
    N.America
    Posts
    455
    Thanks for all the great feedback! More cool source code coming - as time permits.

    Let me know what kind of success you have using it. I've actually already identified one small bug, which someone will notice the minute they try to animate a character along the path. Namely, the reverse path lookup fails to flip the path, so your character will walk from end to start.

    I will fix this (one line of code) and post back here when the new version is up.

    MarkP - I think you were looking at the old version - the shortcut on my site still linked to it (fixed). The old version had a little zelda character, the new version traces the path with an orange line.

    Cheers,
    Grant.
    http://gskinner.com/ - Flash application development and source code
    http://gmodeler.com/ - free online uml diagramming and documentation tool

    Team Macromedia Voluteer for Flash.

  6. #6
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    Just increase the depth limit!

  7. #7
    gskinner.com
    Join Date
    Feb 2002
    Location
    N.America
    Posts
    455
    Posted a new version with the reverse lookup bug fixed.

    You'll know it's the new version if it draws circles on the path, fading in from start to end. You might have to clear your cache to view it.

    Cheers,
    Grant.
    http://gskinner.com/ - Flash application development and source code
    http://gmodeler.com/ - free online uml diagramming and documentation tool

    Team Macromedia Voluteer for Flash.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center