Is this all being handled on the server?
No, it’s to prevent roblox from running extra background checks to see whether or not an entity should have it’s state changed. Humanoids aren’t magic, for every state that is enabled (which is by default all of them) extra checks need to be done every frame.
This can noticeably slow performance down with a high enough volume of NPCs.
Yes. We plan on later (if possible) to convert it over to client side
Is there an exact way to disable this? Can’t find it in the Humanoid
Humanoid:SetStateEnabled([HUMANOID STATE ENUM], false)
That’s likely going to be your largest issue on performance. There’s a really good article
that explains how to do really good optimizations for a tower defense game here: How we reduced bandwidth usage by 60x in Astro Force (Roblox RTS)
The concepts and techniques this guy uses are really good in practice not just for tower defense games but in general.
Correct?
Got it! Thanks. Do you however understand how to fix my issue with the enemies?
You should be able to disable all of them, I think roblox re-enables the core ones by default like running (unless you have some states you’re intending to use at which point you could do some micro optimizations by only enabling them as they are required)
are collisions enabled on the enemies?
That’s interesting. Definity will look into this. Never knew that existed.
No, some enemies are going to collide with each other. We have it so enemies cant collide with enemies or players.
is there a way to fix this?
You want some enemies to collide with other enemies or no enemies colliding with any enemies?
Enemies cannot collide with enemies or players.
Probably just some removed state. Just comment them out until you find the culprit(s)
To me in the first photo, it looks like the enemies are colliding with each other which is why their paths seem off
It was
Enemy.Humanoid:SetStateEnabled(Enum.HumanoidStateType.None, false)
try rotating the spawn part 180 degrees so the enemeis dont have to turn around when they walk the path. It seems like they have a 50/50 chance of either turning left or right when they spawn which is whats causing them to be somewhat scattered.