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