Integrated Path Planning issue

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm using Mokhtars Integrated Path Planning object (MMF2 dev only) for pathfinding in a little game.

    Moving an enemy to a fixed location works smoothly, no problems.

    When I try to use the object to make my enemy CHASE the player though, there's a little issue- it flickers direction every x time it runs the path planning event. It looks unsightly like the enemy is having a seizure.

    Attached a basic 4 line example to illustrate.

    Please login to see this attachment.

    Anyone know a workaround or what I'm doing wrong?

    Please login to see this link. - Please login to see this link.

  • Don't quote me on this because I'm not typically on the giving end of info on these forums (not for a lack of want!) but I think MMF2.5 will have a path finding movement built in. If that's the case, it might be wise to wait and see how it is before going forward with something else.

  • Don't quote me on this because I'm not typically on the giving end of info on these forums (not for a lack of want!) but I think MMF2.5 will have a path finding movement built in. If that's the case, it might be wise to wait and see how it is before going forward with something else.


    There were no such announcements at ClickConvention, and I don't know of any other public info about it other than scattered about on these forums. However, there was a new pathfinding object announced at it, though it's a different kind of pathfinding entirely.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • I'd check a new one out should it come, but for now I need a quick and dirty fix for this one so I can progress with my game :)

    Please login to see this link. - Please login to see this link.

  • Try reducing the size of the tile to verify the cause as I suggested in the private message. I am out of town so I can't try your example yet.

    Out of curiosity, happygreenfrog, what will the new pathfinding object do?

    -Mokhtar M. Khorshid

  • I did try that but no luck. Current tile size is 16, seems to be worse if I reduce it. Trying to look into a way of working round it

    Here's an image of the code:

    Please login to see this picture.

    Please login to see this link. - Please login to see this link.

  • OK, one thing to look at are the action points for both objects, are they aligned? Second quick hack until we figure out the cause is to manually skip one step once you found a path.
    Note that the plan paths operation may take slightly longer time than the other operations, so if you are doing it so frequently the object might have moved by the time it is done. If I recall correctly, there was an event that was called once the planning was completed and a path was found. You can use that to skip the first step.

    Alternatively, you could use a marker object and place it right at the next node, and have it update its position whenever the agent touches it. If it is bigger than the tile, it should be touched right away even if it is one tile off.

    -Mokhtar M. Khorshid

  • The action points are aligned yeah

    Can't see any 'On path found' or similar event

    I did a fix using the marker idea you mentioned, seems to work okay for one, although it's a struggle getting it working for many

    Hopefully you'll be able to take a look when you're back,

    Thanks :)

    Please login to see this link. - Please login to see this link.

    Edited 2 times, last by Panchos (October 9, 2013 at 4:47 PM).

  • Try reducing the size of the tile to verify the cause as I suggested in the private message. I am out of town so I can't try your example yet.

    Out of curiosity, happygreenfrog, what will the new pathfinding object do?


    The upcoming pathfinding object is called the "navigation mesh object". There is a video that shows the ClickConvention presentation on it here (which should answer your question): Please login to see this link.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • The upcoming pathfinding object is called the "navigation mesh object". There is a video that shows the ClickConvention presentation on it here (which should answer your question): Please login to see this link.

    Thanks. That's a neat extension, it's great to see these things coming. Although this is not a "pathfinding" object per se, this one seems focused on mesh geometric calculations which is a different (and still difficult and relevant) kind of problem. Path smoothing via splines of whatever, is a very nice feature to give realistic motion right away instead of doing it using a separate movement.

    Panchos, sure. If you don't hear from me in a week, ping me again. I can't recall the events/actions now as it has been a long while, but I do recall having a chase example bundled with the extension. I am assuming you already looked at it.

    -Mokhtar M. Khorshid

  • Hey, Mokhtar, do you think you could perhaps port the integrated path planning to other runtimes, by any chance? That's the one thing that all of the existing pathfinding objects have lacked so far (being available for all runtimes (though there is one pathfinding object that is available for Flash, it doesn't work in Windows, which means that, if you want a Flash version and an EXE version, you need to maintain the two separately as of now)), which is why I'm wondering.

    A Flash port would be a good start, if you do end up porting it to other platforms, since it shouldn't be too hard to do if you know ActionScript (and, if you don't, it shouldn't be too hard to learn it), though, if there is another port that you think would be easier, you can port it to that runtime instead (E.G. If you don't know ActionScript, and you know Objective-C incredibly well, then an iOS port would probably be easier).

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • OK, I'm finally back. I see what's happening now, it's crossing the node for a moment and the event to orient triggers before the path is updated. This could be fixed by setting a larger grid tolerance in the extension properties. But a more direct fix would be to simply slow down the orientation event a bit, it worked fine with a 5/100 of a second condition.

    Of course, the ideal solution would be to have an invisible marker jump to the nodes until the agent collides with it, as that would allow for smother paths.

    -Mokhtar M. Khorshid

  • Hey, Mokhtar, do you think you could perhaps port the integrated path planning to other runtimes, by any chance?

    Technically it's doable of course. I would say the XNA port would be the easiest (but probably least needed). Porting the advanced features may be difficult, but a subset of the most common may be feasible. There hasn't been much demand for a port so far though. The main problem is my severe lack of time. However, if any of the extension developers has the time and is interested in porting it, I can definitely help them out.

    -Mokhtar M. Khorshid

  • OK, I'm finally back. I see what's happening now, it's crossing the node for a moment and the event to orient triggers before the path is updated. This could be fixed by setting a larger grid tolerance in the extension properties. But a more direct fix would be to simply slow down the orientation event a bit, it worked fine with a 5/100 of a second condition.

    Of course, the ideal solution would be to have an invisible marker jump to the nodes until the agent collides with it, as that would allow for smother paths.

    Thanks for taking a look. I did try your first two solutions but they didn't solve it for me :(

    I increased the grid tolerance from 8 and tried all the way up to 100 and the problem still occured. I tried it into the minus too just to check.

    The second solution about slowing the orientation, do you mean adding a restrict action for 0.05 sec to the event? I did that but it didn't fix.

    I've not tried the third one yet, just checking I've tried the first 2 correct before I go the marker route.

    Thanks

    Please login to see this link. - Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!