- Home /
Starting with simple pathfinding with mesh
OK, I actually know all about Aron's A* path-finding and angry ant's behave, path, and more things but the problem is that it was to long(the scripts) and I was wandering to make something like that my self but the only problem is that I don't know where to start I have been searching for weeks for something but I can't get something and I also try asking for several things here in answers.unity3d but I don't get something helpful so I want a simple code(simple means not to long) or web pages where I can learn, where I can find the way to do a navmesh or a mesh that erase some vertices(where is a wall)using raycast or collision and that kind of stuff.
Note: Please if is JavaScript it would be better but its OK with C#.
Thanks.... for future :)
Answer by Scribe · Jan 24, 2011 at 05:59 PM
http://www.gamasutra.com/view/feature/3096/toward_more_realistic_pathfinding.php
http://www.policyalmanac.org/games/twoTiered.htm
http://theory.stanford.edu/%7Eamitp/GameProgramming/MapRepresentations.html
http://www.policyalmanac.org/games/binaryHeaps.htm
"The package contains two versions, one in C++ and one in Blitz Basic. Both versions are heavily commented and should be fairly easy to follow, relatively speaking (download from this page - http://www.policyalmanac.org/games/aStarTutorial.htm )"
download
http://www.policyalmanac.org/games/AStar.zip
this might help, theres a lot of reading though :P
thanks a lot that what I was trying to search, but I have a question, what kind of code those it handles(js,c#,c++, etc) for all the web sites.
A lot of it is not code specific and more things you have to think about whilst creating a code. The C++ code should help you to see how to arrange the theory in the other pages into a script. glad it helped
yeah, thanks it helps a lot, but bad thing(I think) is that Unity does not handles C++
Answer by Jesse Anders · Jan 20, 2011 at 01:40 AM
Punctuation and paragraphs will make your posts easier to read :)
Pathfinding is a fairly complex topic and most pathfinding implementations will be non-trivial, so I'm not sure how much luck you'll have finding something 'short' or 'simple' that does what you want.
If you need complex pathfinding behavior in your game, I'd try to get one of the existing libraries you mentioned working. If you want to pursue it yourself though, try searching the internet for terms like 'pathfinding', 'a star', 'navigation mesh', 'waypoints', and so on. Pathfinding is not a Unity-specific topic, so you can learn about it any number of places - there are plenty of articles, papers, and tutorials floating around on the web.
Again though, it's not trivial (especially navmesh-based pathfinding), so if you want to implement it yourself, you'll have some work ahead of you :)
that's actually what I am trying to search but I don't find something to learn(learn I mean not to how it works In general, I mean learn that kind of things with a program like JavaScript), I only find explication of the complex of path but I can't find scripts to learn. So my question know is, you know where I could find something like this?
but thanks anyway for answer, I did not figure it out that is really difficult this kind of things to say "simple"
Answer by yoyo · Jan 21, 2011 at 06:17 AM
Try googling for "path following" -- here's the first hit I got, which looks relevant.
Following an existing path is quite a bit simpler that generating an optimal path under constraints. You could have pre-authored paths that your person/creature/vehicle can follow -- these could be as simple as multi-line segments, though you'll need to make it a sort of network and decide which turn to take when you come to a branch (at which point we're back to path-finding :-).
You could set it up so that some of the paths can only be followed after an event has occurred (e.g. wall blown up).
Answer by Uriel_96 · Jan 22, 2011 at 04:27 AM
I got something but the problem is that is really complex, but I kind of like it because is explaining part for part, here is the page: http://active.tutsplus.com/tutorials/games/artificial-intelligence-series-part-1-path-finding/ the only bad thing is that I don't know what kind of scripting is because it don't looks like JavaScript.
At the top of the page it says it's Flash (cs4). You can use it fine as a reference for the algorithms, but you will have to convert it into javascript or C#.
Your answer
Follow this Question
Related Questions
Create edges for vertices(JS) 1 Answer
How to find triangles using variables 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Setting Scroll View Width GUILayout 1 Answer
Scripting Meshes Subdivision(Javascript) 0 Answers