Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] BFGames: Simply A* Pathfinding! NOW FREE

Discussion in 'Assets and Asset Store' started by BFGames, Dec 28, 2012.

  1. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Im proud to announce that Simply A* has been accepted to Unity's asset store:

    Assetstore link!


    BFGames: Simply A* Pathfinding: a double solution!







    Try the grid based solution webplayer here: GRID WEBPLAYER
    (move around with the left mouse button, can also push the mini-map and see path there)


    Try the waypoint based solution webplayer here: WAYPOINT WEBPLAYER
    (move around with the left mouse button)

    Simply A* is built as two different solutions for pathfinding.
    A grid based solution and a way point solution. The project is based on a highly optimized
    algorithm that is the basis for both solutions.

    Overall features:
    - Fast implementation
    - C# delegate queuing system to keep game performance at a high FPS.
    - Really easy setup!

    Grid-based solution features:
    - Auto-generates map. (work with procedural generated levels)
    - Choose your own tile-size!
    - Choose climb limit and max fall down height.
    - Tag list: ignore dynamic objects or make some static objects non-walkable when map is built.
    - Dynamically change of grid based map at run-time!
    - Support for 2D game sin the XY plane!! NEW

    Waypoint-based solution features:
    - Design the system exactly as you want in the editor.
    - Can limit waypoint connections to one direction (want to fall down but no go up?).
    - Choose to only follow waypoints or go to the exact end position.
    - Tag list: if end position equals a disallowed tag, go to nearest waypoint.
    - Works with different "levels" such as houses with multiple floors.

    JavaScript/UnityScript support now added!:

    Tutorial video:



    The system is so far tested on PC/Mac standalone, Web Player Android Basic.
    A tutorial / documentation PDF can be found at (soon to be updated):Tutorial/documentation

    Tested and works with Unity 3.5 and 4.0!

    Get both solutions for: 20$

    To be released:

    Version 1.03:
    1. Updated inspector GUI.
    2. Improvement to memory management.
    3. Improvement to the way-point systems exact position method.
    4. New tutorial video.

    For the upcoming update, a video showing the possibility of changing the
    grid based map dynamically:



    The demo showcases the new possibilities of changing the grid at runtime! (Coming with next update)
    It is a TowerDefence (TD) (quickly made) demo showing some of the possibilities with these changes.
    In the TD, the map is updated when a tower is placed on the map, and we check to see if a path is still available – if not we remove the tower again so we always have a path for the enemies:




    - BFGames
     
    Last edited: Apr 8, 2013
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Tested on android now! On the new LG Nexus 4:

    On a 15000 Node map having 10 units calling 5 paths randomly every second (50 paths calls per second) i got an avg FPS of 45 so far.

     
    Last edited: Jan 17, 2013
  3. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Finished a 12 page Tutorial / Documentation: TUTORIAL/DOCUMENTATION

    Next up is:
    Video tutorial / show off.
     
  4. RazorCut

    RazorCut

    Joined:
    May 7, 2009
    Posts:
    393
    What's the advantages over the other A* solutions on the store? Obviously the price! :)
     
  5. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    The price is the biggest ofcause.
    It is aimed at low budget productions (though it can be used for all).

    Furthermore the waypoint based version works with "levels" - like houses with several floors and such. Not all solutions on the asset store that works that way. The grid based solution works with procedural generated maps, which is also not the case with all that are on the asset store. Here you get both solutions for 10$.

    A video showing these features will be up very soon!
     
  6. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Shows a more complex setup of the waypoint system in a house and how it can work with different height levels/floors:



    And a more simple setup that in my case worked just as well:



    Making scenes for the video at the moment.
     
  7. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Showcase / tutorial level for the grid based approach is finished!

     
  8. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Updated the thread - try the new web players!
    Most is done now, only need to fix a few minor bugs and create a tutorial video.

    Hopefully it will be submitted next week! ;-)

    - BFGames.
     
  9. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Update:

    1. Fixed a bug in the grid based system, such that if you try to go to a disallowed position in the grid based system it will search for the nearest allowed node.

    2. Tested the limit of the grid based system - 1.000.000 nodes. Then the 2D C# array cannot handle anymore (memory issue). But with 1.000.000 nodes i still had excellent performance (though creating the map takes a few seconds longer) .



    3. Made the possibility in the way-point system to choose whether to go to the exact end position or the nearest way-point to the end position. In this way the system can also be used to control AI patrols paths (dont need to connect all nodes anyways).

    The video tutorial will be shot tomorrow and the documentation updated. Then the system will then be submitted Sunday hopefully.

    - BFGames :cool:
     
  10. Sir-Tiddlesworth

    Sir-Tiddlesworth

    Joined:
    Oct 19, 2011
    Posts:
    908
    Expect to get $10 from me in the future.
     
  11. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Awesome!
     
  12. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Submitted to the assetstore now!

    Thread updated with a tutorial video!
     
  13. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Can Simply A* be setup to use custom coded navigation systems such as Ladders and Teleporters? Also, the ability to Jump?
     
  14. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    I have not tried it, but i am pretty sure it will be possible with the way-point based system. I might try creating a scene for that purpose, as it is quite interesting. It will at least be very possible to implement a teleporter option into the way-point system. It is written down now and will be a future update!



    However i am not sure what you mean by the ability to jump? Just normal jumping while following a path? Sure then you just need to do some sort of height check when comparing to the path.
    It is on purpose that the system is created such that it will just return a Vector3 list. This gives developers all the possibilities they need to fit it into their projects.
     
    Last edited: Jan 13, 2013
  15. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thanks for quick response. I'll purchase when this becomes available on Asset store.

    Regarding jumping. What I meant was, the ability to path find by jumping over obstacles or between items. eg: Jumping on crates, jumping between buildings etc. As you mention in your response, a height check would allow you to find a path via jumping up/down on items.

    I don't know anything about path finding, but I expect jumping between items would need a trajectory calculation to determine if path is possible. This would need to be directional. As you could jump further if the landing was lower than the launch location.
     
  16. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Ah then jumping is quite possible, with both solutions as they both work with height. You could just check if the path node is > (bigger) then some Y value while still being close to the path nodes x and z coordinate, if that's the case perform a jump in that direction.

    I am glad to hear you will buy it! And if you got a certain request for a project just ask. Then i can maybe help with some coding snippets and create more tutorial scenes for the project.
     
  17. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Im proud to announce that Simply A* has been accepted to Unity's asset store:

    Assetstore link!

    To be released next:

    Version 1.01:
    1. Update the inspector GUI.
    2. Improvement to memory management.
    3. Improvement to the way-point systems exact position method.
    4. New tutorial video.
    5. New improved grid based tutorial scene
     
    Last edited: Jan 18, 2013
  18. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Working on adding the possibility of dynamically changing the grid based map in runtime with basic colliders. Will create and add a TD scene to the project, showing how it would work with TD games as an example.
     
  19. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    For the upcoming update, a video showing the possibility of changing the
    grid based map dynamically:



    It is fast for smaller objects like in the video, but for larger objects i would not suggest updating it too often. (They update every frame in this video at 60 FPS).
    It will work with most basic shapes! However if something like a fallen tree needs to work in game it will be an idea to put the dynamic script on two parts; the tree crown and the log.

    It will work really well with TD games, as you can let players build exactly as they want without having a route pre-planned.
     
    Last edited: Jan 23, 2013
  20. meta87

    meta87

    Joined:
    Dec 31, 2012
    Posts:
    254
    This looks great! Can you tell me how hard it would be to use this for a 2d platformer game? I have tried to setup a few of the other A* pathfinding solutions on the asset store and found it too difficult to get them working properly. Basically looking to have enemies that can jump from here to there when chasing the player. Thanks.
     
  21. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    It is not that normal to use astar for 2d platformers. However with the waypoint system it might be very possible!

    Might have time to create a small example this weekend of how it would work if you want me to?
     
  22. meta87

    meta87

    Joined:
    Dec 31, 2012
    Posts:
    254
    That would be awesome! Please do if you have the chance.
     
  23. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Sure will code one on Sunday, and then post a video of it!
     
  24. cel

    cel

    Joined:
    Feb 15, 2011
    Posts:
    46
    this looks great... any chance of the developer providing actions for playmaker?? nad then you'll definetly have a customer...
     
  25. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    I have a long list of things i would like to do at the moment, so not right now. However when i finish of the list i might look into that. Seems like a good idea!
     
  26. cel

    cel

    Joined:
    Feb 15, 2011
    Posts:
    46
    also... any chance of having curved lines in the waypoints?
     
  27. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Nope, that is not how the system works. However you could just calculate curved lines using a spline curve between points.
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds pretty cool. I'm currently using the free Aron Granberg A* which works for us right now. We may check this out though next time we need something. Excellent price!
     
  29. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Thanks a lot! At that time it probably became a lot better, pushing out a bigger update in a week or two.
     
  30. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Sorry been really busy on other projects so haven't had time to setup the plat-former scene, however thinking about i can come up with 3-4 approaches that would be easier to use for this sort of interaction instead of using the Astar. PM me if you want some hints.
     
  31. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    @BFGames - Thank you for making an awesome and cheap path finding solution!

    Going to purchase it as soon as I can.
     
  32. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Thank you!

    I actually started the project as a part of a school project, so thought i might as well put it up for all in need of it, was never meant to make a lot of money for it.
    Just wanted to get a bit for the extra work that are going into updates and maintenance.

    That being said, i am really looking forward to putting up the new update, which will allow to change the grid based map runtime!
     
  33. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    The demo showcases the new possibilities of changing the grid at runtime! (Coming with next update)
    It is a TowerDefence (TD) (quickly made) demo showing some of the possibilities with these changes.
    In the TD, the map is updated when a tower is placed on the map, and we check to see if a path is still available – if not we remove the tower again so we always have a path for the enemies:

     
  34. terrypaton1

    terrypaton1

    Joined:
    Oct 25, 2012
    Posts:
    5
    Hi there, this looks great! I bought the plugin without properly reading that the dynamic changing of the grid isn't available yet. I'm working on a TD game (http://pixelpaton.com/?p=5631) where I am currently using NavMesh … but looking at making it a more dynamic map system.
    Any clues as to when you will be ready to release 1.01?
     
    Last edited: Feb 4, 2013
  35. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Thank for your interest in the product first and foremost.

    I am not completely ready with the update. However! as the dynamic changes are ready and most of the TD test scene is done, i could just divide the update into two pieces.

    So let me finish the scene and documentation tomorrow, and then i will submit it to unity tomorrow evening. Then it should be up before the weekend!

    ;)
     
  36. terrypaton1

    terrypaton1

    Joined:
    Oct 25, 2012
    Posts:
    5
    Awesome, thanks very much. I'm implementing the current version right now, think i might've found a problem with how a mesh is being processed, though I'll wait for your update and implement that before going into that further.

    Another question … pathfinding seems to be allowed for diagonals … is there anyway to turn this off? My enemies are taking shortcuts and my current work around is to make the pathfinding grid coarser :S
     
  37. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    The grid is created with ray-casting. Yes they are allowed to move diagonal. I can however send you a script where they are not!
     
  38. terrypaton1

    terrypaton1

    Joined:
    Oct 25, 2012
    Posts:
    5
    Ahhh raycasting ok … I'm actually seeing some grid elements be placed in the opposite vertical position to where they should be. I'll investigate further though before going into any detail.

    And yeah that'd be great, nasty alien enemies are not allowed to cheat!
    By the way when I do another update on my blog I'll give your plugin a shoutout ;)
     
  39. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    If you find something strange please PM med with screenshot and i take a look at it.
     
  40. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Version 1.01 is submitted now!

    It includes:
    - The ability to change the grid based map dynamically at runtime.
    - New test scene, showing of the dynamic changes with a small TD scene! (TRY IT HERE: TD WEBPLAYER)
    - Updated the documentation.
    - The possibility to NOT move diagonal using the grid based map :D

    Now we just have to wait for Unity to accept it, and you should be good to go.
     
    Last edited: Feb 5, 2013
  41. terrypaton1

    terrypaton1

    Joined:
    Oct 25, 2012
    Posts:
    5
    AWESOME, thanks a lot.
    I'll let you know about the possible bug once I work on the game some more and establish exactly what's happening.
     
  42. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Does it work with big terrains?
    It is written in C#, but is it compatible with javascript projects?

    Thanks
     
    Last edited: Feb 6, 2013
  43. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    It work with big terrains. However the grid based map array is limited at 1000x1000 tiles (one million tiles) - but you can change the tile size, but might make it more unprecise.

    The way point system also work with big terrains, and i cannot imagine a world where you would reach the array list limit for this system.
    But it really depend on your needs.

    Actually i never tested it with JS, but should work. I will try and create a test JS and see if it works - then come back with an answer on that.
     
  44. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Found a map raycast creation bug! Also found a fix, will be updated as soon as possible!
     
  45. cristims

    cristims

    Joined:
    Dec 21, 2012
    Posts:
    24
    Hello.

    I just bought your product, and I am quite happy with it. Nice, clear, simple, overall a super great buy.

    Now I may have couple of suggestions for your future updates:
    - rotate towards the moving direction (a checkbox that will allow the unit to turn towards the movement direction)
    - javascript calling (create another script that must be used to connect any javascript to the pathfinder. Instead of messing the entire pathfinder, just convert the pathFound structure into an array or something similar and send it back to the javascript caller function).
    - add a checkbox for diagonal movement on/off.... quite a must for most turnbased games

    that is for now...
    I work on it to make it compatible with the rest of my javascripts, and I must admit that deep inside I hate C#.... and I hope that you can make the javascript calling compatibility faster than me and better than my messy code.


    Thanks for the product, overall is a great great buy, way simpler to use and understand that the bigger pathfinding systems that are out there now.

    (sorry for my english, not native).
     
  46. SimtropBuggi

    SimtropBuggi

    Joined:
    Feb 15, 2013
    Posts:
    98
    How efficient is it? I'm working on a city builder game and need to calculate hundreds of path's as people 'move' into the city and find jobs. Also I need to move agents around (police cars and such) and they would need their own pathfinding.

    The path's would have to be based not on distance but time. A congested road would cost more time and be less attractive.

    Obviously the waypoint system would be roads. Can your system process timecost on nodes AND links? Can the node network be updated at runtime? I've always assumed I'd have to roll my own A* pathfinder for my project. But hey, if your solution can be adapted it would save me a ton of work.
     
  47. endupgaming

    endupgaming

    Joined:
    Mar 12, 2012
    Posts:
    57
    Hi

    This is looking really good. How would it work with an elevator, if I had two floors with an elevator, that has a button and doors, so there is a delay, waiting for the elevator to arrive, doors open, enter the elevator, elevator goes up or down, doors open and then the NPC exits to the next node. Is something like this possible?

    Can I add attributes to a node that allows me to put extra information about the environment?

    Cheers
     
  48. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Thanks for your buy and comments!

    1. Rotating towards the "path" is not really a part of the pathfinding. However i can create a demo script that shows how to do it (or can simply be used).

    2. Javascript is something i am looking into, however it is not that easy. You simply cannot call a C# script from javascript - and i am using C# delegates for queuing. But i would really like it to work with javascript so i am trying to find the best possible solution for that at the moment.

    3. A checkbox for moving diagonal IS already in the latest updates! ;)
     
    Last edited: Feb 18, 2013
  49. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    1. It is quite efficient. But how often will you calculate each path? If you will calculate 100's paths each frame then you might be in trouble, but that will happen with more or less all pathfinding systems. It also depends on how long/difficult the paths are, what platform your aiming at (mobile? PC?) and so on.

    2. Well time-cost heuristics is not a part of this project, as it is a very specific requirement that will not make sense in most games. For the grid based solution it will not make sense, but could be added to the way point solution as the full source code is available, i do not think it would take so much time to do that (Depending on your programming experience of cause).

    3. You can use the grid based and the way-point based solutions at the same time yes. And the grid based solution CAN be changed at runtime! it is in the new update, but i would not recommend changing a lot of objects all the time, then ii will get heavy. But if it is just adding fallen trees to the road or roadblocks being placed then it is no problem doing that runtime. The way-point solution can however not be changed at runtime.

    If my solution will save you time i can truly not say - it sounds very specific and quite advanced what you need.
     
  50. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Is it possible? Yes! Is it part of this project? no.
    The idea of this project is to create a simple pathfinding route, and then it is up to the user to do what they want with that route. ;-)

    I would however be possible to add this to the way point system, but not the grid-based system. But would take some work. (I mean it would be possible to simply activate/deactivate some triggers when a door is open/elevator available, which would tell the AI to move further or not)