Search Unity

RAIN{indie} Free, Powerful, AI Engine -- Released

Discussion in 'Assets and Asset Store' started by RT_Jester, Jan 25, 2013.

  1. khellstr

    khellstr

    Joined:
    Feb 16, 2012
    Posts:
    72
    Hi

    First of all, thanks for FFS*

    How to use waypoints only when AI can't see target he is moving towards?

    I'm using waypoints pathfinding to move my "Hero". Here is demo I got up yesterday, so you understand what I'm trying to achieve: Build Run (working title | Tower defence, RTS, arena fighter). Left mouse to move camera, Right Mouse to move "hero". ( I had to upload it to kongregate becouse it seems dropBox does not host html files anymore:( )

    Hero has detection and move behaviors that detects a waypoint and moves there. Waypoint is not RAIN waypoint, just a gamebject that has right properties, so hero can move towards it. When you use right click, waypoint will be moved where it clikced.
    I have also RAIN waypoints for path finding purpose. My problem is that Hero seems to go always trough waypoints, even if he has straight line(sight) to target where he is moving. I think he takes closest path waypoint, goes there and then to waypoint gameObject that was moved by mouse.

    I would like Hero AI first check if he can go straight to the target (raycast). If not, then Hero AI should check shortest path to target. Then find waypoint on path that he can see and has shortest route to target. Then go towards that waypoint.

    Can I do this with behavior manager or should I write own script for that?
    ( I think it would be some loop that checks shortest paths waypoints from target to hero. Does a raycast in with every waypoint, and first waypoint where Hero is able to go will be hes target )

    *Fantastic Free Assets
     
  2. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147
    So I was able to integrate some basic OA that prevents my ai from flying under ground, but I am still having a terrible problem with performance. I am getting around ~18fps on my iphone 5 with only 5 agents on the screen. attached is a screenshot of the BT. There isn't anything major going on here, I can't imagine that it is this could be so heavy. Please, any help would be greatly appreciated.

    EDIT: As others seem to have said before, it looks to have something to do with the sensor or expanding box component. If I turn off that script it get a much better frame rate. Looks like I may have to roll my own here as well.
     

    Attached Files:

    Last edited: Sep 15, 2013
  3. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    300
    Hi, many thanks for Rain Indie I've been learning to use it the last few days
    Though I'm stuck at this exact same issue MakeShiftWings had. I saw it on the Rain forum as well. Is there any way that you could give us a screenshot with some notes written on or a diagram of exactly how to set this up properly? I understand it has to do with entering a condition on top that can break a cycle if false but I think I would have to see it to fully understand. I cant seem to break the Patrol cycle and chase me when I get close until it reaches the end and changes colors.
    Thanks Again


    Edit: Never-mind I think I've got it sorted out now (though I'm still not exactly sure how) Still learning about the BT tool
     

    Attached Files:

    Last edited: Sep 17, 2013
  4. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    @rtheprince: Any chance you can send us a project with your setup? If states are changing, it suggests that your raycast sensors may not be picking up the player (that's a test you seem to be doing before calling Move). If we can look at a project, we can probably find the issue quickly.
     
  5. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    @n8 - Obstacle avoidance is really not great in RAIN{indie}. Even if it were, though, You probably don't want to set your waypoints up so that they go through mountains or the ground. Add extra waypoints to help the AI go around large fixed obstacles. Outside of that, we've got some examples on the Rival Theory website that show how to add custom obstacle avoidance to your movement.

    As far as framerate, the biggest culprit is usually Sensors. The best way to tune those for performance is to put Sensors into their own layer, and then manage which other layers they can collide with. Make sure sensors don't collide with sensors. These issues go away, btw, in our upcoming release. Our Fall Release doesn't use the collider system for sensors, and the entire package has far better performance.
     
  6. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    @khellstr You can accomplish what you want by using custom actions. You will essentially want to do your check, then turn on or off waypoint pathfinding. To turn it on/off, you can grab the agent.PathManager, cast it to RAINPathManager, set useWaypointCollection to true/false, then call ReInit() on the path manager.
     
  7. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147
    ah thank you for you advice. I have already ditched your sensor system and rolled my own simplistic sensor. I look forward to the fall release sounds like you have been hard at work!
     
  8. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    Hello

    Before I download this package, I 'm interested in a couple of things, because my position is a bit more unique.
    I have a project which is almost finished. I use the FantasyAI in in my project, but I'm not satisfied with the support and how it behaves.

    1. How easy I can just add my non-mechanim animations to RAIN?
    2. All I need is an AI that can handle about 50 units (maximum) at the same time. Is it performance wise possible with RAIN?
    3. Is there a problem if some units are blocking the LoS for other units behind them?
    4. Can I have control over my units? Like attack range, damage, attack speed, health? Does RAIN support that?
    5. How does the AI handle the enemy and friendly lists? (basically a system based on teams)
    6. How does it handle destroying units and remove from enemy or friendly lists?

    Thank you and I'm sorry if there are a lot of questions :D
     
  9. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    1) Pretty easy. You can control movement animations and other animations through the RAIN Behavior Tree system. In fact, we will be posting a new version late today from our website that includes improved animation blending support.

    2) Depends. 50 AI calculating paths and playing animations simultaneously may be possible, but it will be tough. 50 AI using simple movement, small behavior trees, and animations - maybe. If you are also running sensors and processing a lot of collisions (including those through the Sensor system) you probably won't get the performance you want. Our Fall Release, coming this October, has significantly improved performance and would have a much better shot at achieving it.

    3) Not sure what you are asking here? For sensor visibility? For pathfinding? Avoidance? This isn't a problem with sensors, nor with straight up pathfinding. You might run into trouble with avoidance (we don't support RVO or other large scale multi-unit avoidance)

    4) The RAIN memory system and behavior tree system allow a lot of flexibility for sharing information between AI decision making and the rest of your game logic, so yet.

    5) Usually this is done using Sensors and Aspects. You can use Aspects to tag features onto game objects, then use Sensors to detect those features. You might tag an enemy as "Team A" using an Aspect. Then you could use a "Team" sensor to detect it.

    6) It doesn't handle destroying units on its own. RAIN{indie} is a framework for building what you want, but it doesn't include logic for any particular game type. Managing enemy lists, object lifetime, and cleanup are all common and no-too-hard tasks for your game logic to accomplish. RAIN{indie} won't get in the way of that.

    Hope that helps
     
  10. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Hi, I recently tried this out and had a simple AI working for a while, but after adding a navigation grid I can't get the darn thing to move at all. It still rotates according to the look target variable in the Behavior Tree but the movement has ceased altogether and now my ai simply faces his target and walks in place. I have remade it from scratch , triple checked my spelling and tried a basic cube with the nav grid and can't shake this result. Any idea what I've done wrong?
     
    Last edited: Sep 26, 2013
  11. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    Thank you very much for the detail answer. It looks like a solid AI system and I'm amazed that it is free.
    I will start playing with it right away!
     
  12. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello mikezenox,

    Sounds like the AI can't create a path to the target. Is the AI on the Grid? Is the Target? Are either one creating holes in the NavGrid?

    Let us know!

    -Jester
     
  13. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Yes both objects are relatively close together. I didn't see any 'holes' in the recast mesh either if that's what you mean.

    It does the same thing with waypoints as well.
     
    Last edited: Sep 29, 2013
  14. Bionicle_fanatic

    Bionicle_fanatic

    Joined:
    Jun 8, 2013
    Posts:
    368
    Hi everyone, I just got RAIN indie today and.... I really have no idea how to use it. It didn't have a readme text file or any instructions inside the file. Does anyone know how to get me started with it?
     
  15. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Guess reading the info in the forums is out of the clue? Or the videos on the website for them? Youtube has a bunch of videos which are all listed in this thread and on their site.
    Might be a good thing to look at their forums. Has a ton of info and a while faq and wiki dedicated to their product.
     
  16. SquidHorse

    SquidHorse

    Joined:
    May 26, 2013
    Posts:
    11
    Hey guys,

    Just had a simple question, I have done some of my own research beforehand and am leaning towards waypoints but I would prefer getting some additional feedback before diving head on into this.

    I am an indie developer making an FPS/RPG hybrid. My environments will be mostly open terrain (think Skyrim or Far Cry) with certain encampments where the enemies will spawn. I am wondering whether it would be smarter to use waypoints or a nav grid. Also, if using waypoints do I have to set them literally all over the terrain so that when the player is running from an enemy they follow them along those waypoints or should i switch over to nav grids at certain points?

    Thanks for the help guys, really appreciate it!
     
  17. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @mikezenox is there any way you could send us a sample project so we can take a look? Email jester[at]rivaltheory[dot]com

    Thanks!

    -Jester
     
  18. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    I would use the new version of RAIN coming this month, with both NavMesh and waypoints. The waypoints can provide high level pathfinding information so your AI generally follow a reasonable path. The NavMesh will keep you away from static obstacles and in walikable areas. For example, you might place waypoints along roads or across bridges to help the AI choose the best, most realistic routes.
     
  19. SquidHorse

    SquidHorse

    Joined:
    May 26, 2013
    Posts:
    11
    Thanks for the response Prime, that sounds pretty awesome, will be impatiently waiting it's release! :)
     
  20. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community,

    The Fall release of RAIN will soon be upon us!!! Here is the first public look at one of the many great new RAIN features:

    Visual Behavior Tree Debugging [1:49]



    Mini-Bonus: This video also shows off some of the new UI!!

    We have been getting excellent feedback from our Beta testers over the past few weeks, and are excited to share with you the new developments in a series of Sneak Peeks.

    NEXT SNEAK PEEK: Revamped Audio sensor detection. Give your AI the ability to realistically react to sounds in their environment- like footsteps of the enemy in a stealth game, rusting bushes from awaiting prey, and explosions during a battle.

    Let us know what you think and share with your friends!!

    Follow, subscribe, and like us for more Sneak Peeks.

    http://bit.ly/1bATrZV

    Thanks again,

    -Jester
     
  21. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    oh boy oh boy oh boy.... I need it !! I must have it Jester !!!!!!!

    Visual Behavior Tree Debugging!!! AWESOME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I MUST HAVE IT !!!!!!!!!!!!!!!!!!!!!!!!!!!!! MR JESTER !!!!!!!!!!!!!!!!!!!!!!!
     
  22. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    It looks intense. Can't wait for it to come out.
     
  23. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    It looks very good.. Visual Behavior Tree is amazing


    I wonder Rain Indie's Roadmap

    In the future Is Rain indie like a Playmaker? is Rain indie as easy as Playemaker?

    If Rain indie is easy to use, like a Playmaker .. It is a true innovation Since the development of a unity ^^;;
     
  24. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hahaha! This is a great comment MoHoe!

    We are pushing out a new promo in a few days! If you're not on the newsletter list, get on it!

    Newsletter signup! http://rivaltheory.com/newslettersignup/

    Thanks again for the kind words. :)

    Best,
    Jester
     
  25. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks for the feedback! We have worked really hard to make this the most powerful AI engine available in digital entertainment! It's support from you and the other Unity community members that really makes it worth it. :)

    Thanks for the comment and kind words, thedreamer,

    The intent of RAIN to be extremely intuitive and powerful. Our end goal is to give the user the ability to hop into a scene and quickly get an AI to move across the terrain showing behavior. Simple and powerful, all without needing to code.

    When it comes to plug-ins like PlayMaker we want the user to have the ability to use any plug-in they wish in conjunction with RAIN in convenient and efficient ways.

    I hope this answers your questions!

    Let me know if you have any more.

    Best,
    Jester
     
  26. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Unity!

    In this sneak peek we're showing off RAIN's Revamped Audio sensor. It gives your AI the ability to realistically react to sounds in their environment-- like footsteps of the enemy in a stealth game, rusting bushes from awaiting prey, and explosions during a battle!

    Audio Sensors [3:31]




    PREVIOUS SNEAK PEEK:
    In case you missed it!
    Visual Behavior Tree Debugging [1:49]



    NEXT SNEAK PEEK:
    New Waypoint System and Detailed User Interface.

    Be one of the first to know when RAIN is launched my signing up for our newsletter!

    http://rivaltheory.com/newslettersignup/

    Let us know what you think!

    Best,
    Jester
     
    Last edited: Oct 8, 2013
  27. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Hi, I'm the guy who couldn't get my ai to move via navigation grid. My project is rather large to send, and I've actually gotten the AI and navigation grid to work with just the player and the AI, but when I add another object I try to make the AI sense when the player isn't around, the AI walks in place. All objects are on the grid and I don't see any holes. I understand if you aren't sure because of my lack of information, but any direction would be helpful.
     
  28. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hey mikezenox,

    No worries on the size of your project, just send us your BT XML file and we can take a look at that. We suspect it's a BT issue.

    Let me know what you think!

    Best,
    Jester
     
  29. DarkMaukka

    DarkMaukka

    Joined:
    Oct 27, 2012
    Posts:
    5
    Hi!

    I would like to know if RAIN{indie} should work with recast navigation for 2D games that are using xy orientation. Is there any examples available for 2D games that are using recasting.

    I don't have a "floor" since I am developing a space shooter. I was able to make the basic follow and attack ai to work, but I have problems with obstacle avoidance with my set up. Any help would be highly appreciated, since I think RAIN{indie} would be a good solution to our game.

    If I can't make this recast thing to work are there any other solutions for basic racing and chasing ai for 2D space shooters that could work with RAIN{indie}?

    -Markus
     
  30. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    The New RAIN.

    $RAIN-has-arrived-e1382475581735-1024x315.png


    ...and it is awesome! The extensive list of new features and upgrades, makes this the largest update in Rival Theory’s history. Whoa! We cannot wait for you to get your hands on the new RAIN.

    Check out some of the new features we have added to RAIN.

    Beautifully Integrated UI
    Integrated Waypoint System
    Visual Behavior Tree Debugging
    Automatic Navigation Mesh Generation
    Modular Architecture for Extendable 3rd Party Assets
    Built in Support for Locomotion, Animation, and IK via Mecanim
    FULL LIST HERE


    With downloads approaching 100,000 our community is bigger than ever. We created a brand new Community Portal that has everything you need all in one place. As requested, we added brand new support resources like integrated tooltips for every RAIN component, updated wiki documentation, new tutorials, Q A forum, and dedicated email support. So you can learn RAIN the way that best suits you.

    There are two separate versions of RAIN to download. Please follow the instructions to make sure you get the version that's right for your project-- downloading the wrong package can severely affect your project.

    Thank you all so much for being a part of our community. We started developing AI tools for Unity over 3 years ago, and it's because of you that we are still here today.

    Thanks from me, Jester, and from all of us at the Rival Theory Team.

    Download the New RAIN
     
  31. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    320
    Looks great, Jester! Been waiting for this for quite a while.

    I'm sure many questions will follow.
     
  32. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    We're all ears!

    Let us know what you think!

    Best,
    Jester
     
  33. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    New Rain Looks Awesome with all the new features !!!

    Couldn't find the tutorials/sample projects with new rain,as it will be helpful for a newbie like me :p
    Also will the new RAIN be able to handle 20-30 AI running simultaneously on mobile devices in a 2D/2.5D type of game?
     
  34. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks for posting this. We have API docs, most of our wiki, and an upgrade tut all finished.

    That can be found here. http://rivaltheory.com/community/

    As we speak we're working on a Quick Start tutorial that will get RAIN in your project and AI moving/chasing one another in less than 15 mins. For the latest info, follow us on Twitter or Facebook.

    Talk to you soon!

    Best,
    Jester
     
  35. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  36. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    i have small question - its support flying character AI (and "sky pathinding", patrol route etc.) or i must write extension with flying support for myself ? like helicopter operator and so on

    thanks in advance
     
    Last edited: Oct 24, 2013
  37. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    oh man this is so awesome!!

    Fun, efficient, neat and tidy way to make AI's within Unity !!

    creme da la creme AI system for Unity.

    And well done Prime with the tutorial, nice job indeed.

    I thank all of you guys for creating this masterpiece for us all to use. I feel that I should at least sacrifice a small animal or give you my sister as a token of my appreciation , but there's no small animals around where I live and I've already given away all my sisters to some other chaps.
    I will think of something to show my appreciation.
     
  38. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    You're welcome MoHoe! Thanks for all the awesome comments, it's always fun to share them around the office! :)

    In light of having no small animals or sisters around, you could show us your appreciation by creating an awesome project!

    Thanks again!

    Best,
    Jester
     
  39. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    @Breyer Although RAIN is geared toward character AI, it should be possible to create flying characters like you want moving in 3D. That includes use of the new Waypoint Route system and the Waypoint Network. If you do run into any trouble. RAIN makes it easy to enhance or swap out individual components.
     
  40. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Are these still upcoming features? Is there any support for runtime navmesh creation (procedurally generated terrain and such) in the new update?
     
  41. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    320
    Tried the tutorial but must have missed something. WhiteRobot moves to the nearest waypoint (he will go to different ones depending on where he is placed) on the route, then just stands there. Movespeed works correctly but the AI won't patrol.

    * root is set to parallel
    * waypointpatrol is repeat:never (repeat:forever makes no difference)
    * move is repeat:forever

    Any ideas?
     
  42. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    is RAIN free?
     
  43. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    320
  44. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Fuzzy_Slippers!

    Technically you can create a nav mesh at runtime, we just don't officially support it (yet), and it may not be fast enough for people... Basically we intend for it to be usable at runtime, we just haven't done enough testing to make sure it's up to our standards.

    Thanks!

    Best,
    Jester
     
  45. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    hello jester
    just trying out the new rain seems a great upgrade :)
    however how do i get the speed of the ai and apply it in the "mecanim set parameter node"this was really easy in the previous version but i cant seem to get it to work in the new version
    tnx in advance
     
  46. rtheprince

    rtheprince

    Joined:
    May 28, 2013
    Posts:
    25
    Sorry for the late response. Where should i send the project to? Or a better question how should i get the project to you? It is rather large.
     
  47. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    If you can strip it down as much as possible that would help. Send it to jester[at]rivaltheory[dot]com via dropbox or other file share.

    Let me know if you have any issues!

    Best,
    Jester
     
  48. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    I suspect you want to do this using a MecanimMotor rather than through a behavior tree node. The MecanimMotor gives a bunch of values that can be set into Mecanim Parameters, including speed, turn angle, normalized velocities, rotations, etc.

    I just checked our wiki and noticed that the MecanimMotor page is not yet filled out. I'll see if I can get to it today or this weekend so you can see what the parameters do in more detail.
     
  49. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello everyone! We just released the newest update for RAIN.

    Release notes RAIN 2.0.6 patch update:

    Added missing LineOfSight property accessors to Visual Sensor
    API changes to RAINNavigator to do a better job of checking OnGraph
    Changes to AI Memory to remove virtual generic methods that were causing issues on IOS
    Fixed BT Editor node dragging crash
    Fixed issues with Mecanim IK/Animation
    Added API methods to Motor for detecting whether you are at/facing a target
    RAIN now compiles for Windows 8 Phone/App Store
    RAIN now runs correctly on iOS
    Fixed Mecanim animation states
    Fixed issues with Waypoint Graphs not working properly
    Fixed issues with Priority nodes not working correctly

    To get the newest version go to the RAIN menu in your project and click "Check for Updates" then follow the directions. Unless you have automatic updates in which case you will get an announcement that an update is ready.

    Let me know if you have any questions/concerns.

    Best,
    Jester
     
  50. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Does sentio come with rain? And what is it exactly? What the difference between that and rain?