ActionScript 3.0 :: Pathfinding Through Waypoints?
Apr 30, 2008
I need to create a pathfinding algorithm that goes through some predefined waypoints. Most of the examples I have found are about tile based layouts and the one that comes close to what i need is this:hich, unfortunately, I don't understand.Basically have a movieclip containing three different types of clips: Cities, roads and marked roads where something happens when you cross it.Going from city to city should always result in passing through the blue or orange waypoints jumping from one point to the next nearest point.
View 4 Replies
Oct 25, 2009
I've been experimenting with path finding, in particular the A* algorithm. I've understand the basics for it and can currently get an object to move from point A to B avoiding walls. However I'm trying to create one way blocks, (then eventually add turn left and right only and T juncs etc) so I don't have to use thick walls to prevent the object from taking a certain route. The code I have so far is....
[Code]...
View 1 Replies
Feb 7, 2012
Is there any open-source algorithm for path-finding that can handle groups of objects? I'm developing a (flash) game like Age of Empires.
I will be using AS3, but I can translate any code or pseudo-code.
View 1 Replies
Jun 1, 2010
Pretty much what I am looking to do is have an NPC find the shortest path from their location to the player's. Everything is turn-based, so the NPC would have the capability to move from one room to another adjacent room in one turn. Keep in mind that there would be no physical manifestation of the code, other than some text that would be displayed when the NPC enters the same room as the player.And as an added aspect if possible I would like the ability to stop NPCs from entering the same room as the player once they've reached it if the room/door/entrance is locked.So the end result would be something like this...
-------[E]
[P][ ][ ][ ][ ]
--------[ ]
[P][ ][ ][E][ ][code]..........
Only difference is that there would be no graphical representation.
View 1 Replies
Jun 6, 2009
I have a question regarding seemingly relatively simple collision detection and pathfinding. Thus far I've been doing pathfinding using the A* algorithm and nodes, but I want to do something simpler for a current project.
Simply put, I just want a character to traverse directly from point A to point B, and pillar-hump around any obstacles he encounters. Of course, if the unfortunate character walks into a concave area, he would never be able to get out... that's fine. Here's an illustration of the initial setup, what A* will do, and what I actually want to do:
I was wondering if anyone here has ever done this, and if so, could suggest the best way to go about doing it?
View 2 Replies
Aug 29, 2011
I'm making my own dynamic 2D polygon pathfinder and have reached the point where i need to incorporate the actual pathfinding between the vertices. I figured Dijkstras algorithm would do the trick. If you know of better algorithms for mesh-pathfinding, please tell me. I know i could write it from scratch with reference to C, but I'm sure there are more efficient algorithms out there than the one I'd come up with.
View 8 Replies
Aug 10, 2011
My AS3 A* pathfinding implementation sometimes doesn't returns the most efficient route, rather like this:[code]The problem: i should have a total score of (distance to end) 30 + (distance from start) 10 = 40, while the tile above i should have a total score of (distance to end) 40 + (distance from start) 14 = 54. Why is 54 being picked instead of 40, I don't know - I use this to find the node with lowest total score on the open list:[code]
View 1 Replies
Mar 23, 2012
I am currently working on a very simple isometric3d game with a hero to move to mouse click position, using path-finding. I am trying to code everything myself step by step,as a beginner , i am well aware of asolib3d but I don't want to use it...I have read tutorials and few books I completely done with my isometric3d map. i create my path finding A-star class which is working perfectly with 2d grid tiles, but when i try to use it with isometric3d grid world it doesn't work properly.
ActionScript Code:
package {
import com.sayConcept.isometric.IsoUtils;
import com.sayConcept.isometric.GraphicTile;
[code]....
my character movement is not correct. If hero position=0,0 and I click 0,10 on my iso grid instead of moving down he will move on the right side. If I am in the middle and I click on the left he will move right. and like few steps for where it supposes to stop... my pathfinding is ok in 2d but isometric the movement is weird...
View 0 Replies