gaffkins / as3pathfinder Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/as3pathfinder
Automatically exported from code.google.com/p/as3pathfinder
What steps will reproduce the problem?
Any time the pathfinder executes
What is the expected output? What do you see instead?
Expected to work, get an error ReferenceError: Error #1069: Property 1 not
found on Number and there is no default value.
at Pathfinder/iterate()
at Pathfinder/getPath()
What version of the product are you using? On what operating system?
Tried both
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Jul 2011 at 1:25
What steps will reproduce the problem?
1. Create a 20x15 map:
var _tileList:Array = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]
var finder = new Pathfinder();
finder.loadMap(_tilelist,20,15);
finder.getPath(new Point (1,1), new Point (18,12), false)
What is the expected output? What do you see instead?
I get nothing in return.
I assume 18,12 corresponds to row 18 and column 12 (out of those 20x15, so I
assume I´m within the limits)
If I try to change the second point to (14,13) I get output, but not if I go
above that point.
What version of the product are you using? On what operating system?
1.3 Win7
Please provide any additional information below.
The output from
finder.getPath(new Point (1,1), new Point (14,13), false)
is:
(x=1, y=1),(x=1, y=13),(x=13, y=13)
Is that the correct behavior and I made a mistake? (I'm just getting my hands
dirty with code)
Original issue reported on code.google.com by [email protected]
on 23 Nov 2013 at 4:03
Can you give an example on how to build the map array of locations and find a
path.
ex: var map:array=[[0,0,0]];
thanks.
Original issue reported on code.google.com by [email protected]
on 7 Jul 2011 at 4:20
What steps will reproduce the problem?
1.var map:Array = [[0, 0, 1, 1, 0, 0, 1, 1, 1, 1],
[0, 0, 1, 1, 0, 0, 1, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 1, 1, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[0, 0, 1, 1, 0, 0, 0, 1, 1, 1],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 1, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 1, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0]];
var pt:Pathfinder = new Pathfinder();
pt.loadMap(map);
//Try the following testCases.
2.pt.getPath(new Point(9, 0), new Point(9, 4), false);
3.pt.getPath(new Point(9, 0), new Point(8, 8), false);
4.pt.getPath(new Point(7, 6), new Point(9, 7), false);
4.pt.getPath(new Point(7, 7), new Point(9, 7), false);
5.pt.getPath(new Point(3, 5), new Point(1, 7), false);
6.pt.getPath(new Point(7, 7), new Point(9, 9), false);
7 try getPath from anywhere from the right edge to any other tile. Get errors.
What is the expected output? What do you see instead?
I See a lot of errors. for example:
at pathfinder::Pathfinder/iterate()
at pathfinder::Pathfinder/getPathArray()
Also, in issue No.5 I get an empty array back from getPath.
I managed to fix a couple of the issues by adding && i + 1 < dimensionX on
line 190 and 248. But I don't see why this only applies to the horizontal
arrays.
What version of the product are you using? On what operating system?
Pathfinder1.3
Flash CS6
Flash Player 11.2
Please provide any additional information below.
I've attached some files so that you can test it out. Just click on the two
tiles you want a path between.
Thanks for an otherwise great and easy pathfinder!
Original issue reported on code.google.com by [email protected]
on 11 Sep 2012 at 2:01
Attachments:
I downloaded your code, and tried it by passing an array as following:
var pt:Pathfinder = new Pathfinder();
var arr:Array = new Array();
arr = [[0,0,0],[0,0,0],[0,0,0]];
pt.loadMap(arr, 2, 2);
var path:Array = pt.getPath(new Point(0, 0), new Point(2, 2));
Which gives the following error:
"TypeError: Error #1010: A term is undefined and has no properties."
(Line #108 of your code)
Then I tried to give dimensions as "3,3" as in: "pt.loadMap(arr, 3, 3);"
It gives the same error again. But now on Line #190 of your code.
So, what am I doing wrong??
Original issue reported on code.google.com by [email protected]
on 2 Feb 2012 at 9:16
What is the average speed gives your algorithm?
Original issue reported on code.google.com by [email protected]
on 6 Dec 2012 at 2:49
What steps will reproduce the problem?
1. Inserting a map where 0 is possible paths and 1 is an obstacle
2. A huge obstacle is in the middle of the map, a solid obstacle
3. Path generation will still result in entering the obstacle area
4. Clearer example is in the excel sheet
What is the expected output? What do you see instead?
1. Nodes generated supposed to go around the map however nodes that are
generated go through the map
What version of the product are you using? On what operating system?
1. Pathfinder.1.3.as on Windows7 using FlashBuilder
Please provide any additional information below.
1. Attached is the map file in excel for your reference.
2. The goal is to use diagonal traversing.
3. Only amendment made is
public function loadMap(m: Array) {
map = m;
tmpMap = new Array();
dimensionX = map.length;
dimensionY = map[0].length;
}
4. m passed in is a 2d array generated as such
i.e
var map:Array = new Array();
var map2:Array = new Array();
map2.push(0); ...... map2.push(1);...... map2.push(0);
map.push(map2); .... map.push(map2);
5. The result of the map generated is in the file attached
Original issue reported on code.google.com by [email protected]
on 11 May 2012 at 5:39
What steps will reproduce the problem?
1. The code I have provided do not return any Points.
2.
3.
What is the expected output? What do you see instead?
An array with non diagonal points / An empty Array.
What version of the product are you using? On what operating system?
1.2 / W7
Please provide any additional information below.
First thing first. Great job with Dijkstra's algorithm!
Well, maybe I have misunderstood something here but I need to get the
Points/steps between A & B. When I pass in "diag = true" it seems to work, but
when I pass in false the getPath() function do not return any points. Any
suggestions? Thanks!
var map:Array = [[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0]];
var pt:Pathfinder = new Pathfinder();
pt.loadMap(map, 10, 10);
var path:Array = pt.getPath(new Point(1, 1), new Point(8, 8), false);
Original issue reported on code.google.com by [email protected]
on 20 Oct 2011 at 3:29
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.