x


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 :)

more ▼

asked Jan 20 '11 at 12:55 AM

Uriel_96 gravatar image

Uriel_96
945 61 70 81

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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

more ▼

answered Jan 24 '11 at 05:59 PM

Scribe gravatar image

Scribe
1.8k 12 16 34

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.

Jan 24 '11 at 11:56 PM Uriel_96

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

Jan 25 '11 at 06:30 AM Scribe

yeah, thanks it helps a lot, but bad thing(I think) is that Unity does not handles C++

Jan 26 '11 at 12:33 AM Uriel_96
(comments are locked)
10|3000 characters needed characters left

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).

more ▼

answered Jan 21 '11 at 06:17 AM

yoyo gravatar image

yoyo
6.5k 25 39 85

(comments are locked)
10|3000 characters needed characters left

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 :)

more ▼

answered Jan 20 '11 at 01:40 AM

Jesse Anders gravatar image

Jesse Anders
7.3k 7 17 48

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?

Jan 20 '11 at 01:56 AM Uriel_96

but thanks anyway for answer, I did not figure it out that is really difficult this kind of things to say "simple"

Jan 20 '11 at 01:59 AM Uriel_96
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Jan 22 '11 at 04:27 AM

Uriel_96 gravatar image

Uriel_96
945 61 70 81

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#.

Jan 22 '11 at 05:15 AM yoyo

yeah, that's the bad thing. :(

Jan 22 '11 at 05:45 AM Uriel_96
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5273
x3570
x1403
x245
x141

asked: Jan 20 '11 at 12:55 AM

Seen: 3502 times

Last Updated: Jan 20 '11 at 12:55 AM