Search Unity

Fantasy AI 2.0 [RELEASED]

Discussion in 'Assets and Asset Store' started by brilliantgames, Mar 1, 2012.

  1. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thank you so much for your review as well as your purchase. Any other input from anyone else is greatly appreciated. I want to do all I can to insure everyone is happy with this package and their needs are met. AI is a very challenging thing to overcome in your game. Spending a few hours setting up your character and pathfinding with this package is far better then spending 500 to 1000 hours to build everything from the ground up as I have done. I really want to see this package used in a wide variety of projects. I do believe it has a vast amount capabilities especially with the assistance of small scripts using the components provided. Please, if anyone has any questions or concerns, do not hesitate to add them to this thread.

    Thank you to all who have made a purchase so far. Robert Weaver, Brilliant Game Studios.
     
    Last edited: Apr 16, 2012
  2. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I have just added a new part to this thread. A "New Features/Fixes" for the next version(1.1). Please submit your ideas for features/fixes on this thread. If your idea seems valid, I will add it to the list! Thanks so much. Have a wonderful Monday!
     
  3. ozziedave

    ozziedave

    Joined:
    Apr 16, 2012
    Posts:
    7
    Hi Brilliant Game Studios,

    Will your AI NPC's integrate with the "RPG CONTROLLER CAMERA" package which I have just purchased.

    My knowledge of Unity is not good at this stage, and I am looking for an easy way to build my game.

    Many Thanks
    OzzieDave
     
  4. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I don't see why not! I havent tried out that controller with the AI, but I'm sure you shouldnt have any trouble. Just make sure if the controller uses any of the default Object tags or collision layers that you change them. The tutorials talk about those. :)
     
    Last edited: Apr 16, 2012
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    First video tutorial is now uploading!
     
  6. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    Where ?
     
  7. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  8. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    One question: if I have a breakable object in the scene, is it possible to tell the AI to break that object to reach the target faster instead of selecting a longer alternative path?
     
    Last edited: Apr 17, 2012
  9. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    You could treat that object as an enemy. Put a health and team script on it and make sure its not on his team. As well make sure the object tag and collision layer are set correctly. Make it so the object destroys when the health reaches 0. As well, make sure there are waypoints linked through the breakable object, so that he knows it is a walk-able route. :)
     
  10. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I don't want to mark the object as "enemy" because I don't want the AI to attack the object on sight, I only want the AI to break the object if it's the fastest way to reach the target.
     
  11. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hmm. Well the only way an enemy will automatically attack is if the object is an enemy. What you could do is make the team script on the object dynamic, and when the ai nears the object and has obvious motivation to go through it, make a trigger that changes the team. If not you could just tell him to stop when he reaches the object and trigger the attack on the ai followed by the object breaking. Really what you are asking is just a "cool" visual. All the ai really needs to know is that he can go that way. The rest is just a show. :)
     
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Just thought of the easiest way to insure the ai attacks the object only when he wants to go through. Make a script that checks his current waypoint and his next waypoint. If his current waypoint is the one before the object, and the next waypoint is the one on the other side of the object, then he knows for sure that he needs to break that object. So once this fact is realized then make a trigger that either triggers his attack state, or a dynamic team change on the object. :)
     
  13. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    It is possible right now to have friendly AI and only attack if the player attack the npc?
     
  14. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Make the team script on the player dynamic. Make the player hostile or change his team when he attacks the npc.
     
  15. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    I haven't bought this package yet so I really don't know yet how the scripts but I'm pretty sure I can make the modifications to make it work like I want it, but as a suggestion this should be added to the package because I don't want to edit the file every time you make an update :)

    Anyways good job on this keep it up, I will buy it soon :)
     
  16. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Well there may be a problem with that. In this scenario, are you wanting the friendly ai to attack if the player attacks another friendly? Or is this when the player attacks him? This might not be something people want to be happening all the time. And to add yet another option to enable or disable this behavior will add more options to the already large list of options. We don't want to add to many detailed behaviors, it will get too messy for users. But if enough people demand this behavior, I will add it. :)
     
  17. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    An example of this behavior is TES Skyrim you attack a villager (friendly npc) he will defend himself, an option like this would be cool to have
     
  18. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Basically it would only be a few lines of code. It would be best if you scripted something like this yourself. Basically your script just has to get the team component of who you are attacking. If you attack someone on your team, you would make an if statement that asks something like. if(theobjectyourattacking.teamnumber=myteam.teamnumber) then myteam.hostile=true;. Thats it! Or you could create a bounty system. like if(theobjectyourattacking.teamnumber=myteam.teamnumber)bounty=bounty+10. if(bounty>100) myteam.hostile=true;. Really simple stuff man! Hope that helps.
     
  19. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Yes i know is simple do it, it was just a suggestion ;)
     
  20. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    For sure. Thanks for the feedback. :)
     
  21. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    Thanks, that should work :)

    I can't wait so I will probably have to implement this myself, but is there any possibility that you include such feature in a future release? It will come too late for me, but I think it could be an useful feature for other users.
     
  22. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    does this work in flash? or mobile?
     
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Possibly yes. But as I have mentioned before, something like this is a fairly specific behavior, and would be easy to script yourself. I have to be careful how many small specific behaviors I add. I cant make the scripts too cluttered, cause they will become overwhelming and difficult to navigate.
     
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    As far as I know flash is the only platform this wont work for. Last time I checked, flash hates systemcollections lists. Maybe things have changed I'm not sure. As far as mobile, I don't see why not. Although I doubt the mini game would work, but I don't see why there would be any trouble with the AI scripts. If anyone could test this on multiple platforms and message me the results, that would be greatly appreciated!
     
  25. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    First video tutorial is now up!

     
  26. Rya

    Rya

    Joined:
    Apr 11, 2012
    Posts:
    121
    You should make a tutorial on how to implement custom models w/ animations and have everything work smoothly.

    I think that could help a lot of people.
     
  27. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thats exactly what this video is showing. In the start, the sparton is just a normal character model with standard animation rigging. Shows all the necessary steps to setting up a character from the ground up with standard animation rigging.
     
  28. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    After playing with setting up characters for a bit now, I'd love the next update to include all animations being a randomly selected array, rather than just one animation (I have multiple animations for some of the actions - and it wouldn't look so canned if they could be chosen randomly (as some of the sounds are chosen randomly). In fact, anywhere there's a choice (sounds, animations...), it would be nice to have an array of random choices.

    Though I hope it doesn't break the prefabs I'm creating right now... :)
     
  29. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Wow bud, I just happened to send you a personal message as you posted here. Weird.. Anyhow, yes I already plan to do this! Keep in touch!
     
  30. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    +1 on the random arrays for animations, glad to see that is already in the works. -1 on building in the breaking through solid objects thing. Keep this thing as sleek and low drag as possible. If someone wants very specific behavior, its not that tough to code it. Personally, my litmus test would be the 2/3 mark. If a given feature isnt likely to be useful to 2/3 of projects dont put it in the base AI. Maybe build add on moduels for related groups of relatively specific behaviors or features and sell them seperately as add ons. Something like the ability to randomize animations adds quality to any game; the ability to break through walls, probanly wont even come up in many. My $0.02 worth, take it as you will.
     
  31. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    Just watched the tutorial Robert, well done. I cant wait until I can grab a few hours to play with this. Damn need for sleep! It always gets in the way!
     
  32. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thanks so much for the feedback. Keep in touch. :)
     
  33. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Brilliantgames do you plan to add riggidbody system to pack too? It would be very nice if you could add riggidbody system like seen in Mount and blade.
     
  34. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    BG, I just saw your PMs this morning. Never even thought of "multi-edit"! That'll definitely help! :) One thing I did figure out, is to add the AIEYE and LEFT/RIGHT transforms, and a SHOOT transform to an empty GameObject, create a prefab out of it, with the positions set to generic spots - so that all I have to do is drop it into my bunches of characters, and then connect the transforms to each character-AI slot. Speeds things up a bit, and now if I start using multi-edit, it'll speed up the generic settings. :) Nice! :) I've come up with a few ideas already with this, and hooking my own "Add-on" code into the AI for some game logic that I'm creating custom. I like how easy it is to hook into your code already, and by doing it this way, when you update code, it won't break my own logic. (mostly passing targets to your AI from my own, and reading some of the variables in yours). Nicely done! It's really coming along.

    One request: a "Create Free Time In The 'Real-World'" button, so I have more time after work and between parenting and "chores" and watching Daily Show and Colbert Report to play with this... Could you add this in the next update? :) LOL! :)

    Keep up the great work!!! I'm building my world logic and prefabs now, so later I can just spend some time plopping models onto a terrain, prettying it up, and then just drop all these prefab characters into the scenes and watch it all come alive. It's fun just watching these little guys run around and growl and yell at each other and fling arrows (and magic fireballs!) at each other across a flat terrain - it'll rock even more once I add trees, hills, and little villages! :)
     
  35. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hey Danreid. I'm glad to see you are having fun this this package and discovering its power. I would love to see some videos of my AI combined with your work sometime! As well, I would love to see what anyone else has done with this package! Cheers!
     
  36. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Sorry you will have to be more specific? What kind of systems are we talking?
     
  37. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    And thats a great idea for a prefab. I will have to include that in the "setup characters" folder for the next update!
     
  38. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    I mean riggidbody system that is attached on characters, its basically collision on character bones, wihch makes death or hit animations very realistic and properly collide with terrain.
     
  39. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    This is a possibility. But alot of work. I'll give you a little look into the future of Brilliant Game Studios. I have teamed up with another artists and we are currently working on an assault rifles model pack. After that project is done I will be doing a full sound library pack. Then finally, I will be returning to AI and creating a shooter bot AI package. This AI will be far more advanced. BUT, because of how advanced it will be with physics and animation, I will use all the powerful new features of the shooter bot and add them to the fantasy AI as well. Just to keep the quality at the same level. As well I will continue to work on updates for the Fantasy AI, and make sure everyone is happy with the product. :)
     
  40. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Love this. I assume this could be used in, say, a shooter game? If so, and it isn't expensive or resource heavy, I might purchase. The current AI for my game is too predictable and easy to fool.
     
  41. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Are you referring to this Fantasy AI Package? Or the Shooter Bot Package I plan to design in the future? Cause this package is not expensive/resource heavy at all. I have videos demonstrating this AI on a massive scale.
     
  42. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    For those of you who have purchased this AI package, thank you so much. It would be greatly appreciated if you could give it some reviews/stars on the store page! Thank you.
     
  43. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    FIRST TEASER FOR A NEW FEATURE IN VERSION 1.1

    Below are editor screen shots of an early version of a "Navigational Mesh Generator". Drag and drop the navigational mesh generator prefab into your scene, and watch it automatically and efficiently create a navigational mesh. If you take a look at the bottom screen shot, it creates smaller size waypoints for tight areas, but large ones for more open areas. Making for a very efficient and fast navigational mesh. Get stoked for this update!

    Mesh prefab


    Mesh creation result


    Graphical Representation
     
    Last edited: Apr 18, 2012
  44. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    The package that is the topic of this thread. But about your bot AI package - how will that differ from this? From what I've seen it looks possible to do what I need to do, but I need to be positive. I have neither unlimited resources nor time.

    Glad it's not resource heavy. Could you also post the direct YouTube link to one of your videos?
     
  45. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    The first page of this thread has all the youtube videos and information. This AI package is designed for Fantasy games. But it is perfectly capable of being used for shooters. The AI have ranged ability's. Although the ranged behaviors are not that developed as of now. There would definitely be a ton of very useful features for you to use I'm sure. For a shooter, you would have to make extra scripts that modify its behavior a bit. Can you give me some more details on what you need to accomplish for your AI?
     
    Last edited: Apr 18, 2012
  46. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Just out of curiousity, could we see some very massive scale battle? Maybe video of alltogether 1000 AIs fighting at once (not needed to see them on screen all).
     
  47. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    For something of that scale to perform properly. You would need 2 things to happen. 1. An alternate more effcient physics system. Have you ever tried having 1000 rigid body objects moving around at once? 2. Character LOD. I'm pretty sure games like the total war series might use sprites for their characters when they are far away.
     
  48. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Oh sorry for missleading you before, i always make mistake between riggidboy and ragdoll. I mean actually ragdoll system with death animations like it has been seen in Mount and blade or Overgrowth.

    Mount and blade used the same physics system that Unity is using and it is possible to get more than 1000 AI fight at once, thats why i was thinking that it would be possible with your system too.
     
  49. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Physics is not solely what matters when it comes to AI. What matters is how much cpu load and memory is the AI solution using. Simulating AI requires checking for things when triggered and ticking behaviours that check other logic etc. I myself wrote an AI system for the game im developing currently which uses Behave behaviour trees and i find it a very nice solution. Im assuming this solution is meant more towards people who do not have unity pro because alot of it can be done with the new navmesh pathfinding system unity released in 3.5 along with behave and your own logic. Don't take this the wrong way i am definately impressed at what i see here :) and congratulations on the release brilliant and nice job.
     
  50. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thank you for the feedback and compliment Efraser. One of the main goals with this AI was efficiency. Any complex tasks like sorting large lists, raycasting, distance detecting and other things are only done when they absolutely have to be. I am using the physics of the rigidbodys with the x, y, and z rotation constraints frozen. I have tested the AI in large numbers above 500 and closer to 1000. At that point what is really slowing things down the most are the rigid bodys and the meshes of the AI characters themselves. Yes 1000 AI scripts does slow the framerate, but not nearly as much as that many meshes and rigidbodys. I tried testing near 1000 AIs fully rigid with physics and colliders. The frame rate was slow, but relatively the same with the AI script off or on. So really it was only the physics/collision and the meshes significantly slowing things down.