Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How many ai actors can be in one scene?

Hello there, I have always been interested in trying a total war style game. It has intrigued me, any idea how many separate ai units the unreal engine can handle without melting your computer? Any ideas how to increase the number or what would need to be implemented for let's say 5000-10000 units?

Product Version: UE 4.12
more ▼

asked Sep 14 '16 at 10:45 PM in Using UE4

avatar image

139 18 19 26

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Scottc,

I think it completely depends how advanced your AI is, games like total war use a system where they split their AI's in 2.
A commander AI and a Follower. The commander does all the 'thinking', pathfinding, ... and the follower AI will just mindlessly follow the commanders decisions, this way for a big group of AI's it is still quite light for the computer to calculate.

In my tests I can have around 150-200 active advanced AI's running around in the level with some performance loss. Anything higher I see the FPS drop a lot.
If you want to create something like 5000-10000 AI's you might need to dig in the c++ code because UE4 is not optimized for this amount of AI's.

I would recommend you to read this if you are interesed in creating your own AI :)

Hope this helps,

more ▼

answered Sep 16 '16 at 07:48 AM

avatar image

1.2k 24 18 53

avatar image Scottc91 Sep 16 '16 at 04:15 PM

Thanks, I have basic AI set up I used in an old zombie project but it required each ai to "think" for themselves.. so "hearing and seeing" etc. It is very interesting what you describe how total war does it. So if I had x3 groups fo 50 AI. 1 in each group would act as the commander to tell the rest of the group what to do? I'll have a read of that article but could be something I look into

avatar image Scottc91 Sep 16 '16 at 06:26 PM

Also, I have been having a think how this would be implemented. Would it literally be, if I had two separate AI actors with separate blackboards etc. One the "commander" the other "follower".

A simple example... The user right clicks on the screen, the "commander" Ai responds and updates move to points, which are sent over to the follower Ai and they move. Although, this is a simple example, is this basically what you mean? the "Commander" Ai basically issues the orders that the user wants the ai to do

avatar image PasteDog Sep 19 '16 at 07:26 AM

exactly the commander will make all the decisions and the follower will just do what he tells them to do. You can also let the commander be dynamically chosen based on how close he is to the objective.

I would recommend not to use behavior tree's for the followers because there might be some annoying lag on it, and most of the time they need to respond immediately to the commanders command ^^

Good luck with your project! :)

avatar image DK Buzzin Jan 01 '19 at 08:49 AM

I am hoping to use some type of logic similar to this except without using a behavior tree because for starters the "move to" doesnt work in multiplayer. I am just hoping to get around 500 AI's on a level for the players to fight and train on depending on their level. It would help if each small group of AI"s had this commander. Would simply duplicating the AI_BP, setting the duplicate as a child, and just pointing the child to the parent's logic work? I'd probably need to see an example.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question