Search Unity

RAIN Artificial Intelligence (AI) Engine v2.1 More Powerful, Still Free

Discussion in 'Assets and Asset Store' started by RT_Jester, Aug 15, 2014.

  1. inas

    inas

    Joined:
    Aug 2, 2013
    Posts:
    47
    @{RT}_Jester Great! i cant wait to try off mesh link and stitching in order to add procedurally prefab based rooms :)
     
    Gekigengar and RT_Jester like this.
  2. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    It wouldn't take much. You would need to do a bit and make a custom motor or custom navigator to bypass our navigation.

    I hope this helps.
     
  3. daeuk

    daeuk

    Joined:
    Mar 3, 2013
    Posts:
    67
    is dynamic obstacle avoidance available already?
     
    RT_Jester likes this.
  4. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Throwing some more ideas out there... What about having the AI work in factions independent from player control? Such as this scenario:

    AI group A (terrorists) and AI group B (mercenaries) attack each other on sight. Terrorists attack the player but mercenaries do not attack the player. AI group C (militia) attack mercenaries but no one else.

    Then, if you have a squad of teammates, they will automatically engage hostile units (terrorists), but perhaps you could also order them to attack non-hostile units (militia and mercenaries).

    I'm assuming such a scenario is not available out-of-the-box but can be set up with (hopefully not too much) work? Thanks again
     
  5. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    We're getting very close to a version of this feature that's up to our quality standards.
     
  6. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes, this scenario is completely possible. Squad Command already has all the components you'll need to set it up and tweak the behavior to your liking.
     
    eridani likes this.
  7. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    I think Squad Command is for FPS Game...
    Do you have plan to make RPG AI PACK Or Action Game AI Pack? Or Racing Game AI Pack??
     
    eridani likes this.
  8. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Yeah I notice there's a shortage of vehicle combat AI (cars with guns, tanks) in the marketplace. I wonder why that is.
     
    RT_Jester likes this.
  9. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Absolutely. The level of success of Squad Command will influence our future projects-- so any feedback you give us will be helpful.

    Let us know what you want to see and I will take into consideration all suggestions. If there is enough interest I can put together a Trello board for suggestions and voting on future AI packs.
     
  10. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Vehicle AI has it own set of challenges but we were messing around and created a custom motor that allowed us to control vehicles in RAIN.

    Check it out: http://rivaltheory.com/forums/topic/just-for-fun-vehicles-in-rain/

    Let me know what you think!
     
  11. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Is there any out-of-the-box functionality for enemy melee attacks? (knife, bayonet, rifle-butt, zombie swipes). Thanks as always
     
    RT_Jester likes this.
  12. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes, you would need to modify the attack range animation but it should take very little setting up.

    Let me know how it goes!
     
  13. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Squad Command Tutorials 1-4 are now live!

     
  14. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    I just started to watch the Squad Command Tutorials.. very nicely done. It is good to get more understanding of how to achieve things with RAIN.
     
    Tethys and RT_Jester like this.
  15. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hello, I just loaded up the basic scene that comes with the Rain 2.1 example, and I got this error within a few seconds of hitting play. I couldn't reproduce the error, but errors that can't be reproduced make me even more nervous, so hopefully you guys can determine what caused this (I made no modifications at all, I just hit play):

    NullReferenceException: Object reference not set to an instance of an object
    at RAIN.Motion.BasicMotor.UpdateMotionTransforms () [0x00000] in <filename unknown>:0
    at RAIN.Core.AI.Pre () [0x00000] in <filename unknown>:0
    at RAIN.Core.AIRig.AIUpdate () [0x00000] in <filename unknown>:0
    at RAIN.Core.AIRig.Update () [0x00000] in <filename unknown>:0
     
    RT_Jester likes this.
  16. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Also, can you point me to a tutorial on how to write a custom navigator? Thank you
     
  17. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Will dynamic obstacle avoidance prevent units from trying to walk through each other (or sometimes getting stuck trying to walk through each other, or two headed beasts like below)?

    warfighter.jpg
     
    Last edited: Dec 4, 2014
    RT_Jester likes this.
  18. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    If a behavior tree is modified (even during run mode), it seems the changes are instantly saved permanently, even if reloading the scene or restarting Unity without saving.

    Is there a way NOT to instantly save changes, so that it is allowed to "experiment" a bit without automatically saving all changes?

    Also, there is no undo functionality when working in behavior trees?

    Thank you!
     
    Last edited: Dec 3, 2014
    RT_Jester likes this.
  19. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    1.
    2.
    1) I tried RAIN Starter and RAIN Quick Start (if I find out what project I can test that instead), and could not replicate the error. The error is indicative of the AI Body being set to null, but we have a lot of catches for that so it is a little odd to see that outside of a very custom setup. We'll keep looking into it.

    2) Behavior trees are assets (not unlike the Mecanim state machines for instance) and because of that they are saved even when running. We are going to support a more robust undo/save setup in the future, but until then we recommend backing up or copying your trees when trying new things (we know this is not ideal).

    Let me know if this helps! Thanks again for all the questions :)
     
    Last edited: Dec 4, 2014
  20. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks for the question and screenshot! Also, congratulations on getting to the end of Squad Command. :)

    Dynamic obstacle avoidance is more of an environment navigation tool (falling walls, collapsing bridges, moving prefabs, etc.) for the AI. For that particular issue (the AI arriving at the same spot and staying there), I would not use any avoidance solution.

    I have a few questions on how you managed to get his behavior. Were the AI following you or did you find them like that? Were they in formation? Let me know, we have our harness rigged that the AI are not supposed to choose the same place to stand at the same time.

    Talk to you soon!
     
  21. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  22. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Sure, I will share my secret battle tactics honed through harsh years of video game combat.

    First of all, I set up an ambush by ordering my squadmates to take cover by the edge of the nearest buildings. I hung back until the enemy engaged, and then I moved forward to engage while simultaneously ordering my men to flank the enemy.

    Because of my superior marksmanship, I was able to eliminate most the tangos myself personally. My flanking men keep running all the way to the tower and promptly morphed into a two-headed ettin, and that's where I found them.

    To be honest, I was killed like 10 times before this tactic succeeded. The Warfighter AI puts up a good fight!
     
    RT_Jester likes this.
  23. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Think you might have missed this question... can you point me to a tutorial on how to write a custom navigator that works with other pathfinding (such as A* Pathfinding Project)? Thanks!

     
    RT_Jester likes this.
  24. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    EDIT: I found this but I cannot confirm that it's still valid http://arongranberg.com/vanillaforums/discussion/820/integration-with-rain-indie

    I have not seen one in a long time so I'm unsure where a relevant one would be. I would start on Aron's website and then ask around. http://arongranberg.com/astar/

    Let me know if this helps!
     
  25. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Awesome work on the AI starter kit. Really appreciate it. Still got to get the Squad Command asset you made.
     
  26. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    How do you suggest we handle not wanting units to walk right through each other during patrol? It would be nice if they walked around each other.
     
  27. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Thanks Jester, that does help. But the main reason I wanted to use A*Pathfinding Project was its extremely fast ability to generate runtime navigation of procedural terrain (boulders, buildings, obstacles, etc).

    But I just realized RAIN's dynamic navmesh generation is pretty fast and might make A*Pathfinding Project unnecessary for me. Question: will you guys be working on improving the speed and performance of the runtime navmesh generation further?

    Also, it might simply be even faster to have a pre-made navmesh with ai units that detect procedurally generated obstacles (using dynamic obstacle avoidance). Do you think dynamic obstacle avoidance will be ready anytime soon?

    Thanks very much as always!
     
    RT_Jester likes this.
  28. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    317
    Hey Rivaltheory! Even though my AI is rather basic, I've not been having much fun dealing with behavior trees and state machines for AI directly in my own code. So I took a look around for possible solutions and found RAIN. I really liked what I saw and am considering implementing it into my game in certain parts, but I had a couple questions regarding the project's future.

    I'm mostly concerned that utilizing a 3rd party tool into such an important part of the game functionality will end up causing a kink in my production if it becomes unsupported. It would be no easy feat to replace it once it's nailed in. RAIN is apparently free and I can't find any add-on purchases or donation pages on your site either. I was wondering how RAIN makes money for your talented team to keep it alive.

    What is your business model and is it proving sustainable to consider continued development for the next several years?

    Thanks for your time, and sorry if this has been asked before!
     
    RT_Jester and eridani like this.
  29. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    Hello,
    Can i use it also in a Space Shooter Game?
    And how is the performance on Mobile?
    many zhxxx
     
    Last edited: Dec 6, 2014
    RT_Jester likes this.
  30. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes, we are constantly working on the speed/efficiency of the nav mesh generation and yes dynamic obstacle avoidance will be available soon.
     
  31. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thank you for posting this. We do have add-ons that we sell. One is called Squad Command https://www.assetstore.unity3d.com/en/#!/content/23526

    We have been developing RAIN for the last 3 years and will continue to support it for the foreseeable future.

    I hope this answers your questions, let me know if you need more details.
     
  32. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes you can use RAIN in a space shooter game. Its performance on mobile is excellent. There is a lot of options for optimization with RAIN so it will certainly suit your needs.
     
  33. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    That last point is not the same as the others because that's the end of the game. We can put the change in that the AI treats that last point as it does the others.

    Thanks for posting this
     
  34. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Not yet but it will be available soon.
     
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Is it possible to alter the found path with a raycasting system ? Maybe use rain together with Breadcrumb AI or similar technique ?

    How would i grab the found path points in code ? Or override the motion imposed by the path when a dynamic obstacle is in the way ?

    I suppose one way would be to do local avoidance by disabling the Rain AI mover on the hero and re-enable after there is a good distance towards the next way point and away from the obstacle. This could cause some zig zag motion though and i am not sure if Rain would like disabling the agent and re-enabling it.

    Thanks
     
    RT_Jester likes this.
  36. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    I will wait till this is possible with RAIN.

    I saw the demos, and I really love how easy it is to create AIs using RAIN..!

    I am currently using a procedural dungeon system to create dungeon rooms.

    Run-time Navmesh creating, or Navmesh stitching is definitely a must have feature.

    Please inform us when this is done!
     
    RT_Jester likes this.
  37. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    I'm sorry for the late response, I must have missed it :(

    Yes, you can grab the path from the BasicNavigator (CurrentPath property) and modify it directly. You can also apply a new path using the same property. There are some particulars though. If you come to the forums we can give a better explanation. There is some new stuff in the next version that will help this as well.

    Let me know what you think!
     
  38. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    We certainly will!
     
  39. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    We're looking for people to check out a new type of AI Character before we release it to the public.

    If you're interested, email media@rivaltheory.com with "I'm interested in the AI Character focus group" in the subject line.

    For your time, we'll give you a copy of the Character to keep. :)

    Talk to you soon!
     
  40. cruising

    cruising

    Joined:
    Nov 22, 2013
    Posts:
    329
    What can i do to fix these errors?


    ActionTemplate_CS.cs(8,14): error CS0101: The namespace `global::' already contains a definition for `ActionTemplate_CS'

    ActionTemplate_BOO.boo(4,7): BCE0132: The namespace '' already contains a definition for 'ActionTemplate_BOO'.
     
    RT_Jester likes this.
  41. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    I'm wanting to use rain for the pathfinding and waypoint system but my game is a rpg and the combat will not be handled by rain how can i disable the ai once combat begins and how do i reengage ai after combat has ended?.Basically once a enemy is detected i want rain to cease and desist.
     
    RT_Jester likes this.
  42. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Just wanted to drop by and say that both a zombie ai package and wildlife ai package would be cool. What are your future package plans?
     
    RT_Jester likes this.
  43. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    317
    I'm having trouble getting RAIN to work with basic Mecanim controllers. From the examples, it looks like RAIN doesn't simply play animation states, but instead passes variables and the variables are expected to control animation flow. However, my Mecanim controllers are rather simple and only require Animator.Play(string) to work properly.

    How can you get RAIN to simply play Mecanim animations similar to how it does for the legacy animation system?
     
    Last edited: Feb 3, 2015
    RT_Jester likes this.
  44. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    It appears that you may have two copies of RAIN in your project. Let me know if that helps!
     
  45. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    There's an "Is Active" button on the AI. Turn that off when you need to. It works like a pause button so the AI will resume what it was "thinking" at the time of the pause. Some things do reset like pathfinding though.

    Let me know if this helps!
     
  46. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368

    Zombie AI and animal AI sounds like great ideas! To stay up to date on all the stuff we release, follow us on social media or signup for our newsletter.

    Thanks for the ideas!
     
  47. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368

    You're going to need to write a custom action. I would look for an example of other custom actions to see how others made them, then I would build my own and play around with it.

    Let me know if this works for you.
     
  48. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Last edited: Feb 10, 2015
    BackwoodsGaming likes this.
  49. sk8terboy4

    sk8terboy4

    Joined:
    Mar 29, 2013
    Posts:
    29
    I dont know if this been asked before, but can I use Rain{Indie} for ai on large scale terrains/multiple terrains at once? More specifically, I'm trying to make zombie ai that has the basics actions of wandering, attacking, avoiding objects, etc, and I will also spawn them in-game. Will the ai system automatically update for this?
     
  50. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    BackwoodsGaming likes this.