playMaker

Author Topic: A* pathfinding (stable 0v841)  (Read 226752 times)

Sly

  • Full Member
  • ***
  • Posts: 123
Re: A* pathfinding (stable 0v841)
« Reply #315 on: January 24, 2014, 03:58:30 PM »
Hello,

I try to install this but I've got an error in the CMD prompt: NameError: name 'Y' is not defined
Code: [Select]
Playmaker exists in the project
Aron's Astar package is not installed. Would you like to install the free version?
Y/N
YN
invalid Input
Y/N
YN
invalid Input
Y/N
Y
Traceback (most recent call last):
  File "C:\Users\DansTonUc\Documents\Test4000\Assets\AstarPlayMakerInstaller\Setup.py", line 76, in <module>
    aronInstalled = YN()
  File "C:\Users\DansTonUc\Documents\Test4000\Assets\AstarPlayMakerInstaller\Setup.py", line 19, in YN
    free = YN()
  File "C:\Users\DansTonUc\Documents\Test4000\Assets\AstarPlayMakerInstaller\Setup.py", line 19, in YN
    free = YN()
  File "C:\Users\DansTonUc\Documents\Test4000\Assets\AstarPlayMakerInstaller\Setup.py", line 10, in YN
    inp = input()
  File "<string>", line 1, in <module>
NameError: name 'Y' is not defined

What am I supposed to do to fixe that?

Note: Python version is 3.0 - I'm doing this on Windows 7, using python v x86 I guess
« Last Edit: September 07, 2014, 11:47:25 AM by Sly »

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: A* pathfinding (stable 0v841)
« Reply #316 on: January 24, 2014, 04:54:22 PM »
Cant advise on that verison, I know when I have had to work with python stuff before I have had to use the versions before 3, then stuff tends to work. So give that a try...

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: A* pathfinding (stable 0v841)
« Reply #317 on: January 24, 2014, 05:09:37 PM »
Any update on when the 100% clear working version for the newest A* will come online?

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: A* pathfinding (stable 0v841)
« Reply #318 on: January 24, 2014, 05:43:00 PM »
Still awaiting on input from the creator of the original actions, or the guy who makes the pathfinding lib to take a look. I have notified them on Github of the requests to get this done but they seem to be away or something at the moment so cannot give a timeline.

I have bumped the thread in Github again just to make sure they are notified of it.
« Last Edit: January 25, 2014, 06:01:45 AM by Grofit »

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: A* pathfinding (stable 0v841)
« Reply #319 on: January 26, 2014, 08:36:06 AM »
The owner of this project said he will be unable to do any work for about 2 months because of some other work he has on, so if anyone knows this library well enough feel free to help out on the outstanding issues on github, also the library still needs some form of testing (for previous version as well as the latest one when tis done)

muppetpuppet

  • Junior Playmaker
  • **
  • Posts: 77
Re: A* pathfinding (stable 0v841)
« Reply #320 on: January 26, 2014, 04:34:02 PM »
Such a shame kiriri is busy.  I've still having one singular issue with the old version. 

Groffit, perhaps you could spare a thought on my issue. 

I'm pooling my AI units.  so once they've died, i'm de-activating them and placing them in a pool for future use..

However If I re-activate the game-object  no matter what I do, it still tries to follow some perverted remnat of his last known path. 

either I reset the script, and the unit,will teleport to his last known location and proceed from there.  If i don't reset the unit will spawn at his correct new location but start to move not to his new target, but to his old target. (or a node with similar ID in the new graph, guessing here)..

Well I've tried every possible work around, including recycling his last path. But this feature in the recycle path code seems not-working. 

Also in the moveto code I find a comment in the move() this one: // previous path is not cleared on reload. That's why it's finishing and why there's no error !!!!!!
it seems kiriri was working this and it's either not working, or not usable with re-activating obejcts (that's how I read it)

So now i'm completely stumped.  I can't find a work around, that doesn't cause some other issue.. and I'm stuck with units occasionaly going completely awol on spawn.   

Well, what could help is just a boolean in the moveto I could set on spawn, that completely wipes the current moveto state and paths..  is something like that possible?   how would i go about this..

It could be that the new version solves this, but like you advice its unwise to try.

So if you could help, it would be super super super appreciated.  honestly I'd be willing to pay. anything to get my game back on track.

Cheers
tomas

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: A* pathfinding (stable 0v841)
« Reply #321 on: January 26, 2014, 04:44:23 PM »
I have similar problems, only reason I was helping out was because I wanted to use this plugin on my project but the installer borked my A* plugin so the C# re-write was so I could use it in my game, but even with the C# re-write it still feels a bit off. Like I tell a game object to MoveTo another one with a given grid and it just wanders off in the opposite direction, which seems completely wrong.

