Possible Memory Problem with Pathfinder?

File bug reports and troubleshoot crashes.

Moderators: ezraanderson, JDance

Possible Memory Problem with Pathfinder?

Postby naturally » Thu Nov 20, 2014 4:03 pm

Just want to share something I've had a problem with recently.

If the pathfinder can't find a solution on a large search space (ex: destination is on unreachable tile), then not only does the sim slow down drastically (to be expected) but the sim subsequently slows down permantenly and never recovers until GC is run (on my Android tablet, desktop is fine).

I solved this myself by cancelling searches that are unreachable tiles, but thought I'd post this anyways for discussion.

:arrow:
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 710
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: Possible Memory Problem with Pathfinder?

Postby Taroven » Thu Nov 20, 2014 7:27 pm

Seems to me that there are a few issues with pathfinding besides this, based on the current back-and-forth in the Game Dev section [1].

Perhaps a GC pass should be forced in (moai-sim/MOAIPathFinder.cpp) MOAIPathFinder::_findPath as a (hopefully temporary) workaround?

[1] http://getmoai.com/forums/moaipathfinder-not-giving-shortest-path-t2065/
Taroven
 
Posts: 19
Joined: Thu Aug 08, 2013 6:22 am

Re: Possible Memory Problem with Pathfinder?

Postby naturally » Thu Nov 20, 2014 11:02 pm

Pathfinding is working well for me, although I have hacked it a bit and commented out some of the features I didn't need, hopefully for a speed boost. I'd recommend considering integrating a third-party C/C++ pathfinder, since they are bound to be faster and with more features.

I would hope that GC doesn't have to be forced for this, since it would kill sim speed running it frequently. But you can always force it after if you want, maybe if the path size returned is quite large?
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 710
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: Possible Memory Problem with Pathfinder?

Postby amity soft » Fri Mar 27, 2015 2:06 am

Hi Friends,
I am new to this forum, happy to join here.
Thanks for your information. :)
amity soft
 
Posts: 1
Joined: Fri Mar 27, 2015 2:02 am
Location: Chennai

Re: Possible Memory Problem with Pathfinder?

Postby RurouniGPL » Fri Jul 03, 2015 9:06 am

naturally wrote:Pathfinding is working well for me, although I have hacked it a bit and commented out some of the features I didn't need, hopefully for a speed boost. I'd recommend considering integrating a third-party C/C++ pathfinder, since they are bound to be faster and with more features.

I would hope that GC doesn't have to be forced for this, since it would kill sim speed running it frequently. But you can always force it after if you want, maybe if the path size returned is quite large?


Can you share your changes? I'm having troubles with the default path finding (it isn't calculating the shortest path with diagonals).

Thanks!
RurouniGPL
 
Posts: 243
Joined: Wed Jun 27, 2012 11:54 am

Re: Possible Memory Problem with Pathfinder?

Postby naturally » Sat Jul 04, 2015 6:35 am

Check here for diagonal solution: moaipathfinder-not-giving-shortest-path-t2065/?hilit=diagonal#p14070

My changes are simply commenting out all the features I don't use, like the case statements for heuristics. The other changes are specific to my map tiles so wouldn't be of use outside to anyone.
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 710
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: Possible Memory Problem with Pathfinder?

Postby wordsdoctorate » Wed Jun 14, 2017 1:54 am

Hi Friends,
I am new to this forum, happy to join here.
Thanks for your information. :)

http://www.wordsdoctorate.com/
wordsdoctorate
 
Posts: 1
Joined: Wed Jun 14, 2017 1:52 am


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

x