Zombie/Minion AI System (Custom Humanoid)

Heyall!

I am working on a AI system that would patrol and follow a player which is near to deal damage.

I have coded a custom humanoid for this as it helps a ton with the performance.

In the gif you can see 200 minions in action with >59 FPS.
Also note that it currently has 3 states.
Blue = Patrolling
Green = Following
Red = Attacking

And this is a preview of 600 minions in action with <35 FPS (kind of the limit)

Imagine what would happen if i was using normal Humanoids in that case

By the way i have later realized that those were captured in studio which makes the action much more appear slower. In live place, the performance is even more improved!

Comments and feedback/suggestions are much appreciated :pray:

12 Likes

Seems cool!
30 character requirement

1 Like

Thank you!
Ive actually mostly made this post to hear what else i could add to this and potentially maybe on future open source it so others could bot struggle making their own zombies or minions for their games!

1 Like

Aditional information also may be asked, i am willing to answer anything i could

1 Like

This looks really cool! Good job! I like how the color changed depending on its state.

1 Like

Are you using 1 script to control all of them or no?

I commend you for creating a custom humanoid. Having tried making custom classes myself, I know how difficult that can be.

This seems more oriented towards melee characters. In addition, the range of engagement seems rather small, which makes me feel like this is meant for a Roblox RPG of some sort.

I have no real comments / feedback / suggestions on this AI. I feel like it will need some more fleshing out before I can really see how it’s being implemented.

Nice work.

1 Like

One script creates all minions, minions then are self controlled. OOP basicaly

These are all available configurations/properties of the Agent and Custom humanoid classes:

Agent:

Humanoid:

1 Like

It looks really good!
One thing I wanted to ask was can it detect and avoid obstacles like walls?

The current system does not support that, i did not implement any pathfinding mechanics to it as it is not in my needs fror the current project im working on.
But maybe later when i adapt on this system, i will definetaly add that option as well!

Can you make a AI script that makes ANY Npc (dragons, dogs, cats, non-human creatures, etc) ONLY walk, run, jump, sit down, dance and play an animation in a random moment? You will be my hero if you can do it :pleading_face: :pleading_face: @Imaginze

Animation support is wip and expected to be done within this month

1 Like

Quick question, does this system use pathfinding service? Also are the models anchored and how are you moving them?

If they aren’t anchored I’d recommend doing that have coding a steering behaviour for the AI, this could help improve performance by a fair bit, I also recommend making the collision for all the NPCs off if possible.

Currently it does not use pf. However it will use that if i am going to release this as an open source system.

The models are not anchored and their movement is completely done by using physics (body movers). That way i also achieve auto replication to every clients with least amount of performance issues. Whats more, if i were to make this work using cframes only, collision detection would be a pain.

Collisions between agents is configurable as well

It looks Awesome!
Btw it’s so satisfying to see them, cute. :grin:

1 Like

What body movers are you using exactly?