This project is currently deprecated. Please wait til mid march for an updated version.What is this package?This is an implementation of Aron Granberg's A* pathfinding package into PlayMaker. Unlike other actions and addons, it not only offers the functions of the original package as actions, but it also extends and greatly simplifies complex processes. This is why each action is usually rather complex and why progress is seemingly slow
What is pathfinding and Why should I use it?Pathfinding solutions are systems that take your environment and interpret it in a simple way. Then they use this simple data, which is called a "graph" to find a valid path from point a to point b. Depending on your settings the path may avoid walls, holes or even try to avoid grounds that are walkable, but slow, like swamps, if the extra way around them is worth it in the end.
Unity itself has pathfinding too, but it is very weak compared to any of the available packages. If you want to place objects at runtime for example, and then want your actors (the gameObjects that move around, like your enemies) to avoid them, then that will not be possible with the default unity pathfinding.
More information can be found on Aron Granberg's website :
http://arongranberg.com/astar/frontIs it better than XXX?If you're thinking whether you should use this solution over another then that is a fairly simple question atm. This package is for those who want maximum exposure of settings, and maximum performance. On the other hand there is a real learning curve involved. Aron's package is open source and it's vast. Additionally, I have and will continue to add all kind of stuff to make other things possible or more accessible.
Aron's package is also a wise choice for anyone working on a mobile platform.
Have a look at the following vid if you do not know how to use specified object variables. The variables involved with the actions are under FsmPathfinding:Install instructions 0v83free1) Download the package (see bottom of the thread)
2) extract the content of the 7z into your assets folder.
3) Install python 3 or make sure your python version is 3.0 or later
4) Run the setup.py in the AstarPlayMakerInstaller folder.
Install instructions 0v82 pro0) Install Aron Granbergs astarPro package in your project (no need for js support anymore, though it doesn't hurt either
)
1) Download the package (see bottom of the thread)
2) extract the content of the 7z into your assets folder.
3) Install python 3 or make sure your python version is 3.0 or later
4) Run the setup.py in the AstarPlayMakerInstaller folder.
Upgrade to (pro): -- Same as Install instructions for pro --
This is a stable release now. I've created a prototype tower defense without any problems and am currently building a full fledged rts, so no worries that this will get lost
If you find any bugs, tell me. If you find something odd, tell me and if you have a better idea on how to do things, commit it here or just directly critisize my work. No worries there
What we've got so far:You can create point graphs at runtime and use any type of graph that was setup before.
You can use a custom controller or choose from Transform, CharacterController, RVOController and Rigidbodies/Rigidbodies with fixed velocity.
You can either use a vector3 or a gameObject as a target, and you can run away from it, run towards it, follow it until you're close, follow it forever, copy the movement of the target (shadow it) until you reach it or forever, flee a certain distance from it, flee forever from it or you can just walk randomly around
You can smoothly follow a path or use modifiers to actually make the path smooth (currently only subdivisions)
You can access all the node information, graph information and astarPath information (main A* information).
There's also lots of other goodies, like calculating the time of arrival for an actor if he moves along a path, or getting and setting the walkability in an area, but I don't feel like listing them all up. If you feel like something is missing, then just leave a comment and I'll probably integrate it in like 19/20 cases.
Upcoming stuffs:0v85/0v86 :
- back to c# Since the installer will force a js supporting structure, why bother?
- fix actor failing if the node he's currently standing on is unwalkable
- fix smooth modifier on point graphs. Implement other modifiers. Merge all in one action.
- add "shadow offset" for group movement
- option to instantly create a path.
- fix auto option which to be honest is ridiculously outdated/broken
- compare nodeType action
- integrate tags into the actions
- add name option to pointgraph creation actions [done] and create a system to access graphs by name (I think this could be rather useful on larger projects)
- create GridGraphAction
- destroy Graph action
long term ideas:
- create a system for actors to smoothly follow a path [in progress]
- create a system for actors that makes them walk in a straight line if possible, ignoring exact node positions, and only using them where necessary (eg corners). This should both save performance and look better, so it should definitely not use recast.
- make system to move multiple actors at once (eg in formation like in rts, this will likely be part of my future "advanced" version)
- general performance boosts.
- claim and release paths for memory optimization (potentially important for mobile, but this needs some reading in)
- Complete grid graph support. (almost established)
Other People involved : ZeroSigma, hannibalov, LampRabbit
Current Status of the tutorial series:1) Project Setup
2) Graph Basics
3) Movement basics
Astar-PlayMaker Download : https://docs.google.com/file/d/0BwrgibYeepavZ0o0ZmNpWE9lRTg/edit?usp=sharing