Page 2 of 3

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Thu Aug 12, 2010 5:10 pm
by osuf oboys
Yes, I also noticed this. Also, walking into any obstacle will consume several seconds of processing as A* covers the entire map. I'm sorry but the map is not that huge, it should work fine with a good implementation of A*. Your new one is much better than the old one but I think you can improve it a lot more. The new one is definitely nicer in terms of programming style but it pays for it in performance. Something specialized might be necessary for you. One simple trick I would suggest though, is to botch the heuristics by multiplying it with a small constant above 1. This will help break ties for diagonal movement and leads to significant speed-up in some situations (although not walking behind those walls).

There's also a number of hierarchical and dynamic variants of pathfinding algorithms that makes ample use of the particular structure of PF in games. Frankly, if the monsters always walk from their location to the player, you could do a single efficient BFS from the player and send the monsters according to that. It will beat separate A*'s when you got a bunch of monsters in a maze-y structure.

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Fri Aug 13, 2010 2:41 am
by Lap
osuf,

I sure don't see you talk much, but I'm glad when you do.

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Fri Aug 13, 2010 7:06 am
by bartoleo
is to botch the heuristics by multiplying it with a small constant above 1. This will help break ties for diagonal movement and leads to significant speed-up in some situations (although not walking behind those walls).
I dont' understand why?
I look into astar code... the algorithm I took is very 'abstract' and very nice.
I think is possible optimize it
This is a 'technical demo' ... in a real game I think that A*Pathfinding should not used every frame...

thank you for info & replies

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Fri Aug 13, 2010 8:54 am
by bartoleo
I need a 'favor'
If you have a Mac
can you make a .app of my project (mrpas.love)?
I need to test it on a Mac

The steps are described here:
Making an executable file out of a .love-file
http://love2d.org/wiki/Game_Distribution

thank you in advance

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Fri Aug 13, 2010 12:15 pm
by thelinx
You don't need a Mac to create an app file. Download the UB zip from the LÖVE front page and you can do it yourself. Follow the instructions you yourself linked to :P

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Fri Aug 13, 2010 12:22 pm
by bartoleo
ok
I was unsure that it could work
I'll try

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Tue Aug 17, 2010 1:38 pm
by bartoleo
changed A*Star algorithm
taken T-Engine4 one
from
http://te4.org/
thanks to :
Nicolas Casalini "DarkGod"
darkgod@te4.org

now it uses it as A*Star standard pathfinding
new keys:
c : 'old' a*star, good paths, but slow (I have not yet understood why)
C: 'old' a*star with 'closerpath', less beatiful paths, but slow (I have not yet understood why)
left cntrl + c : new A*Star, less beatiful paths but it's faster

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Tue Aug 17, 2010 2:27 pm
by thelinx
I get this error with the latest version:
Image

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Tue Aug 17, 2010 2:33 pm
by bartoleo
sorry...
try now (file updated)
I was playing with profiler (it needed profiler.dll)

^^

Re: Porting of Field of Vision MRPAS + LoS + A*Star

Posted: Tue Aug 17, 2010 2:58 pm
by bartbes
thelinx wrote:I get this error with the latest version:
[screenshot]
You know there is a text error dumped in the terminal right?