|
Post by dendiee on Jun 18, 2017 15:10:48 GMT
Hey there i was interested if anyone knew how to increase performance of alot of ai.
I know that it is CPU heavy to calculate all the physics with the rigidbodies etc. But wat should be a max amount at once? Also maybe a better way is to spawn the objects only when the camera is viewing them?
any ideas or scripts to help?
Thanks in advance
|
|
|
Post by Invector on Jun 18, 2017 16:00:22 GMT
We're currently working on the AI v2.0 and we will release the Beta very soon.
Here is a preview test on a large scene not optimized with 30~40 AI's with post processing effects, pretty great performance running on a mid-end PC
|
|
|
Post by dendiee on Jun 19, 2017 15:53:06 GMT
looks very cool invector! and veery light! when will it release? any time soon or? also i heard u work on a climbing system,any date on that yet?
u do amazing work!
|
|
|
Post by shadex on Jun 19, 2017 23:24:32 GMT
We're currently working on the AI v2.0 and we will release the Beta very soon. Here is a preview test on a large scene not optimized with 30~40 AI's with post processing effects, pretty great performance running on a mid-end PC I didn't even know you were working on AI 2.0. This is awesome news. I can get about 10-15 AI in a non optimized sparse scene atm. 30-40 would be a dream. Any chance in adding a callback on the AI's death to who caused the death or who was the last person that damaged it? Are there any changes to the animator?
|
|
|
Post by Invector on Jun 19, 2017 23:40:50 GMT
We're currently working on the AI v2.0 and we will release the Beta very soon. Here is a preview test on a large scene not optimized with 30~40 AI's with post processing effects, pretty great performance running on a mid-end PC I didn't even know you were working on AI 2.0. This is awesome news. I can get about 10-15 AI in a non optimized sparse scene atm. 30-40 would be a dream. Any chance in adding a callback on the AI's death to who caused the death or who was the last person that damaged it? Are there any changes to the animator? The animator is the same as the Player, but we re-wrote basically every piece of code for the AI, there is several new options including custom path finding if you don't want to use Unity's navmesh agent solution ;) About your request to know who cause damage last... hmmm don't know exactly how to manage that, once the AI is dead it will remove all the components and lost this information, perhaps you could manage that outside the AI
|
|
|
Post by shadex on Jun 20, 2017 3:22:23 GMT
I didn't even know you were working on AI 2.0. This is awesome news. I can get about 10-15 AI in a non optimized sparse scene atm. 30-40 would be a dream. Any chance in adding a callback on the AI's death to who caused the death or who was the last person that damaged it? Are there any changes to the animator? The animator is the same as the Player, but we re-wrote basically every piece of code for the AI, there is several new options including custom path finding if you don't want to use Unity's navmesh agent solution ;) About your request to know who cause damage last... hmmm don't know exactly how to manage that, once the AI is dead it will remove all the components and lost this information, perhaps you could manage that outside the AI The alternate to Navmesh is awesome. Are you changing the AI death event then? ATM you have call vObjectDestroy via the OnDead event trigger, so i've been running several functions on the OnDead event before everything is stripped off the enemy. For instance giving XP to the player. Right now there is no way to detect who gets the XP if your using companions, it's networked or you have NPC's killing Enemys. I was hoping the "killer" would be stored on the onDead event to be accessed for frag lists, score, xp, and other systems.
|
|
|
Post by vikingos on Sept 21, 2017 8:07:23 GMT
In theory this could be done quite easy, unfortunately you would have re-code some of Invectors functions.
(1) Find the ondead event which I don't know where it is located(maybe Invector would know). You need to add a vDamage parameter, you could use the sender transform to check which script is attached to it either v_AIController, v_AICompanion or vThirdPersonController. Should Look like this: [System.Serializable] public class OnDead: UnityEngine.Events.UnityEvent<GameObject> { } Change to this: [System.Serializable] public class OnDead: UnityEngine.Events.UnityEvent<GameObject, vDamage> { }
(2) Save & compile, fix all the errors which should be quite easy, passing parameters when needed and updating the ondead function for the listener ect.
(3) Find the locations where the ondead event is invoked, I would assume its on one of the recieveDamage functions(Im sure Ive seen it cant remember where). if(currrentHealth <= 0) onDead.Invoke(gameObject, damage);
(4) Find the OnDead fucntion and check sender (since the onRecieveDamage would return if its dead the sender would be the last one to attack) if (sender.GetComponent<v_AICompanion>()) // The companion has killed the AI + 25 exp if (sender.GetComponent<vThirdPersonController>()) // The player has killed the AI + 25 exp
|
|