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

NotMao

  • Posts: 36
Hey Jihem,

I really appreciate your awesome A* extension. Was wondering if you are going to update the extension for OpenFL Stencyl or is it just not working for me?

AnemoneLabSNC

  • Posts: 63
Hi NotMao,

to patch the extension for Haxe 3.0, just go to stencyl directory, then enter in plaf\haxe\extensions\decision-making\ and open DecisionMaking.hx

Replace all
Hash<Float>
with
Map<String,Float>

and it should work.

I have used http://haxe.org/manual/haxe3/migration#hash-and-inthash-removal 
to guide me in the process.

I hope this help you.
Simone
Anemone Lab S.N.C.
Follow the development of our new game "Scintilla" on facebook!
Watch the teaser trailer on youtube or visit the game website!

FortySe7en

  • Posts: 304
Can anyone please attach an updated extention in here once tested?

NotMao

  • Posts: 36
Hi NotMao,

to patch the extension for Haxe 3.0, just go to stencyl directory, then enter in plaf\haxe\extensions\decision-making\ and open DecisionMaking.hx

Replace all
Hash<Float>
with
Map<String,Float>

and it should work.

I have used http://haxe.org/manual/haxe3/migration#hash-and-inthash-removal 
to guide me in the process.

I hope this help you.

I was in the process of trying to figure that out and didn't know I needed to put the "String," there. After replacing all the Hash<Float> it worked perfectly.

Thanks AnemoneLabSNC!!!

bonzero

  • *
  • Posts: 488
it works great! I was getting worried about losing the most valuable extension to date :)

Kazetoon

  • *
  • Posts: 556
Is this still working? I tried running the game dm-astar-1 but I get the error
Events for 'Bot' (122) -  Missing ;

I did the required changes for it to work on OpenFl.
Little Drop - Try it out!
     
iphone/ipad Android
Newgrounds Stencyl Arcade Kongregate
Developer Website

Leaufai

  • Posts: 327
I'm running into the same problem as Kazetoon. Anyone know how to get this to work for 3.1/3.2?

rob1221

  • *
  • Posts: 9448
It's working fine for me after making the Hash to Map change.  Did you try Run > Clean Project?

Kazetoon

  • *
  • Posts: 556
I'll try again, I probably messed up if it's working for you. Are the dm-astar demos supposed to work right of the bat or do I have to modify them in a way?
Little Drop - Try it out!
     
iphone/ipad Android
Newgrounds Stencyl Arcade Kongregate
Developer Website

rob1221

  • *
  • Posts: 9448
I tested the one attached on page 5 and it works after cleaning the project.

Kazetoon

  • *
  • Posts: 556
Alright, got it to work, probably had to do with the fact that I used the version from the first post.
Little Drop - Try it out!
     
iphone/ipad Android
Newgrounds Stencyl Arcade Kongregate
Developer Website

rob1221

  • *
  • Posts: 9448
I'll update the first post with the working files since the original creator has abandoned the extension.

Kazetoon

  • *
  • Posts: 556
I tried using the demo and noticed that the bot cuts diagonally over tiles. I want to enable diagonal movement but would like if the bot couldn't cut over ties. Is it possible to modify the extension so that the actor doesn't overlap tiles?
Little Drop - Try it out!
     
iphone/ipad Android
Newgrounds Stencyl Arcade Kongregate
Developer Website

rob1221

  • *
  • Posts: 9448
I'm sure it's possible, but I don't know how.  The code is confusing and has no comments.

Kazetoon

  • *
  • Posts: 556
Darn it, still a pretty cool extension.
Little Drop - Try it out!
     
iphone/ipad Android
Newgrounds Stencyl Arcade Kongregate
Developer Website