Search Unity

AI Warrior[Released]

Discussion in 'Assets and Asset Store' started by kurotatsu, Dec 22, 2016.

?

What version of Unity are you using?

  1. Unity 5.5 or higher

    55 vote(s)
    85.9%
  2. Unity 5.4

    9 vote(s)
    14.1%
  1. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Unfortunately, most of the enemy's current execution of attacks are random, and the blocking/dodging feature isn't in yet, and it too will function at random, though once I do add the evasion/blocking I will add a method to trigger a block or evasion where you in your code can randomly send a message to the AI Warrior prior to an attack to trigger their block(just like I do the directional get hit feature).

    Counter moves are hard, as I need the animations, though when I DO add the blocking feature I may be able to add a counter attack to follow the block based on a random percentage that pulls from the attacks already being used by the AI Warrior, or I may make a single counter attack in the animator, like I do for the chase attack, I'll look into it.

    I hope this helps, and thanks for your interest.
     
    Last edited: Mar 9, 2017
  2. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Wait for the new Video Kurotatsu i hope you
    released it in the next few days ;-)
     
    Last edited: Mar 12, 2017
    kurotatsu likes this.
  3. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I'm getting there, just started making a stage yesterday and putting in buildings.
     
    julianr likes this.
  4. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Something news about your new video ?

    and i have a question
    Did you test your AI in multiplayer ?
    What for Multiplayer ?
     
  5. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Sorry for the delay on the video, I have some personal stuff going with custody of my daughter, so have had to step away and handle that for now(have been dealing with this for almost a year, and will hopefully be done this week.).

    I never tested with multiplayer, but did implement the multi-tag system in order to cater to multiplayer usage.
     
    julianr likes this.
  6. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Hey Kurotatsu,

    i hope everything is okay ..... have already heard nothing of you
    What advances AI Warrior?
     
    julianr likes this.
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Has this ever been integrated with RFPS? Or has anyone successfully used them together? I'm currently using Emerald AI and although it's very easy to setup and use, it's lacking in some more advanced features that I see AI Warrior has. I'm considering giving this a try to see if it can work better for me.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I understand that your asset works with Ootii's Motion Controller. Are there any tutorials on how to get them working together?
     
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Was the companion/follower AI ever implemented?
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yikes, @kurotatsu was last seen April 7th. Is support for this asset weak?

    [EDIT]
    My apologies. I missed your message regarding your personal issue. That is, of course, far more important. Hope to see you back soon.
     
    Last edited: May 6, 2017
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I can only assume he is still away dealing with the child custody issue mentioned above. Not sure at all what is involved, as it's a personal matter.
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Oh, I didn't see that. I had no idea. That's of much greater importance, of course.
     
  13. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I'm sure he will be back once its all sorted. He wouldn't be able to concentrate on updates.
     
  14. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I know @kurotatsu is not available, but does anyone else here have any experience with AI Warrior in comparison to some other AI solutions such as ICE Creature Controller and Emerald AI? I'm interested in performance comparisons mainly.
     
  15. vaki26

    vaki26

    Joined:
    Jan 23, 2015
    Posts:
    22
    I there going to be a release that works with 5.4, I see it was mentioned earlier.
     
  16. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I bought this last night and with the help of @FargleBargle have a working integration with Ootii's Motion Controller. So far it's working really well. I haven't tested for performance yet, but I'll be stress testing it soon.
     
    julianr likes this.
  17. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I think performance wise ICE is more optimised for large amount of AI. I tested about 30 in the demo scene on AI Warrior and it gave me about 14 fps using a GTX970, with a Quad core i7. I'm sure with a few tweaks of the settings you could double that.
     
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yikes. I hope I can get good performance. I don't need 30 AI in a scene, but I also don't have a GTX970 with a Quad i7 either. My game is for the Wii U. I'll have to do some performance testing right away.
     
  19. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    that was in the editor, so you could probably get more on a build. But if you are not planning on having 30 or so in a scene, but spread out into zones or levels, I'm sure you'd get away with 5-10 in batches with line of sight.
     
  20. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    My first test was good so far. The demo scene with 2 AI is running at 60 fps with also having Time of Day and PRISM post effects in place. So that's a good start.
     
    TeagansDad and julianr like this.
  21. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I upped the scene to 6 enemies and they are quite a bit higher poly count than I'll be using and I still got 52-60 fps during the battle. So, I'd say this is definitely a winner.
     
    TeagansDad and julianr like this.
  22. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Is that with everything else in the scene, or just AI and effects? How many polys and batches in total?
     
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It's just the demo scene so not much else going on. But with Time of Day and PRISM (simple bloom, tonemapping, LUT), it's not completely doing nothing else. I'll be testing in a full scene soon. My target frame rate is 30 because this is obviously the Wii U and I can't expect to get better than that. So I have a good 20-25 fps left for my scene elements now. Should be doable.
     
    julianr likes this.
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I like this asset, but the Eyesight Camera is a huge design flaw. Essentially, the game is rendering the scene again for every single AI unit. That's an insane performance issue. I've disabled my eyesight cameras for better performance, but I'm not sure how much this affects the AI's ability to do things properly. The system should do perhaps a simple sphere cast to detect the player and then check for whether it's in front or behind the AI to determine visibility. I may work on adding that code myself to see how it does.

    [EDIT]
    Now I'm wondering if the eyesight camera might be usable with a few tweaks. I'm not sure what AIW does behind the scenes, but if the FOV and far clip plane were adjusted and the culling layer was set to just the Player layer then it might actually perform better and work as intended. I might give that a try before looking for an alternate solution.
     
    Last edited: May 12, 2017
    twda likes this.
  25. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I also noticed on the screenshot I posted in the MC thread that MSAA is enabled by default on the Eyesight Camera, something it clearly doesn't need. But you're right, limiting it to one layer and a fixed render area should reduce the performance hit. I also use the included spawners to only instantiate enemies when I'm nearby, rather than having large numbers of them patrolling all the time. ;)
     
    magique likes this.
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I started building out my game scene and putting spawn points where my enemies will appear. I tried the AIW spawning system, but it's not exactly what I want because it's not a good idea to instantiate and destroy things at run time. I am using Pool Boss to pool enemies and other objects.However, that's when I discovered that AIW has no concept of pooling and is not pool friendly. I thought I could just spawn my AI from the pool and then later on when it spawned them at a different location then I'd just call some sort of Reset or Init function to reset the AI to their starting state. But AIW has no concept of resetting an AI. Everything is done in the Awake function and once the AI is considered dead then it's not usable. I had to create a new function and copy in a bunch of the code from the Awake function in order to get the AI back into the proper starting state.

    I would highly recommend some code changes to future versions that make pooling a lot easier. As it is I'm basically doing a major re-work of the code to fit my project's needs. Future versions might make that process easier with a little more modularity and pool friendly structure.

    [EDIT]
    Also, I saw at least one place where the code is calling FindObjectsWithTag at run time, which is very bad. If you have a large scene hierarchy that's going to really slow things down a lot. A better solution would be to have some sort of game manager that AI can register with as needed and valid targets can be added and removed as necessary when they are spawned, in range, etc.
     
    theANMATOR2b, twda and julianr like this.
  27. Chrisking01

    Chrisking01

    Joined:
    May 14, 2017
    Posts:
    4
    Hello. Your asset looks fantastic. Can I use the asset together with "third person controller" from Opsive?
     
  28. ETrombley

    ETrombley

    Joined:
    May 6, 2017
    Posts:
    1
    Does anyone know to to apply damage to the NPC's and to have the main player have health? I'm trying to implement this into a VR Game so a generic controller is a no go. I also know a very very small amount about coding.
     
  29. Dionysos1111

    Dionysos1111

    Joined:
    Feb 14, 2016
    Posts:
    39
    How can i change the player?

    I've created a new player, put all the script and gameobjects from the thirdpersoncontroller from the demo on it, change the tag to player and reassign everything in the inspector.

    But now i have no music when the game starts and the enemies are just ignoring me
     
  30. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    95
    Hey Kurotatsu, how are things going? You up for feature requests?
     
  31. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Hello did any1 test this with 20+ Ai, Hows the performance??
     
    julianr likes this.
  32. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I tested with 30+ AI performance was acceptable, but you may need to tweak it a bit for an increase in FPS
     
  33. desijanto

    desijanto

    Joined:
    Dec 24, 2013
    Posts:
    2
    Hi, I have a problem on animation.
    Can I use the generic model instead of humanoid?
    Due to our model is generic.
     
  34. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    Does this support 2 AIs fighting each other or just AI fighting the player?
     
  35. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    No answers from the author since March, is this asset still supported? Does it work in Unity 2017?
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    hopeful likes this.
  37. Widhi-Muttaqien

    Widhi-Muttaqien

    Joined:
    Aug 2, 2015
    Posts:
    4
    Hi kurotatsu. 1 pre-purchase question. Can your AI handle path finding with navmesh?
     
  38. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I'd advise trying to contact the author via his support email. He hasn't been on this forum for months.
     
  39. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    @FargleBargle or @magique could you please let me know where to find how to integrate Ai Warrior with Ootii MC? I would greatly thank you in advance.
    I am able to add the sword helper script to the ootii sword and the Motion controller damages the ai warrior enemy, but can not fogure out what to do to get the AI Warrior enemy to damage the Ootii MC player?
     
    Last edited: Aug 15, 2017
  40. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Sorry for the late reply. I've actually been busy this week upgrading an AI Warrior project to the latest version of Motion Controller, and sorting out a couple of issues that came up with Tim at Ootii. It's all looking good now though. ;)

    As to your question, check out the discussion I had with @magique on pages 63 and 64 of the Motion Controller thread. I think I cover most of what you'll need in post #3146, but there was a bit more discussion on the next page. If you have more questions, let me know. :)
     
    jrackley and hopeful like this.
  41. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    Perfect Thank you! Slipped my mind to add the player main script, now all works well. Any issues with the latest update with ootii that you may share would be awesome when you have time.
    Thanks again
    Hope @kurotatsu comes back soon, this could easily be the best AI solution once finished, I noticed a lot of prep work features in the code.
     
  42. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I had a couple: My custom AIW sword wasn't being selected/equipped initially. I ended up copying the Inventory settings from an Ootii demo character and applying them to my character. After he had a functioning sword and shield again, I was able to replace the sword with my own, and everything worked fine. The combatant script on the AI enemies also started throwing errors whenever they were instantiated. They didn't seem to cause problems in game, but were still annoying. Tim found the cause right away, and sent me a fix, which you should see in the next update. He's been responding quickly to support requests, and squashing any bugs that got past us during the beta tests, so I'd expect a bug-fix update fairly soon. Since Motion Controller 2.6 adds simple to use layer masking (combat motions while moving), bow target locking, and a lot of other combat related enhancements, I highly recommend getting it btw. ;)

    One thing that might still be an issue is that when an AIW enemy gets killed, he turns off his capsule collider. This allows your player to walk through him as he's doing his death animation, which is kind of comical. This wasn't a problem before, when the player needed to stand still to fight, but now that he can move forward during attacks, it's happening much more. I'm sure it's solvable, but haven't had time to look at it much yet.
    I hope so to, but I understand he was dealing with some major family issues when he left, and that's got to come first. I'd love to see him back here, but am trying to make the most of AIW in its present form, rather than expecting any additional features at this point. :rolleyes:
     
  43. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hopefully he'll come back, its a good system and could do with more updates - it was a shame as this was born out of another AI system not being updated.
     
  44. Aceego

    Aceego

    Joined:
    Apr 5, 2015
    Posts:
    37
    is there a tutorial for the player mesh? i fix up the player with scripts (i use ootii´s motion controller) but the enemy ignores me. i tag my player with the player tag, but again the same situation. So what i am doing wrong, or is there a tutorial?
     
  45. Aceego

    Aceego

    Joined:
    Apr 5, 2015
    Posts:
    37
    OK i solved it :) I don´t know why but i copy and paste the player, deleted the original and Tadaaa everything works fine :) strange but as long as it works that way :)
     
  46. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    Thinking about buying this, does anyone know if this is strictly enemy vs player? Can I make it so that enemies in another group fight each other without having the player interact with them kind of to like to simulate a war going on
     
  47. Aceego

    Aceego

    Joined:
    Apr 5, 2015
    Posts:
    37
    as Long as they have the enemy tag on it they attack everything you want ;)
     
  48. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    Does anyone know how to make enemies attack an object? For example like a warrior attacking a castle door?
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Assign the "enemy" tag ...?
     
  50. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    No, obviously, that’s not how it works.