playMaker

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

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #75 on: February 07, 2013, 03:32:13 AM »
alright, try using the zip and put it into the plugin folder in your assets. If it still doesn't work, you can share your playmaker and astar version with me and I'll install it for you, if you want.
Are you using Mac?
Best,
Sven

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #76 on: February 07, 2013, 04:19:37 AM »
Oh, one more thing. If you aren't sure if you've removed all of the scripts from the previous package, import the old package again and see if everything has a ''new'' label next to it. If there are items without that, you'd still need to remove that before you can import the newer package.
Best,
Sven

Threepeasoup

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #77 on: February 07, 2013, 12:28:07 PM »
Hey Kiriri,

installed last night, and everything worked great! No errors on my side.
Using Windows 7 and A* free version.

I am having trouble trying to figure out how to make a* work only for the x and y axis and ignore the z axis. Is this possible?

Thanks for the awesome plugin man!

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #78 on: February 07, 2013, 02:19:19 PM »
glad it works for you  ;D .
If possible, do try to rotate your scene to the x and z coordinates. Lots of actions expect your scene to be that way. Also, I have not encountered any practical solution to work with a grid graph in any other dimensions, though I'm by no means an expert. I'll do some research tomorrow, though I expect that many astar settings, like height checks etc may also not work properly on any other plane.

Also, right now the movement actions either require a character controller or create a new one, so you would always be affected by gravity. I'll add a checkbox to make it possible to not use a controller at all, so you can hook up your own controller to the direction value.

The next update should aim for a better point graph integration, which should allow you to do such things by placing empties all over the scene and then automatically generating connections between them. I can send you the action once it's done if you like, since the actual next update may just take some time still.
Best,
Sven

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #79 on: February 09, 2013, 04:13:30 PM »
I deleted everything and reimported it a few times, I keep getting different errors, but this one is sticking.

Assets/PlayMaker/Actions/Addons/AStar/FsmPathfinding/PointGraphFromChildren.js(76,42): BCE0019: 'ScanGraph' is not a member of 'AstarPath'.

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #80 on: February 09, 2013, 05:14:48 PM »
that one means you have not added the ScanGraph function to the AstarPath script. I'm sorry, I should've mentioned that the upgrade instructions in the first post changed. Until the next Astar version everyone needs to upgrade manually. After that the function should be in Astar by default .
Best,
Sven

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #81 on: February 09, 2013, 07:21:59 PM »
that one means you have not added the ScanGraph function to the AstarPath script. I'm sorry, I should've mentioned that the upgrade instructions in the first post changed. Until the next Astar version everyone needs to upgrade manually. After that the function should be in Astar by default .

doh! my mistake, I remember that.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #82 on: February 09, 2013, 07:31:22 PM »
Looks like its running.

Also do you need ArrayMaker as well to operate the tower example? There seem to be some Array actions missing that I don't have and its throwing some FSM errors.
« Last Edit: February 09, 2013, 07:34:46 PM by Lane »

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #83 on: February 10, 2013, 02:52:07 AM »
nope, the examples should work without ArrayMaker... since all the variables in Astar are extensions of the object variable, and ArrayMaker does not support objects I couldn't use it, although it would have been very handy if I could. Maybe I should talk with Jean about this... though then the plugin owuld rely on 3 other plugins which would likely make it even harder to install.

Can you post a screenshot of the errors, or copy paste them ? Can they be cleared/ Do they allow you to start the game?
Best,
Sven

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #84 on: February 10, 2013, 07:35:19 AM »
Heres a screenie
« Last Edit: February 10, 2013, 07:54:53 AM by Lane »

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #85 on: February 10, 2013, 08:13:52 AM »
akk.... now I remember, I totally forgot about the spawner. I first used global events to update the paths of the enemies, but that was quickly becoming performance heavy so I switched to an arraylist which contains every spawned enemy and each time you would remove or add a tower, it would go through that list and tell everything to update.
I'll need to find a better way for v81 which is supposed to be a bugfix release.

.. . But seriously, that caught me mightily off guard :I .
I tested each action one after another to ensure this release to be properly stable this time, but I did not expect any problems with the examples.

Btw, I already have a working replacement, let me just test it for a bit. I'll post it here in an hour or 2 with the rest of the bugfixes as 0v805 :D
Best,
Sven

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #86 on: February 10, 2013, 08:17:03 AM »
Lol, sorry to throw you off there!

So do I just need to import ArrayMaker and it should work, then? I imported it and it still throws the errors.. Maybe I need to reimport the examples..

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #87 on: February 10, 2013, 08:35:02 AM »
yeah, I think so, you will need to reimport the examples and you also need to make sure the global variables are imported before opening the scenes. Now that I'm looking at it, it may also be possible that I somehow corrupted the monsterSpawner... just have a look at the inspector and see if the arraylist component looks proper. If it doesn't, replace it with a new one with the reference "spawns" ... or just wait another 15 min for me to finish packaging the new version (don't worry, now that you've already set up the project properly, you can just import the new package without doing anything more :D)
Best,
Sven

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: A* pathfinding (stable 0v8)
« Reply #88 on: February 10, 2013, 08:47:08 AM »
How about this one :)
I now use parent/child relations to send the events (next child action). The other 2 examples were without ArrayMaker. There are also minor changes to the MoveTo, FollowTarget and some other movement actions, which didn't work properly when repeated a lot.
Best,
Sven

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: A* pathfinding (stable 0v8)
« Reply #89 on: February 10, 2013, 06:55:31 PM »
Ok it's stable for me now, It's not crashing U4 with a new project and seems to open your examples without errors.

Are you sure the tower scene is working properly though? When I run it all that happens is it spawns enemies and they never move. I got into the FSM's and theres a bunch of missing variable assignments. Trying to figure out how the system is supposed to work but having a hard time making heads and tails of it. It also starts heavily bogging down the PlayMaker related GUI after I start messing with an FSM, even when its not running the scene..
« Last Edit: February 10, 2013, 06:58:42 PM by Lane »