AS3: Pathfinder in big mazes

Wednesday, October 26th, 2005

As I swear here is perfomance test results for pathfinding in bg mazes in AS2 and AS3 :) Results is not surprise :)

ActionScript
Path length AS2.0 AS3.0
~ 20 units 50 - 200 ms 5 - 11 ms
~ 60 units 1400 - 1600 ms 14-60 ms
~ 100 units 2000 - 2400 ms 30 - 100 ms

Here are examples:

Sources:

it’s 100 times faster, and when multiframing will be disabled, i think 100 units path finding will take 30 ms => just 100 time faster than AS2.0. The slowest part is just rendering! :).

I dont release source, beause it is not mine, but it was in some forum (do not know where), so I will ask Andre Michelle, if I can post them. So try to check it here for sources in few days.

Enjoy.

AddThis Feed Button

This is some text prior to the author information. You can change this text from the admin section of WP-Gravatar  I'm living in Bratislava, Slovakia. I'm Senior Flex, AIR Developer for my own company Flexets. Read more from this author


tagged under:

ABOUT THIS AUTHOR

I'm living in Bratislava, Slovakia. I'm Senior Flex, AIR Developer for my own company Flexets.

Get a Trackback link

3 Trackbacks/Pingbacks

  1. Pingback: AlDev Blog » Blog Archive » as2 vs as3 on October 27, 2005
  2. Pingback: Franto.com Flash blog » Collected links to ActionScript 3.0 examples on October 27, 2005
  3. Pingback: DeCabeza.net » Colección de link útiles sobre ActionScript 3 - desarrollo web, tutoriales, video tutoriales, videotutoriales, flash, photoshop, php, mysql, dreamweaver on June 27, 2008

6 Comments


  1. André Michelle
    Visit Site
    October 26th, 2005

    You are welcome. Share your code :)


  2. Administrator
    Visit Site
    October 26th, 2005

    Thanks Andre, I will add both source codes today.


  3. Dave
    Visit Site
    September 20th, 2007

    Is it me, or is there a lot of debug errors that pop up, and the code doesnt run.. for the Actionscript 3.0 source, the 2.0 source works fine.. but the 3.0 doesnt seem to work for me, is there anyone else having this problem? Thanks!


  4. Administrator
    Visit Site
    September 20th, 2007

    Dave, it was done in Alpha version of Flex Builder 2, and it is not compatible with final version :( so, that’s why errors are there. But I got fixed AS3.0 version, so I can share them


  5. Roberto
    Visit Site
    October 29th, 2007

    I have made some minor change to your source, now it compile under flash cs3 (the fla only embed the ap01.png). Now you can create the map from a png file. black pixel will be notwalkable white pixel yes. If now you ckick on an area not reachable the program let you know. I hope you like my changes.
    Do you think its possible to give node a weigth?


  6. Roberto
    Visit Site
    October 31st, 2007

    new version avaible at same url of previous post, I keep working on it to let user decide a 4 direction or a 8 direction search, next I will try to use weighted node and a version that find more linear (even if longer) path. I think it will be better to avoid character to continuesly change direction while moving in a free area…
    thank for you work I really appreciate it.

Live Preview

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This site is using OpenAvatar based on
Images is enhanced with WordPress Lightbox JS by Zeo
Clicky Web Analytics