When pixelplacement's iTween meets Aron Granberg’s A* Pathfinding, you get a quick demo of what you can achieve with powerful and easy to use tools. With just 2 little scripts (basically 2 function calls, one for each tool), I easily managed to set a typical path finding system. Try the Web Player version (86 Ko) and/or download the project sources (1.5 Mo) here. Check comments in the Player.cs and KeyPoint.cs scripts for more details about this implementation. Big up to Bob “pixelplacement” Berkebile and Aron Granberg for their work! o//
cause i have to pay for a* pathfinding when i want to use it in my game (itll be free to play but i think that doesnt matter) or have u created all the code and ur so kind to let me use it for free? That would be great
Aron Granbergs A* is free for non commercial and costs a nothing of $100 for commercial projects so really nothing to worry. You will pay more for the servers to host an ORPG / MORG, very likely already more per month unless you only get 20 players ie nothing in the range of MORPG at all
hey dreamora First im 15 so i dont make my own money and my pocketmoney is used for a new pc... My server will be hosted at link 3 at vpslink.com... A friend of mine will pay the 240Š per year so u see: i dont have these 100$ and i cant take them from anywhere... Sry about that, this pahfinding would be one of the first things i would buy
Robbilie, If you are after a free A* implementation you can use mine: http://jobemakar.wordpress.com/2008/08/16/a-astar-pathfinding/ It is in ActionScript. Porting it to C# would likely take under an hour. If you wanted to learn more about the algorithm than what is posted I suggest Wikipedia, or check out my latest book: http://www.amazon.com/ActionScript-...=sr_1_1?ie=UTF8&s=books&qid=1292533515&sr=8-1 In the book I use the A* algorithm in a virtual world. But again, it is all ActionScript. The concepts are the same in C# or AS. But obviously the syntax is different. Good luck.
Codeproject.com have at least several C# implementations of A* pathfinding that are available under free licenses (BSD/MIT etc). Plus more could be found on net - just use "XNA" while searching. And there is jobemakar etc implementation. If someone really need it - he will find code. But that is a nice idea if someone would create a community port that is trully free to use. As for Granbergs A* fees, he don't publicly post his price - and "please contact me for price" sounds for me like price very well dependent on the project his code will be used, and could cost way more then a hundred $.
A* price is publically posted on the website, just read the rest of the block where he mentions the mail me for specific quotes etc Its $100 per commercial project actually so more than just affordable as already the editor part of an A* takes you days to pull off yourself
Hey guys, nice to initialize this interesting discussion about different pathfinding implementations. Just remember that A* pathfinding is an Unity3D integrated solution, which is a huge advantage for a unity project! I really encourage you to test it : http://www.arongranberg.com/unity/a-pathfinding/docs/get-started/
thanks for this usefull tools, i am trying get to work on an uneven terrain, and mi player go throw the floor to find the point, how can i solve that?,
Check those pages for details about pathfinding plugin : http://www.arongranberg.com/unity/a-pathfinding/docs/get-started/ http://www.arongranberg.com/unity/a-pathfinding/docs/faq/ Sounds like you have a problem with the "walkable" layer of your terrain.
Oh and don't forget to add collider to your walkable/unwalkable game objects! That's a mistake I often make... 5 minutes ago for instance XD
thanks for answering i read the faq and the guide and my walkable player has collider but i have the same problem and i dont undestand why
Does your terrain have a mesh collider? Did you apply the same options than in my example? Anyway you should enable the "debug" option of your game object which holds the AStar component, you will see the walkable nodes in green colored dots linked by green segments (and unwalkable areas in red cubes).
my terrain have collider and my player too i think i have the same option, and i can see the walkable nodes i upload a video showing the problem, thanks http://www.youtube.com/watch?v=g36zDEi71NE
thanks men, but doesnt work, i try a lot with options and none works, then i use the ai follow script and cliker scripts of the a pathfinding examples and its work, i think its a problem with the itween instruction in uneven terrain and then i changed the floor of your example for a terrain and works pefect, ohh men i think i m going to get crazy
Maybe you should tweak a little bit the iTween.MoveTo method parameters. See http://itween.pixelplacement.com/documentation.php#MoveTo
Here is a sexier version. iTween configuration has been tweaked to fit a more realistic trajectory (player’s orientation is better than previous version but still not totally satisfying). Below the interesting part of the main script (Player.cs): Code (csharp): iTween.MoveTo(gameObject, iTween.Hash ( "path", path, "orienttopath", true, "looktime", 1.0, "lookahead", 0.05, "axis", "y", "easetype", iTween.EaseType.linear, "time", iTween.PathLength(path) / moveSpeed, "oncomplete", "OnMoveComplete" )); See iTween.MoveTo method’s documentation for more details about parameters. It also uses the soldier model from the Unity3D “Bootcamp” demo and its animations, that’s why the web player build and project archive are a bit heavier than before ^^; Try the Web Player version (4.4 Mo) and/or download the project sources (24.6 Mo) on my blog.
I'm confused on why using iTween is necessary for this example. It can be achieved completely with the A* scripts unless I am missing anything. In a project I am prototyping right now I made the player able to click on a character, drag to where they want them to go and un-click and the A* scripts drives the character basically in the same way as your example.
Oh yeah of course iTween is not mandatory in this example but I thought it was interesting to show how you can do cool stuff by mixing those 2 great tools. There is even an "AI follow" component coming with AStar package allowing to move the character along the found path but it hasn't as many options as iTween. This example shows a really basic movement style but starting from there you can create pretty much whatever you want without requiring any knowledge about AStar path finding algorithm or character movements. I know this can "easily" be done once you have this knowledge, just thinking about those who don't have it or don't have the time to develop it from scratch
I appreciate it. I'm sure I could figure it out, but time is precious, so any assistance is greatly appreciated. Plus, using iTween, you can do some nice easing, I suppose.
Here is a fix for A* Pathfinding project Unity 3.2 compatibility issues: http://blog.gfx47.com/2011/02/10/a-pathfinding-compatibility-issues-with-unity-3-2-no-problemo/