Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tactical Shooter AI - Asset Store Pack

Discussion in 'Works In Progress - Archive' started by squared55, Mar 2, 2015.

  1. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    AN ANNOUNCEMENT
    Hi everyone. As you may have guessed from the general lack of updates recently, my life has become increasingly busy to the point where I am no longer able to continue maintaining the package. I've pushed it longer than I probably should have, but now I have made the final decision to deprecate Tactical AI from the asset store.

    WHAT DOES THIS MEAN?
    Tactical AI will no longer be available for new customers to purchase. Unity should still allow existing users to download the package.

    WILL THERE BE CONTINUED SUPPORT?
    I am currently still supporting the package at the time of writing, but I don't know for sure how much longer I will remain able to do so. If you have a question, it's best to ask it sooner rather than later.

    CAN I GET A REFUND?
    If this news means you would no longer like to use Tactical AI, you may contact me for a refund. Please include your invoice number in your message. Refunds will be given on a first-come-first-serve basis and I cannot guarantee their availability. At the moment, I am not putting any hard limits on refund duration, but just as with support, if you want one, sooner is better than later. Additionally, if you purchased the asset on or after April 19, 2019, you may contact Unity directly for a refund.


    Finally, I'd like to thank everyone who's supported the package over the years. It's been really awesome seeing all the cool things you guys have been making with it. Good luck with whatever projects you create next!




    -------

    Feature List

    -Full cover system which supports cover that is both pre-marked and found automatically at run-time. Enemies flank, fall back, and advance to maintain an optimal tactical position.

    -Battlefield interaction! For example, an agent may blow up an explosive barrel when enemies are nearby or knock over a table to create cover!

    -Advanced tactics! Agents can coordinate flanking and suppressing fire in order to attack a position. Strategies can also fall apart if the commanding agent is killed.

    -Customize agents to develop radically different units. Create tactical special forces, shotgun wielding berserkers, and careful snipers.

    -Multiple movement animations! Agents canleap to the side to dodge an attack, leap over a gap to get to a destination, or vault a short wall in order to take cover behind it.

    -Easily integrates with UFPS. Also includes integration instructions for RFPS.

    -Robust damage system! Agents can take different amounts of damage if hit in different body parts, and can be staggered by strong enough attacks!

    -Grenades! Enemies can lob grenades to flush enemies out of cover.

    -Agents can fight on multiple teams, with or against a player.

    -Agents can focus on priority targets!

    -Combines pre-made animations with procedural aiming.

    -Agents can use melee attacks at close range!

    -Rapid set-up with included editor tools.

    - Includes full, commented, C# source code.

    - In-depth 33-page manual.



    Tutorial Videos


     
    Last edited: May 31, 2019
  2. ExDeaDguY

    ExDeaDguY

    Joined:
    Aug 25, 2009
    Posts:
    503
    Wow amazing work. Great job man! The only thing I noticed that may need work is grenade avoiding. Maybe when a grenade falls within a certain range of the AI and if the AI is facing the grenade (Sees it land) then the AI runs for cover so many meters away.

    After watching it a couple time, some AI did try to avoid the grenades, but some while already set on a path ignored them and walked right into em. That's probably not something easy to change though with designated check for path delays and such.

    Everything else is great though. Appears a lot of hard work and logic went into the AI.
     
    squared55 likes this.
  3. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Thanks! Glad you liked it!

    The grenades are tricky. The way I have it set up now is that, when the grenade lands, it sends out a warning, and all agents which are within x radius and have line of sight leave cover. Because of the way the cover algorithm works, they'll pick another spot far enough away that they're out of the grenade's radius. The ones who are out of cover completely ignore it; usually they run out of range by the time it goes off but sometimes not. I might end up having them strafe quickly in the opposite direction of the grenade though.

    If I was a better animator, I could have them roll/dive out of the way, but I'm not.
     
    ExDeaDguY likes this.
  4. IAmCraigSnedeker

    IAmCraigSnedeker

    Joined:
    Jul 20, 2014
    Posts:
    117
    Some of the best AI I have ever seen
     
    squared55 likes this.
  5. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Any plans on implementing melee attacks?
     
    squared55 likes this.
  6. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Thanks man!

    Already done! I just can't make animations because the Bootcamp soldier refuses to open in Blender. Instead they just mime shooting a grenade in the general direction of the enemy, but I left it out of the demo because, frankly, it looks awful. Obviously it does let you use a proper animation.
     
    theANMATOR2b likes this.
  7. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    Any updates on when this will hit the asset store? I am really looking forward to your asset. Looks very very promising.

    All the so called "advanced" AI solutions on the asset store are just bad.
     
    squared55 likes this.
  8. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It's tough to say. Right now, on my "absolutely need to do" list, all I have is converting the scripts to C# and making an custom editor window that'll streamline the agent creation process. Also, I need to create documentation.

    However, one thing I want to do is enable users to execute their own code during certain events (taking cover, using a dynamic object, etc), and I'm not sure how I want to approach this.

    I'm also really busy over the next week or so, which puts a bit of a damper on things. However, maybe a week or two after that? Depends on what life (and Unity) throws at me.
     
    Last edited: Mar 15, 2015
    elias_t, Venged and giraffe1 like this.
  9. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    Thanks for reply. Can't wait. Demo looks amazing.

    C'mon guys show your love by liking his 1st post or replying with a comment.

    We need to encourage squared55 as much as possible lol!!!
     
    IndieAner3d and squared55 like this.
  10. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Just finished converting the scripts from to C# (I think I'll only use C#; it's way too much hassle to swap between the two.)

    In other news, here's a picture of an agent using a "table" they knocked over for cover! (You can see one that is still standing in the background)

     
    Last edited: Mar 17, 2015
  11. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Got some work done on the editor tools:

     
    RoyalAllen likes this.
  12. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi squared55. Your ai implementation seems very interesting!

    How easy is it to add extra behaviours to the ai by our side?
     
    squared55 likes this.
  13. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Right now? Impossible, lol. I haven't yet created any way to interface into the system.

    I'm planning on making a class which you can inherit from which will have a bunch of pre-defined methods that can be called (EG: OnEnterCover(), OnDeath(), etc). I might also make it possible to just completely swap out the various scripts.

    I also would like to allow you to create your own custom behaviors (ie: the AI sees a player, and then switches over to this custom behavior), but I'm not sure how I want to approach this yet.
     
  14. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Thanks for the reply.
    It would be very useful if the user is allowed to customize it.
     
    squared55 likes this.
  15. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    What would be the ideal implementation for you (or anyone else who's looking at this thread)?
     
  16. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    I have no specific request about the method.
    Some info on how we could modify or replace some scripts would be enough.
     
    squared55 likes this.
  17. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Making interfaces for each class would be easy enough for me to do, and would accomplish that.
     
  18. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Out of curiosity, what behaviors were you planning on adding? Maybe I could integrate them by default.
     
  19. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Mainly: wander around, patrol, conversation, tower guard, panic, hide.

    You know. All these little things that make an ai more believeable :)
     
    squared55 likes this.
  20. Whiteleaf

    Whiteleaf

    Joined:
    Jul 1, 2014
    Posts:
    728
    This has got to be the best AI I've ever seen...well done!
     
    squared55 likes this.
  21. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Thanks for the input. :)

    Wander around and patrol are actually already in there.

    Tower guard, (or, as I call it, camping) is something I intended to put in but it's slipped my mind recently. Added it to the To-Do list. That could would also double as the conversation feature (in that you set up two points facing one another and then just play the sound). The other two big purposes for that one is sniping and ambushing. Panic's a new one; hadn't thought of that. That'll be interesting to implement.

    Hide is sort of in there in the form of cover. They'll stay down for longer, if they've taken enough damage. However, I don't have a straight-up hide method... yet. :)
     
  22. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Thanks!
     
  23. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367

    Good to know you already working on some new behaviours.
    Sniping is a must too.

    To be honest I am looking for a good ai solution that gives me the ability to easily modify the behaviours.

    Experience leveling that allows an ai to become a veteran is something I am aming for. I am not asking for this. I will implement this myself.
     
  24. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Good to know. I've exposed pretty much every variable that affects the combat performance of the AI, so it should be pretty easy to do that.

    I'm thinking of re-structuring the behavior system. Right now, there's a switch statement that picks the current behavior depending on the current value of an enum and then calls a method. I think I might change it so that each behavior inherits from one parent behavior class. Once I do that, I could replace the switch statement with a variable that contains the current behavior class. Then, all you'd need to do is extend that parent class and set it as the current behavior.
     
    Last edited: Mar 27, 2015
    elias_t likes this.
  25. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Ok. That's already enough for me.
    We are awaiting the release then.
     
    squared55 likes this.
  26. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Small update: I've finished up the enemy creation wizard: now you can just drag and drop a ragdoll plus a few other objects/transforms and it immediately works. I've also done some work on the animations, so that the upper body has idle and firing animations.
     
    Last edited: Apr 1, 2015
    elias_t and giraffe1 like this.
  27. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Been working on adding custom behavior functionality. Right now, I'm porting each behavior to a separate component that extends from a parent.

    On the subject of release: I'll probably have it done within a week or two, but I'm not sure if I want to go for release then as I'm going to be really busy this month; probably too busy to offer any sort of support. I may do some sort of beta testing though.
     
    SuperNewbee and giraffe1 like this.
  28. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    great news. i can't wait. take my money!
     
  29. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    I'm just wondering...is this possible to apply fantasy base rpg game?
     
  30. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Depends on your mechanics. If it's a shooter with bows and arrows and spells instead of guns, then it will probably work. If you're looking at Zelda or Dark Souls type combat, then it won't work. It's really centered around shooter tactics which don't translate all to well to other genres.
     
  31. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    any news? i am really looking for to this asset!
     
    squared55 likes this.
  32. PulseHunter

    PulseHunter

    Joined:
    Jul 31, 2013
    Posts:
    23
    Hi,

    Will it require a predefine battlefield ?

    Can i use this for a procedurally generated battlefield or a randomized battlefield ?

    //Michael
     
    squared55 likes this.
  33. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It currently uses Unity's navmesh/pathfinding system, which, unfortunately, requires it to be pre-defined in the editor. However, if you have another pathfinding/navmesh system which supports dynamic levels, you could modify the script to support it. There are a few aspects that rely on the unity navmesh, which would need to be modified or changed. That said, the system supports dynamic obstacles.

    Sorry I haven't gotten too much work done recently; I've been extremely busy. However, my schedule has opened up, and I should be finishing this up soon.
     
  34. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Looks great.

    Will the system be dependent on character animations? Are they required? In other words would you run into problems if you tried to use it for tanks or vehicles or some other AI? I've kept an eye on the combat AI systems on the asset store and this seems to be a common downfall.
     
    squared55 likes this.
  35. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818

    I don't think it is; I'll need to test that, but I don't see why it would. However, some features such as using dynamic objects (not the firing at barrels, but walking up to something and pressing a button), and crouching behind cover wouldn't work. The animations rely on what the character has chosen to do, not the other way around, and it's all in one component. I'm thinking you could just disable the animation component, and that would be that. I'll have to test it out though. At the end of the day though, you could just drop the exact same animation into each animation slot and it would just play the same thing all the time.

    The system isn't exclusive to humanoid rigs; in fact my current set-up is using generic.
     
    randomperson42 likes this.
  36. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    which direction are u taking for the AI animations? Are they going to be legacy or mecanim? Or both if that is even possible?
     
  37. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It uses mecanim. I could theoretically implement the legacy system, but I currently have no plans to.
     
  38. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    cool, cool.

    ps. It was not meant as a request, Just a curiosity!
     
    squared55 likes this.
  39. McGunn

    McGunn

    Joined:
    Aug 7, 2012
    Posts:
    33
    This looks incredible. How complicated will it be to predetermine a few of the AI's choices before letting the actual intelligence kick in? I think of something like Half Life 2, and how incredible the enemies appeared because of a mix of cleverly scripted moments, and incredible AI.
     
    squared55 likes this.
  40. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It depends on what you want to do. Each AI has a non-combat behaviour and a combat behaviour. I'm thinking you'll want to make your own custom non-combat behaviour or use one of the pre-sets (generic things like patrolling and searching) to get the exact behavior you're looking for.
     
  41. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I've finished moving the AI behaviours into separate classes outside of the main script. Almost done the code!
     
  42. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    300
    great news, can't wait!
     
    squared55 likes this.
  43. McGunn

    McGunn

    Joined:
    Aug 7, 2012
    Posts:
    33
    Any chance of letting me pre-buy this so I can test it out before it's complete and on the Asset store? Haha.
    I'm really excited to try this out.
     
    squared55 likes this.
  44. 128bit

    128bit

    Joined:
    Oct 8, 2014
    Posts:
    117
    Looks rly good, let us know when its done!
     
    squared55 likes this.
  45. McGunn

    McGunn

    Joined:
    Aug 7, 2012
    Posts:
    33
    Still really looking forward to this. Any recent information about development? I noticed that the red team has stepped up their game in the web demo. This must be a new upload? Or is it just by chance?
     
    squared55 likes this.
  46. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818

    No new upload, just luck.

    Sorry for not getting any work done since the last update. Life threw a curveball at me, but I should be getting back into things soon. Apologies.
     
  47. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Almost done! Bug testing, documentation, and maybe a minor feature or two are left!

    EDIT: Aaaaaannnd I found a huge bug in the behavior swapping system. Great.
     
    Last edited: Jun 5, 2015
    IndieAner3d, Mister-D and 128bit like this.
  48. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Is there any news?
     
    squared55 likes this.
  49. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I tried to do something with the dynamic objects to make set-up far easier, but mecanim was very opposed to that idea. I've also been cleaning up bugs with regards to the Unityscript to C# conversion. All in all, very boring and tedious stuff and nothing really worth reporting on.

    In other news, the behaviour swapping bug was fixed, but several more have popped up. It feels like I'm fighting a programming hydra.
     
    Last edited: Jun 18, 2015
  50. w34edrtfg

    w34edrtfg

    Joined:
    Nov 23, 2014
    Posts:
    72
    Looks like this AI may fit my needs.
    ¿Have you planned a release date and price?
    ¿Will be a lower initial price for testing/any possible bugs?
    I would like to test it on my game :)
     
    squared55 likes this.