Quote:
Originally posted by TribulationStaff
Lastly, if you can do this, I am surprised you needed to call on my services at all for SA, good work.
|
-_- I told you I was a good scripter to start. I just need help on special effects occasionally, because I don't want average, I want amazing. And I lack in being able to make good special effects (though lately, I have been surprising myself x-x)
btw, A* is a concept for pathfinding, just do a little research. It is the most popular one, but not the most efficient. I've read up alot of it in the past, and I never really gave a shot of making one up...lately with all the pathfinding talk I decided to try.
Quote:
Originally posted by adam
Behold! if you don't move them it works.
|
Read my original post again. I said the start NPC is a little odd, but the end NPC works perfect. Leave start alone and move end anywhere on the maze and the NPC will always find a way if there is a way.
Quote:
Originally posted by Kaimetsu
In any case, tile-by-tile methods are horribly inefficient when navigating over any large distance. Predefined nodes are the way to go.
|
Agreed. Which is why I am going to finish this tile-by-tile method after I make the node web system we discussed.
I was thinking of the concept of it, and I think I got it all figured out. It will work similiar to the A* technique, except instead of thousands of indexes in multiple arrays, it will only be about 20 or so, and would work instantly. My plan is this: First the NPC detects any nodes seen from the start point, and from that start (assigned number 0) it assigns every seen node number 2. From there, the nodes assign every unassigned node a number increasingly, and once a node has line of sight of the target, the node cost script will be terminated. At that point, it will work backwords from the target, saving the x/y coord of the nodes. Each time it selects a new node, it will decrease the value, and eventually it will get to the start point. From there, pathing is complete and all you must do is reverse the targets trip for the start, and so on more easy stuff.
Heh, I suppose it is
still a form of A*, but it must be agreed that it is a superior form as far as efficiency goes. It is also the only smart way to do long distance travel for serverside pathfinding (I was trying to tell Konidias the horrid lag which would occur using A* over a gmap, but I don't know for sure, so maybe I am wrong. I think it would lag tremendously though).
Oh also, I am thinking to solve the problem with this path finding, I should seperate the loops so each loop will stay under 10,000. I need to figure everything though...maybe Giltwists plan of using sleep would work. I was thinking of assigning a sleep every 9999 runs of a loop, but it might be better to find ways to reduce the number of loops it requires.
Heh, I really should bother Stefan about making a built in pathfinding function -_-.