Search Unity

[RELEASED] Breadcrumb Ai (v2.0 IN DEVELOPMENT)

Discussion in 'Assets and Asset Store' started by kbmikemood, Sep 16, 2014.

  1. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    Any news about 2D Support?
    I have the asset purchased and I am waiting for it. I need this for my platformer game.
     
  2. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    Hi,

    Very interested in this but quick question - was 'find game object with tag' removed from the update function?

    Thanks!
     
  3. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hello! Yes the find game object is a coroutine under Start();

    :)

    Cheers!
    Mike
     
  4. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    Thanks - I've purchased and all is looking good except for one thing;

    The enemies seem to try to avoid trigger colliders thinking they are obstacles, is there any way to avoid this? I want them to pass through trigger colliders.

    Cheers
     
  5. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    By default the Ai is setup to avoid anything that doesn't use the Player, Enemy, Breadcrumb or Waypoint layer. if something uses the Default layer (or another) it will attempt to avoid it. However if it's a trigger, you can disable Raycast hits on triggers under Edit > Project Settings > Physics > [Uncheck] Raycast Hit Triggers.

    Ultimately you could create a new Layer, lets call it "Ignore" and then add it to the avoidance script under the FixedUpdate() Line 114

    Just add the integer of your new layer. So if "Ignore" is layer, say 16, change the line to look like this.

    Code (csharp):
    1. Ai_Avoidance(~(breadcrumbLayer | enemyLayer | playerLayer | waypointLayer | (1<<16) ));    // Controls Ai wall avoidance
    Hope this helps. :)

    I'll definitely have to simplify the avoidance in the future so this doesn't happen without an obvious solution within the asset.

    Cheers!
    Mike
     
  6. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    That's great support, very much appreciated, hopefully this will work!
    Thanks again.
     
  7. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    Worked perfectly, Cheers
     
  8. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Excellent! Glad it worked out :) Cheers.
     
  9. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    When out version with 2D AI support?
     
  10. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hi!

    I'd love to get 2D support out with update v1.3 but I'm still working on the schedule for features. So I'm aiming for v1.3 release however I don't have a specific time frame. :( In the words of Blizzard, Soon™.

    The goal is to have both 2d platforming as well as topdown (like zelda) support. :)

    Cheers!
    Mike
     
  11. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    I am interested only in 2.5d support. Enemies Megaman like game. This is my project:


    The ai will work with my type of game?
    I have your asset purchased. I purchased it to have AI with my enemies in this game.
    My enemies are waiting your AI. =)
     
    Last edited: Dec 1, 2014
  12. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    The current version does have jumping and could probably be tweaked to deal with 2.5D scenarios bo locking the Z axis. Having said that, when 2D support is fully implemented it will be using 2D Rigidbody which will also be interchangeable for a 3D Rigidbody, so yes it will work for 2.5D once complete. :)

    Cheers! :)
     
  13. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    ok!
    With this AI the enemies can jump. Ok. And they can shoot to the player too?

    I need the enemies can jump and shoot and use her jump animation and her shoot animation. It is posible?
    You have tutorial to do it?
     
    Last edited: Dec 1, 2014
  14. vmvdoi

    vmvdoi

    Joined:
    Dec 4, 2014
    Posts:
    3
    It has challenged making the first game using BreadcrumbAi.
    This text was translated into English by the translation website.
    I think that it is hard to read. I am sorry.
    There is a wish about the evasive action of EnemyRanged of BreadcrumbAi.
    EnemyRanged is driven in by Player in the wall (with ceiling) case.
    Then, EnemyRanged will disregard gravity and will reach a wall.
    Not only my project but the demonstration of BreadcrumbAi was the same.
    Although EnemyRanged is driven in in the wall case, what should I do for carrying out evasive action, without reaching a wall?
     
  15. vmvdoi

    vmvdoi

    Joined:
    Dec 4, 2014
    Posts:
    3
    The part which seems a problem wasn't "Ai_Avoidance(LayerMask Layer)".
    It seems to be "Ai_Controller()" of "else if".
    It happens here.
    RangedEnemy ignores gravity, and climbs a wall.


    --- Ai.cs ---
    private void Ai_Controller(){
    if(_CanFollowPlayer && this.Ai_FindPlayer()){
    //
    //
    //
    } else if(Vector3.Distance(transform.position,Player.position) <= attackDistance) {
    moveState = MOVEMENT_STATE.IsFollowingPlayer;
    attackState = ATTACK_STATE.CanNotAttack;
    rigidbody.MoveRotation(Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(transform.position - Player.position), rotationSpeed));
    transform.position += transform.forward * Time.deltaTime * followSpeed;
    } else {
    //
    //
    //
     
  16. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hello!

    This has been fixed with v1.2.2, the AI shouldn't float away, however there is an issue I just noticed where it will still attempt to rotate if you're below them. Here's what you can do.

    Add a new Vector3 and change the rigidbody.MoveRotation script. Like this:

    Code (csharp):
    1. Vector3 playerPosFixed = new Vector3(Player.position.x, transform.position.y, Player.position.z);
    2. rigidbody.MoveRotation(Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(transform.position - playerPosFixed), rotationSpeed));
    This should solve the issue. Let me know if it continues. :D

    Cheers!
     
    hopeful likes this.
  17. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Will you ever put mobile controls on this kit? Thank you!
     
  18. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    The demo scene throws errors in Unity 4.6 (tags and layer related), can you please advise?

    Also, question: can the breadcrumb AI units go up and down uneven terrain, ramps, stairs, etc, especially when wandering but also while chasing?

    Thank you!
     
    Last edited: Dec 7, 2014
  19. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    I also see a strange behavior when multiple enemy AI units are chasing the player... when the closest AI get close to the player and start melee attacking, the AI that are farther away and coming closer to the player will suddenly stop chasing the player and start wandering instead.

    EDIT: It's almost like the enemy loses interest in the player if their view of the player is blocked momentarily by another attacking enemy.
     
    Last edited: Dec 9, 2014
    Brendonm17 likes this.
  20. fullmando

    fullmando

    Joined:
    Mar 7, 2014
    Posts:
    8
    Hello, I purchased the kit, works great, the only issue is my enemies are not coming closer than 7.4. I changed the follow distance to 0, but it returns to 7.4. I would like the enemy to attack at a distance of 3, can you give advice? My attack distance is set for 3.4, regardless the 7.4 follow and the 3.4 attack always stay the same, the enemies never come closer.
     
  21. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Hey @Zero Logics! Im having some problems with this asset.. 1 is that there is no acceleration. 2 there is a lot of jittering with the flying enemy. I recorded a short video to show you what i am encountering. Please ignore the crude visuals :confused:.
     
  22. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Also, sorry for the video not being 60 fps, 1080 HD. vimeo had to downsize the file... :(
     
  23. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hi, Brendonm17 looks like zero logics took a month out for christmas his last post was on the 4th Dec?

    I've NOT bought this asset I was just checking out that it was being supported on the forum etc.
    But I noticed on the tutorial video that when "Ranged" is selected the enemy will try to aviod the player when the player gets too close, which is what seems to be happening with your game.
    Also do your trees have simple colliders on them or tree shaped colliders with the trunk under the tree part, that might cause a problem.

    Roy
     
    Brendonm17 likes this.
  24. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    hi Zerologics,

    I've not bought this asset yet, I might do in a minute its pretty cheap, and believe it or not I like to support and encourage good ideas.
    I really like the concept or breadcrumb AI and I think it could grow into a really popular asset, if you can keep it on track and not deviate down the wrong path (excuse the pun) .

    Nav meshes work great for small "doom" sized levels but a soon as you start trying to use them on a large open world terrain you run into problems especially on a voxel generated terrain.
    Also on a nav mesh when the enemy spots you and goes into chase mode they magically know where you are on the nav mesh even if you run around a corner. I want my enemy to go to the "last known position" and start searching and I'm thinking a trail of breadcrumbs is a fantastic idea.

    There are some features I would like you to consider is you haven't already:
    A cover system, which could effectively be another type of breadcrumb that is manually placed
    The minimum distance should be for both melee and ranged imho for realistic sword fights
    I've been following this guy on YouTube take a look 1min 30 secs into this video
    it explains what I mean better.

    It is a little concerning that you've not answered these customers questions for a month though, if someone buys this asset and have a question is it going to be February before they get an answer?

    Roy
    PS I really do think you are on to something great..
     
    Brendonm17 likes this.
  25. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    @nomax5, my trees have capsule colliders. My levels are proceduraly generated, then I combine the mesh at run time. And with the enemy trying to avoid me; It seems to work correctly when the enemy is either wandering, chasing or fleeing. But when it is idle, the enemy still tries to float around while the forces to keep it in range are still be applied (I assume anyways). Is there any way to disable movement if they are in attacking range?
     
  26. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hi Brendonm17, I cant do any type of support for this because I only bought the asset 10 minutes ago. but I've just watched the second video:



    and towards the end Zerologics explains how he is working on the new version and outlines a rough roadmap for the asset.

    I'm guessing like me Zerologics worked over Christmas as holidays give devs time to work with less interruption from support, I was looking forward to So much Christmas because I get to develop my game without having to go to work or do support.

    This is very early days for this asset, you're in at the beginning, its very exciting, I'm going to try and help identify bugs and offer suggestions, I'm starting very simply with capsules and cubes and then go from there.

    Roy
     
  27. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Im starting simple too, its just that the little things bug me :p
     
  28. OneManStoryBook

    OneManStoryBook

    Joined:
    Jan 12, 2015
    Posts:
    7
    Is this asset first person compatible?
     
  29. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    I use it for first person, you can just attach the breadcrumb Ai script onto the Standard asset 1st person controller and it will start dropping breadcrumbs when you move, also there is an option for UFPS compatability.
     
    kbmikemood and OneManStoryBook like this.
  30. GabeGabe

    GabeGabe

    Joined:
    Jan 4, 2015
    Posts:
    38
    Any news about the 2D support?

    Btw...Anyone tried to use it for a 2D platformer?
     
  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Could this be used together with RAIN framework, to provide real time dynamic obstacle avoidance with the ray casting system ?
     
  32. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hi everyone,

    I just wanted to make an update letting you know that Breadcrumb Ai v2.0 is currently in development which will have a Free Version and a Pro Version available. It is a complete overhaul of the existing system.


    I'm also updating the new main site along with development www.BreadcrumbAi.info

    The current version (1.2.2) had too many feature requests which in turn made development move away from the original goal of it's dynamic Ai without NavMesh by adding irrelevant features.

    The new system will be far more user friendly and allow saving presets which will allow me to move away from the cluttered inspector.

    Both 2D and 3D support will be coming with v2.0.

    Breadcrumb Ai v2.0 release date is set to - COMING SOON™

    Cheers!
    Mike
     
    hopeful likes this.
  33. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Sorry for the late reply.

    I'm not 100% familiar with RAIN but from what I gather Breadcrumb Ai would technically function as a dynamic obstacle avoidance system if you just used the avoidance option. So yes, technically. ;)

    Cheers!
    Mike
     
  34. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Sorry for the late reply!

    I just made a post (a few above this) I'm currently developing v2.0 which is a complete overhaul, totally worth it though. Both 2D and 3D support will be included. However, as for platformer style Ai, it's still up in the air. I've had a few users use Breadcrumb Ai for side scrollers, so it's definitely do-able but will require a completely different type of Ai in v2.0. So it's possible, but we'll see. As for the release date. I wish I could say!! It's a lot of work :( Best I can do is take note from Blizzard and say COMING SOON™.

    Cheers!
     
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Thanks, very interesting, i will check it out.
     
  36. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hi!

    I really like this asset. It is easy to use and has a lot of features that makes AI easy! But I have one question. How can I make the AI find it's way to a special location? I have this bridge-like map and I need the AI to get over to a special location there.
     
  37. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    In the current version of Breadcrumb Ai the waypoint system is completely random. Of course looking back this should have been a customizable feature rather than the default. Version 2.0 will have both random and set waypoint paths that you can setup. So as it stands, the patrolling behaviour is completely random, so setting a specific location for an enemy to go to would have to be manually coded. But as I said, v2.0 will have this as an option.

    As always, I don't have a release date - Breadcrumb Ai 2.0 is still COMING SOON™.

    Cheers! :)

    Mike
     
  38. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Looking forward to it! :)
     
  39. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    Me too. Waiting for it.
     
  40. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    @Zero Logics, I never had got an answer back on why my AI were jittering.. If possible, please reply as soon as you can. Thank you.
     
  41. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    My guess is you might have to wait for Breadcrumb 2.0 for a fix ... which is hopefully getting closer to release. :)
     
    Brendonm17 likes this.
  42. Dominic.Shea

    Dominic.Shea

    Joined:
    Feb 10, 2015
    Posts:
    11
    Looking forward to 2.0! :)
     
  43. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Please move 2.0 higher on your to-do list.
     
  44. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    @Zero Logics - Any update on 2.0?

    If a big re-write isn't getting anywhere, maybe it's best to try making small patches ... incremental advances.
     
  45. kfc

    kfc

    Joined:
    Dec 17, 2010
    Posts:
    27
    Hi bro.
    I've been using your breadcrumbs AI for my project. Run in to issue in Unity 5.1.1 during webgl export. Still looking forward to your 2.0 update.

    Cheers
     
  46. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    It seems as if we have lost support for this asset.
     
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Yeah, he hasn't even been on the Unity forums since March 30. Not a good sign. :(
     
  48. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hey Everyone!

    Sorry for the silence on Breadcrumb Ai. I've been preoccupied with work and personal life stuff.

    In any event, I'm putting a lot of time into Breadcrumb Ai 2.0 right now hoping to get a version ready to publish. I'm aiming for this month.

    I've updated the main post with a few tidbits of information on what I'm doing with the asset. As @hopeful said above, incremental advances is where I'd like to take the asset. So I would like to add more as I go and get the basics out of the way to ship it.

    I haven't been doing any major support for 1.2.2 since I've been busy and moving forward with 2.0. I do have a bit of a back log and I see that on these forums. If you're having any issues with the current version I'll do my best to help you out but once 2.0 is out I'll be stopping support on previous versions due to their vast differences.

    So feel free to have a discussion on current version or 2.0 below, all feedback is also welcomed.

    Cheers!
    Mike
    Twitter
     
    Deleted User and hopeful like this.
  49. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    For 2.0, I would suggest that the AI is not able to see through things with specific layers (or something like that). For instance, the AI can not see the player who is on the other side of a door that is closed. But, it will still follow the bread crumbs to that location, so the door might be just closed by the player, the AI switches to follow the bread crumbs, and if the AI gets there in time it will trigger the door to open, but otherwise it won't see the player anymore.

    Another example is if the player is on the other side of a wall only 1 unit away, the AI can see 10 units, but the AI will not be able to see the player because there is a wall there.

    Looks like some fun stuff! I hope you set up ranged and melee options for the AI. And the ability to do both ranged and melee (maybe ranged weapon is empty, so only melee. OR close enough for melee, so do that instead of ranged).
     
  50. kbmikemood

    kbmikemood

    Joined:
    Dec 12, 2013
    Posts:
    68
    If I'm understanding correctly what you're saying, this is exactly how Breadcrumb Ai already works. ;)

    It relies on Line of Sight. If the player is out of los from the ai, it looks for breadcrumbs to follow. The whole point of the system is that if the player goes around a corner (or through a door) the Ai will start following the breadcrumbs until it can see the Player again.

    I hope I understood correctly. This is the whole point of Breadcrumb Ai. :)

    Cheers!