Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[UPDATED] ICECreatureControl v1.4.0 - creature AI for enemies, animals, monsters, zombies ...

Discussion in 'Assets and Asset Store' started by icetec, Aug 11, 2015.

  1. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    661
    Precisely this. I'd been avoiding it in case there was a way in ICE to do it to save on time, but now that I know the score I can proceed with workarounds.
     
  2. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    661
    Definitely. I'm currently working in a testing gallery, so I try a LOT of different stuff to stress the system, find issues, and see what the full extent of possibilities are available to me and my needs. I wouldn't have more than 15-20 creatures per home location now that I see multiple home locations are more desirable.
     
    Last edited: Jun 26, 2017
    zenGarden likes this.
  3. TheBeamer

    TheBeamer

    Joined:
    Jun 20, 2016
    Posts:
    9
    Here's a question that's probably better directed specifically at @icetec because I'm 90% sure it's a bug, but I figured I'd see if the community has any experience with this.

    I'm trying to have a Behaviour call an animation trigger once during that Behaviour. It works fine the first time, but consecutive times does not. Diving into the code a little and doing some testing, I found out that in ice_objects_animation.cs, UpdateAnimatorParameter is never being called with the parameter _stop == true, meaning that _parameter.End() is never called and m_TriggerIsRunning is never set to false, meaning that Start() will never return true.

    I followed that rabbit hole for a while trying to determine when UpdateAnimatorParameter should be being called with _stop == true, without much success (as ICE is admittedly very large, and each reference of a function leads to another). Any thoughts on that?

    Another side question:
    Because ICE is so large and I have found the documentation to be rather lacking in certain places (for example, there is no real mention that the intended behaviour of animation triggers is that they will be called every x seconds, where x is a random number in the range you set, and if the range is 0 to 0, it should (...supposedly? That's the bug above) play only once during the rule), I'm wondering if perhaps a Google Doc or something similar with the ability for people to leave suggestions would be a good idea? I realize this also comes along with the risk of every suggestion being "Hey, can you add integration with xyz", but there's also a chance it could take some of the workload off of Pit by keeping the docs up to date and having the answers to certain questions there. Just a thought.
     
  4. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    I think an ICE forum would be nice with approval of invoice number. That way, we can all post code to share without worrying about someone using it who has not paid for the asset. I am not sure we would participate in one that does not have this feature. Google Docs will probably not keep out the pirates.

    Problem with the Unity forums, is that it is a bad idea to post code if it contains the original asset's code.

    Might be a good idea to encourage private forums for ICE if Pit has the time to set something up.
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I think it's due to how you use spawn and home locations perhaps.

    Yep it could work better.

    For me , small focused video tutorials would be the best ( actual videos are cool , but too long )

    If you post only the modification parts and don't post the entire source class, i think there is no issue.
    Some official Discord channel could be helpfull by the way.
     
  6. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Using the Ban option would not solve your "clustering" behavior. I highly suspect this to be a short Random Positioning Range problem. :p

    Simply go into the Home Settings for your little dots, and set the Random Position Range to that of the Spawn Range in their spawn settings. :)
     
    icetec likes this.
  7. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    Yup, I think that should not be an issue, and quite doable. :)
     
    lod3 likes this.
  8. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    661
    Could be! These are my settings:



    It seems right, doesn't it? Or do you notice anything off?

    First image is of the home location, showing a rectable of 120x120 and a stopping distance of 0.25. Second image is my Random Positioning Range (120x120). And the last one is of the CreatureRegister entry for the AI spawn details. Since 60 is the max distance an AI can spawn in this scene without getting stuck outside the test area boundaries, I recently made the spawn range 40-60 to push them out on spawn, hoping they would create a better distribution after wandering a bit.

    But it's OK; I think the multiple home locations is likely a better solution, so I can position them to create the distribution I need. Thanks for posting, @TonanBora!
     
    Ryuichi173 likes this.
  9. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    I'll get right on this.... at some point. lol
    You could also try setting up the Patrol Misson, which might be easier.
     
    Ryuichi173 likes this.
  10. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    As long as the members are approved by Pit with invoice numbers. I personally won't be involved if we do not do something to keep users out that have not purchased the asset. Tonanbora won't either because he is my son and he works for me. ;) If done right though, it could be a great way to help each other when Pit is busy and it also helps with the language issues.
     
  11. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I don't mind about giving the invoice number to Pit for some private forum or some discord forum, but personnaly this actual forum thread is enought for me and do the job, i am not sure you'll get more people or more help with another forum ?
    The plugin is so big with so many options, that it would need a team to make videos and docs to cover almost every aspect. Many users expect somethings very easy to hanlde, but there is a learning curve and you must be curious clicking on buttons and reading plugin text helpers buttons.
     
  12. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    661
    Interesting. I will give this a try. Thank you!
     
    Ryuichi173 likes this.
  13. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    LOL
    I was simply supporting what you and other said. I do not think we need another forum either. We will continue to help as we can. We have a milestone we need to hit by September so will not be making any videos or twitch until after Unite in Austin.
     
  14. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good afternoon. A new version has been released. My main question is))) Have you decided in a non-bug with creatures for new players in ufps mp?
     
    Ryuichi173 likes this.
  15. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi @zenGarden, @Teila

    Hello! As long as I know, Pit already created detailed forum but unfortunately, only few people using forum.
    Look at his Official site and you can find forum we talking about.

    I think, to let people using new forum, Pit should suggest us do that more frequently if he want.
     
    icetec and Teila like this.
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    What is Unite in Austin?
     
  17. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
  18. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
  19. nerdsarewinning

    nerdsarewinning

    Joined:
    Apr 1, 2013
    Posts:
    15
    Im adding 50 basic animals (only with 2 interact and tested all ground detection methods) but it costs too much ICECreatureCharacter.Update() when I check profiler. It takes 50% cost in Total, 1.5MB GC Alloc + drops my servers fps around 15-20 .. Am I missing something? I have checked documentation etc. but no information about performance optimisations. Also I have another question, how can I change Home Location target of NPC programmatically?
     
  20. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi, everyone, i've been away this weekend and just noticed the update. Is it safe to import over or do you need to delete ICE first etc..

    Thanks,

    Andy
     
  21. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Could this be something other than ICE? What are the polys of your 50 animals. Do you have a detailed terrain with lots of trees? There is a tool on the asset store called Project Scan that might help you figure out where things need to be optimized. https://www.assetstore.unity3d.com/en/#!/content/85287

    I am not sure if those would affect the fps when ICE updates the characters or not but might be worth checking.
     
    Dwight_Everhart likes this.
  22. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    I am getting many compile errors with this on Unity 2017 1.0b9 - has it been tested with this version yet ? Also I am upgrading from a 2015 version so a lot of errors caused by that,is there a recommended way to upgrade ?
     
  23. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Unity 2017 is in beta still and not yet released. You need to give the asset developer time to test after the release of 2017 and make any updates. Often, releases are not stable and the wait might be longer. This is common practice. Why would a developer make changes to a beta that is not yet released? It would be constant updates as changes are made to the beta.
     
    Tethys likes this.
  24. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    ICE indeed does generate some garbage every frame. In general it is around 2.5kb per creature which can add up of you need many npcs. This is something with the internal motion control. If you use a navmesh agent the garbage should be reduced. 1.5mb sounds like a little too much though. I would wait for 1.4 and see if there are any improvements.

    Also to set the home target in code:
    ICECreatureControl.Creature.Essentials.Target = ...
    Havent tried it, but looking at the code this should do it.
     
    Dwight_Everhart likes this.
  25. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    Actually I just tried it in a fresh project, it appears to work well even in 2017 beta. So I think the issues are that I am trying to upgrade too far, Im guessing I should just delete all traces of it and reimport the latest one.
     
    Teila likes this.
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Garbage has always been a problem with Unity. I agree, that is a bit too much so hopefully it will be fixed or there is something you can do to decrease/eliminate the garbage.
     
  27. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    @icetec

    Ok so after doing a little profiling I found out that most of the garbage I was talking about is apparently caused by stuff only allocated in the editor.

    In the MoveObject.Move() you are doing
    if (TryMoveNavMeshAgent()) {
    } else if (TryMoveCharacterController()) {
    } else if (TryMoveRigidbody()) {
    } else if (TryCustomMove()) {
    } else {

    every call to TryMoveNavMeshAgent, TryMoveCharacterController, TryMoveRigidbody, TryCustomMove checks UseNavMeshAgent, UseCharacterController, UseRigidbody which in turn check NavMeshAgentReady, CharacterControllerReady, RigidbodyReady which then check NavMeshAgentComponent, CharacterControllerComponent, RigidbodyComponent where you do Owner.GetComponent<>
    According to this:
    http://answers.unity3d.com/questions/636278/should-getcomponent-generate-garbage-when-the-comp.html
    getting a component that is not there generates garbage in the editor.
    Even though the garbage should not be a problem in a built game there are still those GetComponent calls every frame. Would it be possible to instead check in TryMoveNavMeshAgent, TryMoveCharacterController, TryMoveRigidbody, TryCustomMove what the MotionControl type is and just return if its not the corresponding one?
     
  28. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It's your free time , and it's not paid i guess ? So i don't think anyone should claim videos from you or your team.
     
    Teila likes this.
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    No, but we have promised some so just want to make sure people do not feel like we have forgotten them. :)
     
    TonanBora likes this.
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    1.3.7 is live on the asset store, but the release notes just say "test changes". What was updated?
     
  31. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    Im having a problem with the wizard window, for some reason the buttons for player and creature are ghosted out, any ideas?

    edit: I had it work once, but even then the generate button was ghosted too.
     
    Last edited: Jun 27, 2017
  32. nerdsarewinning

    nerdsarewinning

    Joined:
    Apr 1, 2013
    Posts:
    15
    Ok, buyed an asset and I will post results here. Thanks for fast reply!! :)
     
  33. TheBeamer

    TheBeamer

    Joined:
    Jun 20, 2016
    Posts:
    9
    It looks like it was almost entirely images and almost no scripts, and the images also seem to be mostly the same (looking at their differences in source control). My assumption is that it's precisely that: test changes before uploading 1.4.
     
  34. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    Since I ditched my old install from 2015 and am using the latest one I cant for the life of me get the dudes to attack my ufps player. I have set up interactions for sense, hunt and attack (with my guy as target), and added the Ice creature player script to my ufps guy, but they dont seem to come after me, any ideas?

    Also I signed up on the forum, pretty empty around there but hopefully Pitt uses it :) I find a proper forum way easier than these unity threads. Ice is great I am now committed to reading the docs 20x and really getting more into it :) I randomly checked back after 2 years to see it was updated yesterday, and that convinced me to upgrade and lose my previous work, because I can only imagine how much this has improved in that time!
     
    Teila likes this.
  35. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi radiantboy,
    if your creatures ignore your player (or other targets), it seems that they can't detect him. A typical mistake here are different target names, so just try to select the player not by his name but rather by his tag. For this just open the player target and change the selection mode from NAME to TAG within the target object line and select the desired tag (e.g. Player).
     
  36. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    ICE is missing the Ground and/or Obstacle Layer, so just open the Scene section and press the 'Create Ground and Obstacle Layer' button. If both layers are exist, the above-mentioned "Create" button will be green and disabled.
     
  37. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    You can ignore it, it was just a store update, to test new shop features and to add a intro clip ... however, v1.4 is on the way!
     
  38. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi rasto, thanks a lot ... that's in fact a good point. Of course, all existing components will be buffered but nevertheless all non existent components will be checked in each frame ... I'll change this, so that ICE will do the check at the start only and will buffer the result.
     
    DonLoquacious and Ryuichi173 like this.
  39. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi radiantboy, please remove the old ICE version before importing the latest release of ICE. Version 1.3 was completely rewritten and comes with a lot of new and renamed file and class names, so you will get a lot of conflicts when overwriting an early ICE version. Just close your scene and remove the complete ICE folder (please make sure to move all your custom stuff e.g. prefabs etc. out of the ICE folder). If this is done you can import the latest release from the store and ICE v1.3 should working with Unity 2017 without any problems.
     
  40. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    I added both of them layers but its still the same. If I load the tutorial nav mesh scene then they are not ghosted anymore, so I can make people here and copy over, not ideal though.

    EDIT: ok I set them in creature register->world settings, now the buttons are unghosted. Thanks.
     
    Last edited: Jun 28, 2017
  41. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    Is there a way to apply flocking using ICE?
     
  42. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Im so confused. I just recieved an email from Unity that ICE have been updated June 26th to 1.3.7? And when I go thrue Unity Software to the asset store the update button is not litten? Have I missed something or what is going on? I understand that 1.4 is the update on the way and not 1.3.7? Didnt I buy that when I bought this asset 2-3 months ago?

    What is new in 1.3.7?
     
    Last edited: Jun 29, 2017
  43. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    @icetec
    And to smooth things out even further I looked at what was causing the remaining GC and it was in
    InteractionObject. GetValidInteractors()
    and
    BehaviourModeObject.ValidRules
    You are creating a new list in each of these every frame. This causes GC and could be avoided by declaring the lists as members and instead of creating a new list just use List.Clear()
    Changing this removes the GC caused by ICE, at least in my setup, which is just an npc going to its home location. If possible could you please go through other places that are reached every frame that create a new list and just move the list as a member variable and just clear it when it needs to be empty? This should remove most of the garbage created by ICE and reduce its GC impact to 0 or near 0 (so many configuration options that its hard to tell)


    Also is there Inventory Pro integration? In the docs it says coming soon, will it be available in 1.4?
     
    sylon, Tethys, DonLoquacious and 2 others like this.
  44. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    You know how you can add an interactor, then "acts" to it. Well, it seems for me that it goes instantly through my acts, I am looking for it to complete an act before moving on. For example I have a boxer he senses (act1) you then runs at you (act2) , then he hits you (act3). But I want act4, act5, act6, which are basically the same as act3, but with different punchs (ie I can use ATTACK, ATTACKB, ATTACKC etc). The problem is he goes through acts 3,4,5 instantly and ends up on act6, so I dont see all of the different punches etc. So any way to make it do an act for x many seconds before moving on ? Thanks.
     
  45. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    I am trying to add some target events but event->method name is ghosted out. How do I make that active?
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    Is Apex integration in the 1.4 update that's coming?
     
  47. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    At this point, there is so much that ICE can do but not enough videos that I kind of just wish there were presets (a demo of sorts) with some features such as Predators, Prey, Fish Swarm, Bird Flock, etc. It'd be nice to have a template of sorts.
     
  48. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Anyone having used Ice Creatures plugin on mobile ? How does it scales ?

    Yep short videos on common topics to make Ice Creatures more understandable for some people.
     
    radiantboy and magique like this.
  49. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    I have 5 guys working now, starting to get the hang of it again :) But even with capsule colliders they overlap each other, how do you stop this ?
     
    Tethys likes this.
  50. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,210
    There are a few ways to prevent this, but one way is to add a stopping distance.
     
    jessejarvis likes this.