I wish I could help but I know nothing about the A* library, I just know how to refactor code so I just re-jigged and optimised sections, as far as the actual context of the code in the plugin, I have little idea... I will go take a quick look just incase I can see anything which would fix your problem but it would only be done on the git version of this library not the installer version.

muppetpuppet

  • Junior Playmaker
  • **
  • Posts: 77
Re: A* pathfinding (stable 0v841)
« Reply #322 on: January 26, 2014, 04:52:53 PM »
I feared as much,  if you find anything that would be great. I'd happily switch to the github version if i'd fix something.. ;)  cuz at the moment, it's either ditch it or go without pooling, which is a very bad idea on mobile..

thanks anyway

muppetpuppet

  • Junior Playmaker
  • **
  • Posts: 77
Re: A* pathfinding (stable 0v841)
« Reply #323 on: February 05, 2014, 08:35:11 AM »
I had some feedback from arnon..  And he's said that you should never call path.reset.   

but rather set the path to null and call path.release()..

He also stated that somewhere in the moveto or follow() code there should already be a release() to handle pooling.  This is not the case as far as I can see.

I've also had a look at the void reset()  and there kirikire only sets the OutputPath to null.  So i've added a path=null to the reset to see if that fixes it. 

as I assume the outputpath is not the internal actual path but just an output.  And I'm assuming that the void reset is also called on deactivate gameobject .   
At least I'm assumig this is what the reset() does in all the playmaker code does.  Or it only resets the editor, in which case it doesn't change a thing.,

well just an update. i'll let you know what happens..

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: A* pathfinding (stable 0v841)
« Reply #324 on: February 06, 2014, 05:39:34 AM »
yeah good to know, If reset should not ever be called it should be marked as such as to me reset makes more sense than release as you just want to blank the path, but if anyone knows what you should do it would be Arron.

Skermunkel

  • Playmaker Newbie
  • *
  • Posts: 36
Re: A* pathfinding (stable 0v841)
« Reply #325 on: March 06, 2014, 03:18:51 PM »
Hi,

I seem to be getting a bunch of compiler errors when importing Astar Pro 3.4.0.5 stating that a bunch of parameters are being defined multiple times. Once I install the Playmaker actions it reduces the errors to 2:

Assets/Plugins/AstarPathfindingProject/Core/Nodes/GraphNode.cs(20,22): error CS0101: The namespace `Pathfinding' already contains a definition for `Node'

Assets/Plugins/AstarPathfindingProject/Generators/NodeClasses/MeshNode.cs(6,22): error CS0101: The namespace `Pathfinding' already contains a definition for `MeshNode'

Is there something that I might be doing wrong?

Skermunkel

  • Playmaker Newbie
  • *
  • Posts: 36
Re: A* pathfinding (stable 0v841)
« Reply #326 on: March 06, 2014, 03:27:08 PM »
Nevermind, I fixed it, I just rei-mported everything and it seems to be fine now.

Skermunkel

  • Playmaker Newbie
  • *
  • Posts: 36
Re: A* pathfinding (stable 0v841)
« Reply #327 on: March 06, 2014, 04:30:24 PM »
Scratch that I still seem to be getting the same errors. :-\

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: A* pathfinding (stable 0v841)
« Reply #328 on: March 06, 2014, 04:50:46 PM »
Thank you Grofit for all your wonderful work!

I'm sorry to keep you guys waiting. I feel bad for it, but I'm still in my exam phase for about a month. I do not know if I can get back to this any sooner. I may be able to go over the more tricky bugs over the next days though. If it's not too much, that is.

Cheers,
Sven

EDIT: (reading backwards here) Yes, there is no pooling integrated. I had problems with memory leaks the last time I tried to integrate it. But that was a long time ago and I'm not sure I did it correctly :D

@ Skibbejak
your errors most likely indicate that you have some scripts twice. Do you perhaps have both the js and cs version installed at the same time?
« Last Edit: March 06, 2014, 05:02:57 PM by kiriri »
Best,
Sven

Skermunkel

  • Playmaker Newbie
  • *
  • Posts: 36
Re: A* pathfinding (stable 0v841)
« Reply #329 on: March 07, 2014, 05:32:55 AM »
Where can I find the js versions and delete them? As that is most likely the case, I will probably only be using the c# version.

I searched for GraphNode.js and MeshNode.js but I could only find the c# versions.
« Last Edit: March 07, 2014, 05:35:42 AM by SkobbejakGames »