I appreciate the defensive and hostile tone where not necessary.
I’m not assuming that OP can’t, I’m saying that a BT doesn’t automatically equate to efficiency. OP isn’t the only one who reads this thread. Others who see your solution are going to attempt what you put and their BTs could easily be inefficient. It’s important to clarify that a BT isn’t the magic solution to performance and respective efficiency problems can still occur when implementing them.
Think of it from the perspective of multiple people, both as OP and as someone looking for a solution to a problem that others are having as well. I’m one of the people on that boat. Replying doesn’t mean I know for sure what I’m talking about and I could be easily wrong where proven. I’d like a solution for handling lots of NPCs as well, but a BT doesn’t say anything about improving NPC performance…?
Humanoids themselves are expensive. Your expenses add up when you start using those Humanoids to interact with things. The Humanoid pipeline needs to account for SEVERAL things at one given time, including physics, rendering and replication. A 6ms response time is a performance problem and both code and Humanoids are involved in attempting to diagnose the problem. It is a Humanoid problem.
I’m not insulting you at all. None of my posts have been ad hominem. I simply disagree with the points you’ve raised and I’m explaining why I disagree, using personal experiences and common topics from the DevForum to back my replies. The DevForum is a place for construction. Again, I could be wrong, but you’re not explaining why and it doesn’t help to get pointlessly heated over it.
I posed a solution. You disagreed. I disagreed with your disagreement. That’s not arrogance. My responses seem fairly calm and again, I’m using other sources to back my stances. You can just as easily do the research before replying. I’d hate to ramble off about things I don’t know about and act as if what I’m saying is fact. I don’t know that for sure, but
- No one’s disagreed with it or explained why I might be wrong.
- I’m not working out of thin air. I’ve searched before and done some reading. Simply searching up Humanoids and combining them with a problem keyword (e.g. performance, inefficiency, hacky, etc) can bring up a lot of threads about this very problem.
Yep. Often one of the first steps of optimising Humanoids, aside from the code, is to address the NPC itself. Common first steps for optimising NPCs include disabling unnecessary states and managing network ownership appropriately.
On the topic of network ownership, automatic network ownership on NPCs can cause latency due to changes in ownership, resulting in jumps. Always good to leave NPC ownership to the server. Or, like I proposed earlier, have the client render the NPCs and the server only manage them as single-Instances. That way, the primary bottleneck is your own computer.