A* as a Stencyl extension (with basic sample) [ABANDONED]

jihem

  • *
  • Posts: 161
Hi,
Sorry, I just see your messages. I was working on another subjects and I didn't take the time to have a look on this topic. When using diagonals, the allowed path includes all the tiles around the actor. I will add a new computing mode using the diagonals if at less one tile is free near the targeted tile. This will solve the issue described by bonzero. I will post another message here when this update is ready (maybe in the next week). I'm very happy to see that the extension is useful. You give me the strength to add new methods and to continue.
Regards,
jihem
while (!success=retry());

bonzero

  • Posts: 488
it's great to hear from you jihem, I tried other extensions-behaviours but your solution works the best! good performance, easy to use, I'm also very excited about the collaborative a*path, I would love to put that in a game

At the moment I'm using physics to make the path "collaborative" to avoid actors overlapping but it would make a lot more of sense to use your solution, I wouldn't mind to donate if that helps

Looking forward to seeing more of your great work with stencyl! thanks again



GregAnims

  • Posts: 305
YES, thanks a lot, this will be so helpful - i'll definitely check it out!

sandsoftimer

  • Posts: 316
wow.... i will wait.
iOS ->          

Android ->
iOS -> Bubble Tapping
 Android -> Bubble Tapping

datbird

  • Posts: 40
Wow great to hear from you jihem! Glad you're still around and working on this because it is a very good extension! In addition to the diagnal issue have you observed the issue of it not always presenting the most effecient/fastest path? I can post a video example of this in action if needed.

jihem

  • *
  • Posts: 161
I made the update. Now testing... I will rebuild the samples and the extension.

Updated files :

DecisionMaking.hx
> public function get(x:Int,y:Int):String
> public function to(x:Int,y:Int,dg:Int=0):AStar

Blocks.xml

« Last Edit: July 23, 2013, 12:59:09 pm by jihem »
while (!success=retry());

datbird

  • Posts: 40
Sweet, thanks so much jihem, really appreciate all your hard work!

jihem

  • *
  • Posts: 161
Thanks. I have to manage my time between the job I have to do and the things I like to do... Sorry for the delay :-/
while (!success=retry());

jihem

  • *
  • Posts: 161
I have updated the extension and one sample (#1). Let me know if it works for you.
I will check all samples and update on github soon.
Regards
while (!success=retry());

datbird

  • Posts: 40
Sorry I've been really tied up with work/life but will be getting back to it soon and let you know! Thanks again, great work and you're awesome! :)

vikingpotato

  • Posts: 852
I have updated the extension and one sample (#1). Let me know if it works for you.
I will check all samples and update on github soon.
Regards

Tried to run, got errors. Is it not meant for 3.0 or i am missing something

bonzero

  • Posts: 488
It works great for me!!  :o :D :D :D 8) the new diagonals with edge work as expected, the only thing I'm not sure how to use it is the cooperative path, and I also wonder what's more CPU efficient, to add a collaborative path or avoid actors overlapping with box 2d...

If somebody can't make it work, just import the test game with stencyl 3, open and compile on flash (fastest way to check I think), once you observe how the sample works, you know how to use the code or modify things...

a million thanks to jihem, one of the most important extensions to date if not the most

bonzero

  • Posts: 488
Spoke too soon, there are spots where the enemies get blocked like not being able to solve the path and the frame rate falls considerably
It happens with and without diagonal

jihem

  • *
  • Posts: 161
I haven't checked cooperative path. You have to open/save each event (with a custom block) after upgrade (or Stencyl won't compile). Stay tuned... works in progress...
while (!success=retry());

bonzero

  • Posts: 488
Hi Jihem

Did you manage to see if there are spots where the followers get frozen and the frame rate drops?

I will check again later about that