dcsimg
A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: AS3 challenge

  1. #1
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    916

    AS3 challenge

    I have just found this GIF on the net, and I thought it could be fun to code maze solver for it.

    Obvious problem is image size. Don't even think of brute-force recursion! You have to code pretty tight solver to solve this in reasonable time, I guess.

    So, any takers? Just to have a competition spirit here, the first one to post solution + code wins a cookie!
    Last edited by realMakc; 08-21-2009 at 07:06 AM.
    who is this? a word of friendly advice: FFS stop using AS2

  2. #2
    kevin_smithers's Avatar
    Join Date
    Apr 2004
    Location
    Swindon, UK
    Posts
    375
    I just printed it out onto 12 bits of paper and gave it to my 6 year old niece (told her I would give her 1 if she done it by the end of the week) will probably be quicker than writing a script to solve it

  3. #3
    Official Vermont Photo Mod WannaBe_80z's Avatar
    Join Date
    May 2001
    Location
    over my shoes and under my hat
    Posts
    3,887
    Holy ****.
    "Let us declare nature to be legitimate. All plants should be declared legal, and all animals for that matter. The notion of illegal plants and animals is obnoxious and ridiculous."- T. McKenna

  4. #4
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    You'd think they'd at least mark the beginning and end with something! I can't find either at first glance.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  5. #5
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    916
    they both are on 1st scanline, marked with white pixels
    who is this? a word of friendly advice: FFS stop using AS2

  6. #6
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    It's not terribly fast, but it does the job and looks pretty cool while it's working. PM me if you want the source...if there's sufficient interest I'll clean it up, throw in some comments and post it.

  7. #7
    OGC creativeinsomnia's Avatar
    Join Date
    Apr 2001
    Location
    mn
    Posts
    658
    Pretty slick neznein9. How many hours did that take you to create?

  8. #8
    He has risen! lefteyewilly's Avatar
    Join Date
    Mar 2001
    Posts
    2,597
    wow. i almost dumped this thread thinking no one would ever respond and here you are proving me wrong in quite an amazing way.

    nice job.

  9. #9
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Thanks. I wasted a long time on the A* engine about a year ago...repurposing it only took a couple hours to rework the parser to accept the image instead of a custom-defined grid.

  10. #10
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    916
    Damn, man you need to upgrade. On my machine this took only 423.26 seconds. Somehow the most hardcore things are programmed on low-end PCs, just take a look at demo compos.

    Well, you can now have a cookie If I had a hat I would take it off for you.
    who is this? a word of friendly advice: FFS stop using AS2

  11. #11
    Mourning Morning. groupof1's Avatar
    Join Date
    Feb 2008
    Location
    Middle of somewhere
    Posts
    194
    It is like watching water flow. Seeping into all the crevices until it's saturated.

    That is some serious coding. Being more on the artist side of design, actionscript and other programming is hard for me to wrap my head around.
    I get the general idea, but coding can get real complicated real quick.

    Does anyone have any recommendations on books or resources that are easy to follow but rich with content?
    What the world needs now is a nice hot bath.
    _________________________________________________
    Battles: Silverx2

  12. #12
    Official Vermont Photo Mod WannaBe_80z's Avatar
    Join Date
    May 2001
    Location
    over my shoes and under my hat
    Posts
    3,887
    That was very impressive. I liked the visual aspect of it and not just some blinking text saying "thinking" or something.

    A+
    "Let us declare nature to be legitimate. All plants should be declared legal, and all animals for that matter. The notion of illegal plants and animals is obnoxious and ridiculous."- T. McKenna

  13. #13
    Programmer
    Join Date
    Aug 2007
    Posts
    173
    WOW .....lol i didnt know flash could do that LMAO

    thats insane...nice work

  14. #14
    Hihi
    Join Date
    Nov 2008
    Posts
    9
    Wow... That was awesome. I wonder how fast this will work when I floodfill in paint. This almost crashed on me like 3 times and I had to wait like 7 mins at one point, but I knew the computer would pull through.

    1727.501 seconds is how long it took my computer according to the thing...

  15. #15
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    I forgot people were still seeing this thread...I posted a better version that runs in about four thousandths of the time it took my first version. Here's the full thread.

  16. #16
    Official Vermont Photo Mod WannaBe_80z's Avatar
    Join Date
    May 2001
    Location
    over my shoes and under my hat
    Posts
    3,887
    Wow that solved it instantly.
    "Let us declare nature to be legitimate. All plants should be declared legal, and all animals for that matter. The notion of illegal plants and animals is obnoxious and ridiculous."- T. McKenna

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