Search Unity

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

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

  1. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    To grab the latest version of RAIN please click “Check for Updates” in your RAIN menu.
    —————————————

    CHANGES:

    - Performance improvements including re-using the MoveLookTarget in RAINNavigator.GetNextPathWaypoint
    - Waypoint nodes now continue looping until all nodes are visited or a child node returns FAILURE/RUNNING. This change should help smooth animations and movement when traversing through a network.
    - Changed MecanimMotor to use AI.Body.transform.position instead of Animator.bodyPosition for locating the AI.
    - Changed BasicNavigator initialization to try to set a path graph before any path operations can occur.
    - Fixed linear distance calculation for audio rolloff in the AudioSensor.

    Please post any questions or comments.

    We look forward to hearing from you!

    Best,
    Jester
     
  2. akyoto_official

    akyoto_official

    Joined:
    Feb 24, 2013
    Posts:
    52
    Loving it, great work!
     
  3. Takecare

    Takecare

    Joined:
    Jan 31, 2014
    Posts:
    14
    Can't add component 'BoxCollider' to centerofmass because it conflicts with the existing 'CircleCollider2D' derived component!
    UnityEngine.GameObject:AddComponent()
    RAINEditor.RAINMenu:CreateGenericDecoration()
    RAINEditor.RAINMenu:CreateVisualDecoration()

    hmmm my player circleCollider2d wont allow me to place a Visual Aspect onto it.
    Great program btw just cant wait till its integrated fully. Cheers on the success RAIN Team!
     
  4. SunnyChow

    SunnyChow

    Joined:
    Jun 6, 2013
    Posts:
    360
    This library seems powerful. But I would like to know if it's mobile-friendly?
     
  5. RT_Jester

    RT_Jester

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

    Yes, RAIN is built to be mobile friendly. We are also continuing to optimize the engine so it works leaner and more powerful for every platform.

    Let me know if you have any other questions.

    Best,
    Jester
     
  6. RT_Jester

    RT_Jester

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

    Here is a sample project we get a lot of requests for. “How do I make my AI NOT attack in a straight line?”. To achieve this we use an Attack Harness which limits the amount of AI that can attack you at one time. No two AI can be in the same position at the same time and the AI picks the closest available position to attack even if the player is moving.

    Play around with the distances and the amount of AI positions. If you have any questions, let us know!

    Share this thread for others to download!

    Check out our forum post here for the project.

    If you have any questions, let me know!

    Best,
    Jester
     
  7. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Very nice. Thanks.
    Any word on a newer mecanim tutorial?
     
  8. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes. We are creating a tutorial and sample project for our Mecanim release v2.0.11 We don't have an exact date on the release quite yet.

    Thanks for asking, let me know if you have any other questions.

    Best.
    Jester
     
  9. SeanPollman

    SeanPollman

    Joined:
    Jul 10, 2012
    Posts:
    55
    I am really liking this asset, however I greatly prefer to use the "A* Pathfinding Project" Is there any way to make it compatible?

    There are just so may other navigation solutions out there, I dont see the need to include it in Rain.
     
  10. RT_Jester

    RT_Jester

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

    RAIN is designed as a modular platform so even though we took a lot of care to integrate the entire system, you could still use pieces of it that you choose. For example, you could use A* pathfinding while using RAIN's sensor, aspect, and behavior tree features.

    Let me know if this helps!

    Best,
    Jester
     
  11. WizardGameDev

    WizardGameDev

    Joined:
    Jul 25, 2012
    Posts:
    62
    Great for prototyping but without source code just too much risk to make it a central part of a game engine. Even debugging what could be simple issues such as why a way point is not getting picked up... it's just so much of a black box what is going on inside of RAIN. Platforms change so fast and it's tough enough keeping up with Unity builds and all the various platforms... a major shift in any of them and suddenly you have a part of your game engine that is both closed source and potentially incompatible. It's a shame a paid version with source code isn't available.
     
  12. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello TakeCare! Thanks for posting this, please accept my apologies for taking so long to get back to you.

    It appears you're using RAIN{indie}. While RAIN 2.0 does not officially support the 2D colliders, it would not suffer from this particular problem (RAIN 2.0 sensors/aspects do not use colliders). I don't think you can work around this problem as Entity requires the component Collider, which appears to be the 3D version.

    Let me know if this helps!

    Best,
    Jester
     
  13. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368

    Hello princeWIGUAN,

    Please accept my apologies for not getting back to you sooner! We plan to add that feature into a future release. That doesn't mean you couldn't make it work now, it just doesn't come supported out of the box.

    Let me know if you have any other questions.

    Best,
    Jester
     
  14. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Hi, I just installed RAIN and first of all it looks pretty easy and intuitive to get along with. I'm having an issue where a Move action will just return failed though. I followed the getting started tutorial and I have the same setup minus the animation:

    $rain_failed.png

    If I set the move actions target to a single waypoint using "waypointname" it works fine but when I use the variable from the waypoint node it just fails. I'm at a bit of a loss.

    Any help would be appreciated.

    Thanks.
     
    Last edited: Mar 19, 2014
  15. SeanPollman

    SeanPollman

    Joined:
    Jul 10, 2012
    Posts:
    55
    This is good to know, could you provide a little more specifics in the direction I would need to go in order to replace RAINs navmesh systems?
     
  16. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Unfortunately we've never used A* or other pathfinding solutions outside of RAIN to my knowledge. However, I did find this thread where some individuals integrated RAIN{indie} (an older version) and Aron Granberg's A*

    http://arongranberg.com/vanillaforums/discussion/820/integration-with-rainindie

    I hope it helps. RAIN 2.0 is the newest version so keep that in mind.

    Best,
    Jester
     
  17. SeanPollman

    SeanPollman

    Joined:
    Jul 10, 2012
    Posts:
    55
  18. RT_Jester

    RT_Jester

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

    RAIN behavior trees have changed a bit between some of the tutorials, it's very likely the problem with your behavior tree is that the move node needs to be a child of the waypointpatrol node. That will likely fix the problem.

    Let me know if this helps.

    Best,
    Jester
     
  19. RT_Jester

    RT_Jester

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

    We very excited to announce that we're ready to share information about Sentio!

    For those of you that don't know, Sentio is the new Character platform we’ve been working on over the last few years and we think it's going to blow you away. We’re planning to send out a survey to talk about it to people who have signed up for our newsletter. If we get enough traction we will have a follow up group call (Google Hangout or Twitch) where we can talk to you directly.

    If you are interested in learning just a little bit about our incredible Character technology, and are willing to answer a couple of survey questions about the product, please sign up right away.

    The sign up form is here:

    http://rivaltheory.com/newslettersignup/

    We're looking forward to talking to each one of you to gain a deeper understanding about what you need out of the next generation of AI technology.

    Talk to you soon!

    -Jester
     
    Last edited: Mar 20, 2014
  20. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    $480x320.png


    Creating incredible interactive characters is really difficult. We think we can make it easier.

    Rival Theory is re-thinking how studios use AI in games and we want to involve you in the process.
    Please help us by answering this 6 question survey.

    What we're working on can affect all game developers, so please share the survey link with your development community, talk about it on reddit /r/gamedev, or simply start a conversation with us.

    Your feedback will be instrumental in how we change AI in games.
    Thanks!

    -Rival Theory Team
     
  21. BigBite

    BigBite

    Joined:
    Feb 20, 2013
    Posts:
    108
    Hello Jester, I am currently trying to learn how to use RAIN. I have a question concerning the AIRig's "memory" section. I was wondering how I could either get access to it or create my own that I could access through other scripts. Thanks in advance.
     
  22. Kewngen

    Kewngen

    Joined:
    Apr 1, 2014
    Posts:
    2
    Hi,

    This might be a idiot question but I'll give it a try. I don't know much about game development or AI but am a developer by trade and want to learn.
    My friend have created a 4X game (much like a simpler version of civilization) and I would like to create a bot to play against.

    If I create the action methods in a C# console application for example, can I use RAIN to create the AI (decision makeing basically) and then trigger my C# methods from it?
    What I have yet to grasp is if I need to create a game in Unity or if I can use RAIN for AI and then implement it in projects outside?
     
  23. RT_Jester

    RT_Jester

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

    Thanks for posting. Could you go into more detail? Do you mean in code or in the wiki?

    Best,
    Jester
     
  24. RT_Jester

    RT_Jester

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

    If your friend's game on Unity or another engine/platform?

    Best,
    Jester

    EDIT: RAIN is bound to Unity at the moment (mainly through some things like Vector3). So if you are wanting to use RAIN in a console application without Unity that most likely won't work. On the other hand if you have RAIN in a Unity game/application, and want it to trigger methods in another application or assembly, that is doable.

    Let me know if this helps.
     
    Last edited: Apr 1, 2014
  25. Kewngen

    Kewngen

    Joined:
    Apr 1, 2014
    Posts:
    2
    Thank you for a quick response!

    The game front end i written in Javascript and since it's a turn based game, the backend is just a web application processing and validating what the clients does. Is there any way to kind of mock the game actions in Unity, use RAIN to develop AI and then compile the AI to a .dll or something I can use within another application to do the "thinking" and respond with actions the AI wants to take?

    I don't want to build the AI bot into the game but build a bot that sends POST requests to the game server with what moves it want to make. Makes sense?
     
  26. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    An AI brain that is disconnected from an actual game playing another game? That's the kind of stuff that would make our CEO proud! :) I'm going to show him this post and see what he thinks. As long as RAIN is running in Unity you should be fine. We don't have a way to port RAIN outside of Unity at the moment.

    I hope this answers your question.

    Best,
    Jester
     
  27. BigBite

    BigBite

    Joined:
    Feb 20, 2013
    Posts:
    108
    Hi Jester, I think I made some progress, I will ask more questions if I get stuck.

     
  28. BigBite

    BigBite

    Joined:
    Feb 20, 2013
    Posts:
    108
    Hello Jester, a quick question, how do I get access to the AIRig on a gameobject from script? I had found a post where you mention how to do it yesterday, but I forgot to bookmark it. Also, could you also point out where I could find this in the DOCs? That way I could keep learning. Much appreciated.

    Edit: I guess I should mention what my intentions are. I created a custom RAINElement and hooked it up in the "plugins" part of the AIRig. The class holds some variables that determine if the GO is selected, and if it is, it will then be allowed to move. I would like be able to iterate though a list of GOs and set this variable for each one. I'm not sure if I need access to the AIRig or not. Thanks again.
     
    Last edited: Apr 2, 2014
  29. RT_Jester

    RT_Jester

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

    Here is the first video of four (the other 3 are linked) new RAIN 2.0.10 tutorials. The videos go from start to finish on how to create an AI character that patrols, detects, attacks, and searches.

    The videos are on Youtube but the discussion is on our forums!

    Be sure to thank our community member CodersExpo for his amazing work on creating this series and filling out the Wiki!

    Enjoy!



    Best,
    Jester
     
  30. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Awesome to hear you're making progress! Your best bet is to make your way over to the Community Portal http://rivaltheory.com/community/

    It has the Forums, Wiki, API along with other resources.

    If you have more questions, let me know!

    Best,
    Jester
     
  31. BigBite

    BigBite

    Joined:
    Feb 20, 2013
    Posts:
    108
    Hello Jester, I was wondering if you could give me some pointers on drawing gizmos for runtime generated waypoints. I can't see if I'm generating them correctly or generating them at all :cry:. I looked through the docs but can wrap my head around the Utility classes (I'm an artist mainly). Thanks in advance, I'll keep at it tho.
     
  32. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    The videos are nice. Now that the basics are done, is it possible to get some more advanced functions done? Like running away, taking cover and shooting, etc. Just an idea.
     
  33. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks!
    Excellent suggestions! I will put that in the request feed. If anyone would like to vote/make their own suggestions please feel free!

    Thanks again,

    Jester
     
  34. RT_Jester

    RT_Jester

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

    Here's some code for adding waypoints:

    WaypointSet tSet = GetComponent<WaypointRig>().WaypointSet;
    tSet.AddWaypointAtLocation(new Vector3 (Random.Range (0, 10), 0, Random.Range (0, 10)));

    As for drawing gizmos at runtime, if you are running in the editor it should update when you add waypoints and draw them appropriately. Now if we aren't in the editor you will have to do something more along the lines of grabbing the set (like above) and iterating through the Waypoints and drawing something.

    Let me know if this helps!

    Best,
    Jester
     
  35. BigBite

    BigBite

    Joined:
    Feb 20, 2013
    Posts:
    108
    Hello Jester, I was wondering if you could give me some pointers on something. I'm currently trying to generate a waypoint collection at runtime. I would like to do this for each Agent independently (they should each have their own waypoints to traverse). Could I still achieve this by having one Waypoint Rig? Or should I have each Agent "carry" their own? Also, if each has it's own, how would I assign it in the BT Editor?
     
  36. RT_Jester

    RT_Jester

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

    Thanks for posting this.

    You should use a SEPARATE waypoint rig if each waypoint set is different. If the waypoint set is the SAME for every agent (e.g. all the waypoints are in the same positions) then it's okay to use one rig.

    We have a way to assign the waypoint set in a behavior tree by using the quoted string of the name of the game object. An example would be if your waypoint rig's game object is named AgentWaypoints you would put "AgentWaypoints" in the Waypoint Network or Waypoint Route field on your behavior tree node.

    Let me know if this helps!

    Best,
    Jester
     
  37. RT_Jester

    RT_Jester

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

    Some big announcements:

    Attachment 96045

    RAIN v2.0.11 with Mecanim support is now live. To grab the latest version of RAIN please click “Check for Updates” in your RAIN menu.

    NEW FEATURES and FIXES:

    -Support for Unity 4.3 changes to Mecanim
    -Memory and performance improvements for NavMesh visualizations
    -Improved behavior tree load times
    -Bug fixes for waypoint movement and pathfinding
    -Fixed the undo changes in Unity 4.3

    Plus More-- Full Release Notes

    Studio Showcase: GRAVE

    Surrealist Survival Horror Game by Broken Window Studios

    GRAVE comes creeping in from the darkness for this edition of Studio Showcase.



    Click here to play the Grave Demo and read about how they used RAIN to create a truly terrifying experience.

    Let me know if you have any questions!

    Best,
    Jester
     
  38. RT_Jester

    RT_Jester

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

    Some big announcements:

    $Grav_Rain_Banner_NoKS.jpg

    RAIN v2.0.11 with Mecanim support is now live. To grab the latest version of RAIN please click “Check for Updates” in your RAIN menu.

    NEW FEATURES and FIXES:

    -Support for Unity 4.3 changes to Mecanim
    -Memory and performance improvements for NavMesh visualizations
    -Improved behavior tree load times
    -Bug fixes for waypoint movement and pathfinding
    -Fixed the undo changes in Unity 4.3

    Plus More-- Full Release Notes

    Studio Showcase: GRAVE

    Surrealist Survival Horror Game by Broken Window Studios

    GRAVE comes creeping in from the darkness for this edition of Studio Showcase.



    Click here to play the Grave Demo and read about how they used RAIN to create a truly terrifying experience.

    Let me know if you have any questions!

    Best,
    Jester
     
  39. engelhaft

    engelhaft

    Joined:
    Sep 7, 2013
    Posts:
    2
    Hi Jester,

    I am trying to move an NPC with RAIN the NPC is using mecanim to make the transitions on the animations, these transitions are based on two parameters, Speed and Direction.

    I have tried a move node and that obviously did not animate the NPC, I have tried also using mecparam to set Speed and Direction and I can see the value updated on the Animator window but the animation does not change.

    Am I missing something?
     
  40. RT_Jester

    RT_Jester

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

    Thanks for posting this. Have you downloaded the newest version of RAIN? v2.0.11 launched last night.

    Also, we're creating a Mecanim + RAIN example that we will be releasing at the end of the week. Let me know any more details you have (screen shots really help), I will also look into the issue in the meantime.

    Best,
    Jester
     
  41. engelhaft

    engelhaft

    Joined:
    Sep 7, 2013
    Posts:
    2
    Besides that I have another question, I am using the same behavior three (Mind) for several NPC's

    Is there a way to use a working memory that is not shared by all the NPC's kind of an individual memory?

    I would like to keep just one mind since they have the same behavior three for maintainability purposes

    And another question. Is there a way to cancel a movement node on a behavior three if a variable gets a value? lets say I would like to stop the movement if a variable Stop == true
     
    Last edited: Apr 21, 2014
  42. RT_Jester

    RT_Jester

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

    Thanks for posting this followup. Go ahead and upload the screenshots either here or on our forums. http://rivaltheory.com/forums/ if it's easier.

    I look forward to hearing from you!

    Best,
    Jester
     
  43. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  44. S-P-A-C-E-D

    S-P-A-C-E-D

    Joined:
    Jan 11, 2014
    Posts:
    45
    I am using mecanim. So far I have him walk a path, chase player if with in visual sense and "attack" player if with in a smaller visual bubble. Problem is in my animator I have to have a transition from move to attack. So I made a bool called attack a transition if true. Them in the ai animations list I added an instance for attack and had the start parameters if attack is true and stop if false. Even with the transition back it gets hung up not moving but replaying the walk animation.

    What is the proper way to transition to another animation like attack with mecanim?
     
  45. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    Based on how I understand what you're saying, it sounds to me like you have the mecanim part worked out and the triggers in RAIN's ai animations panel are switching between the animator states correctly, is this true?

    If this is true, then are you asking, "why is the character not moving again when the animation is changed back to walk"? Is this correct?

    Question, in the two sensors you're using, are they both sharing the same form variable name?
     
  46. S-P-A-C-E-D

    S-P-A-C-E-D

    Joined:
    Jan 11, 2014
    Posts:
    45
    Edit: I added a move action to the attack, it now cycles correctly. I think I'll need to look into adding a custom action in there, for things like damage and for stopping the player etc.

    I have a question, will this get real heavy with hundreds of npcs? And what if I wanted to make them also be able to chase other npcs?
     
    Last edited: May 22, 2014
  47. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    The video was very useful, I'm definitely hoping for a continuation!
     
  48. S-P-A-C-E-D

    S-P-A-C-E-D

    Joined:
    Jan 11, 2014
    Posts:
    45
    So how would you handle things like, say it move towards the player with the entity I put in there... what if I give that same entity to other npcs because I want this npc to chase anyone near him. In this case, he would chase the first thing to get with in range, and ignore everything else because its only checking if there is something, then storing that first something in the variable.

    How would I get it to chase what ever is closest??
     
  49. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    I have had dozens of NPC's and experienced no discernible difference. All of them had their own Behavior Trees (some share assets) and dynamically load multiple other assets. There were multiple FSMs and several small navigation meshes. I'm not saying I didn't run into any issues but I was able to work through any I did come across.
     
  50. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    I have posted this mecanim II https://www.youtube.com/watch?v=b_4yMWWHyW0
    ...it is only a pilot version and has not been reviewed and accepted on Rival Theory's site yet. I have since edited to make it shorter and fix an issue. Read my notes in the comments section too. This will eventually make it to the Rival Theory site but for now you get a sneek peek Shhhhhh don't tell anyone. ;-)