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.
Porting of Field of Vision MRPAS + LoS + A*Star
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Porting of Field of Vision MRPAS + LoS + A*Star
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Re: Porting of Field of Vision MRPAS + LoS + A*Star
osuf,
I sure don't see you talk much, but I'm glad when you do.
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
I dont' understand why?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 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
Bartoleo
Re: Porting of Field of Vision MRPAS + LoS + A*Star
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
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
Bartoleo
Re: Porting of Field of Vision MRPAS + LoS + A*Star
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
Re: Porting of Field of Vision MRPAS + LoS + A*Star
ok
I was unsure that it could work
I'll try
I was unsure that it could work
I'll try
Bartoleo
Re: Porting of Field of Vision MRPAS + LoS + A*Star
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
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
Bartoleo
Re: Porting of Field of Vision MRPAS + LoS + A*Star
I get this error with the latest version:
Re: Porting of Field of Vision MRPAS + LoS + A*Star
sorry...
try now (file updated)
I was playing with profiler (it needed profiler.dll)
try now (file updated)
I was playing with profiler (it needed profiler.dll)
Bartoleo
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Porting of Field of Vision MRPAS + LoS + A*Star
You know there is a text error dumped in the terminal right?thelinx wrote:I get this error with the latest version:
[screenshot]
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests