Advanced Path Movement (APM) memory leak ?

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.
  • Dear clickers, I need your help !

    I'm making a remake of bomberman, and for path finding I use the Advanced Path Movement ( APM ) object, because my goal is to able to play the game in the browser, and as far as I know, there are not other path-finding extension which work in a broswer ( please correct me if I'm wrong ). And the APM is a powerful extension and easy to use. But sadly, it seems it has some quirks. I'll explain it later.

    That said, I have this scenario: I create first a grid of nodes, like this:

    Please login to see this attachment.

    which would correspond to an arena without destroyable bricks ( the grey ones are obstacle ):

    Please login to see this attachment.

    Note that there are nodes which are not connected with any other node. They are under the undestroyable obstacle ( the grey ones).
    The objects with a "W" represents waypoints, and show where the (connected) nodes are.

    I then add some brick to the arena, like this:

    Please login to see this attachment.

    which corresponds to this node grid:

    Please login to see this attachment.

    I obtain this grid by disconnecting the nodes which are located under the bricks. Now, the A.I. player can reach a brick to destroy, using the APM FindJourney command.

    As the game runs, each brick will be destroyed from the A.I. player ( or the human player), and when this happens, the previous disconnected node, which is located "below" the destroyed brick, will be reconnected to the other nodes. This way the A.I. player can find other paths and move around searching for bricks or bonus - like in the original game.

    In this phase it will be tested which node(s) were previously connected to the node that has to be reconnected, in order to avoid wrong connections.

    Everything works like a charm, and using the command "Connect node ID" of the APM object I can successfully reconnect the nodes as the bricks are destroyed. When all the bricks have gone, the node grid looks like the one posted at first (picture n. 1 ). This shows that the previously deleted connections between nodes were recreated right.

    So far so good, where's the problem, may you ask.

    Well, everything works flawlessy until, say, the last 12 or 8 bricks remain. From that on, the command FindJourney freezes the application for a while, and sometime for more seconds, and sometime completely.

    I really don't know where the problem could be in my code. I've tryed different solutions, but it seems to me that re-connecting nodes generates a memory leak somehow. Sadly, I can't really proceed with the development of this game without a working path finding.

    Has someone of you already had such a problem with the APM object ? Please share your experience and the workaround - if any !

    I may send the whole application if needed. I would be more than happy to try a patch - if there is any. And if there is a new version of the APM object, please let me know.

    I'm using Fusion 2.5+ Developer V. 295.10. The APM object version is: V.1 :
    Please login to see this attachment.

    Please help !

    Best regards,
    Sergio

  • UPDATE

    I've nailed the problem down. It seems that the APM extension does not like targets that are not reachable.
    I'll try to explain it with pictures:
    this is the board (reduced to the minimum):
    Please login to see this attachment.

    To this board belong this node structure:
    Please login to see this attachment.

    For a better comprehension, I show the two images overlapped:
    Please login to see this attachment.

    Now, if I set the target on the green not reachable field, as the node grid shows, the application freezes. Usually it does not happen always; when lots of bricks are still present, trying to reach a non reachable field does nothing and the APM object flawlessy reports that the journey contains only one node ( the one where the robot sprite is ), but the application does not freeze. However, there are several situations when a not reachable target is (randomly) choosen, and this, soon or later, unexpected freezes the game.

    I can avoid this particular situation ( only one green field surrounded by obstacles ) by checking if the target node is connected with the adiacent nodes. If not, another target should be choosen. But there are lots of other configuration, with more than one node e.g. green fields, which are surrounded by bricks, hence not reachable, and the problem arises.


    I wonder if the APM extension has a memory leak or something like that, but I need the answer of an expert here.
    Anyone ? Yves ? Fernando ?

    Regards,
    Sergio

Participate now!

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