View unanswered posts | View active topics
Forum › CryENGINE 3 › Sandbox 3 Editor › AI & Smart Objects › Several Questions About AI in General
|
|
|
Hattoff  |
Beginner | Member since: 09.05.2012, 19:43 | Posts: 6 |
Likes: 0 |
| |
|
Post Topic: Several Questions About AI in General Posted 16.06.2012, 01:54 |
Ok, please bare with me because I have several questions. I will Bold and Underline every question so you can find them easier, and underneath every question I will add an example to help you understand the question in context. If my descriptions are too confusing, please tell me so I can reiterate. I thank you all in advance for your knowledge and advice!
Please keep in mind that my questions about these AI are to help me create a procedural world with as little scripted events as possible. I would prefer to use the node system, but I am not afraid to write out the code if you have a specific example. If you don't know of a specific example or way to do something, don't worry. I am simply looking for a confirmation if this is doable, but if you happen to know how to write one these or have a source, please link me or feel free to explain.
Question 1: Can I have one AI govern a series of other AI?
For example: I want to create a "Governing" AI that controls the spawning and behavior of "Grunt" AI. My idea is to create something similar to Grand Theft Auto where several AI will spawn when the player gets close enough and then de-spawn when they get far enough away. I am planning to simulate traffic jams and similar instances, but that will require the Governing AI to simulate "groups" of AI behavior while the player is not close enough, and when the player gets close enough to a group, the Governing AI will spawn the several instances that make up that "group" of AI. This will allow me to simulate a huge city with less resources, but still get the effect similar to thousands of AI interacting with each other continuously.
Question 2: Are computers and-or the game engine more taxed by complex AI, or by several less-complex AI?
I would like to have a large number of AI on-screen. Will significantly more resources be required when running more advanced AI, or would I only have to worry about the number of AI I a putting on-screen, or is it a combination of both?
Question 3: What is a reasonably large amount of AI on-screen?
What would be a recommendation to the number of AI on screen? I would think that 50 is a large number, especially for a city sim, but I would like to see higher numbers closer to 80 or 100.
Question 4: Are there pre-set limits to the number of AI total and on-screen?
Regardless of the recommended number of AI on-screen, is there a Cryengine 3 set limit to the numbers of AI I can have?
Question 5: Is there a way I can define spawning zones for AI when the "Governing" AI (see Question 1) initially spawn the AI groups?
For example, I don't want city-slickers spawning in a rural farm, can I define borders with map coordinates or something similar? I don't care if the AI blend as the game goes on, so writing avoidance paths for different AI is not necessary or even wanted.
Thanks for reading and replying I may have more questions later, but this is all I am worried about currently. Thanks again for your patience.
|
|
|
|
|
|
|
|
 |
Tracer  |
Uber Modder | Member since: 20.01.2009, 02:39 | Posts: 1922 | Location: DFW, Texas |
Likes: 26 |
| |
|
Post Topic: Re: Several Questions About AI in General Posted 16.06.2012, 02:19 |
1) Yes, that is done with |AIWave| entities. When the player is close enough, they can be triggered to spawn, and despawn on command.
2) I'm not completely sure, but the CryEngine should handle both equally well.
3) I recommend a max of about 50, but this varies from system to system. To keep performance stable across different systems, stay around 35.
4) I'm not sure about this either, but I've exceeded 100 with only minor performance hits. It depends completely on your system. As far as I know, there is no scripted limit, not any I've run into.
5) Yes the |AIWave| Entity will spawn AI only at THAT point, and they will spread from there. You can also link the entity to an area box.
Lead Flowgraph Designer, Binary Sword Pty LtdFlowgraphs? I'm your guySarcasm is ON OFFQuote by Lavizh: Holy shitsticks. That's pure beauty! 
|
|
|
|
|
|
|
Hattoff  |
Beginner | Member since: 09.05.2012, 19:43 | Posts: 6 |
Likes: 0 |
| |
|
Post Topic: Re: Several Questions About AI in General Posted 16.06.2012, 10:13 |
Thanks Tracer, you are an excellent help! I greatly appreciate your answers and can't wait to begin experimenting as soon as I read up on AIWave and corresponding features.
If you wouldn't mind helping me clear something up though? First off, will the AIWave feature also spawn in more than just AI? For example, in Grand Theft Auto, AI spawn in cars when the player gets close enough as well. I would like to do something similar where AI either spawn in cars, or they spawn with specific items or spawn them in the middle of a specific action to enhance realism.
Also, as I stated in my questions, I am looking to have a governing AI which will simulate the interaction of large amounts of AI elements by essentially 'grouping' them. I will simulate their interaction with other groups, and then 'separating' them into individual AI when the player gets close (essentially spawning the AI at the particular spot the governing AI decided the group would be at, rather than spawning them randomly or scripted). Basically this is a bit like your answer to question 5, but asking if I can relocate the spot they spawn at as the game progresses.
One final question, as I am spawning these AI I would like to keep tabs on them. I would like to actually simulate a city as best as I can, and that means that the population I designate in the beginning should never increase, and that those who die should subtract from the total count the governing AI can spawn. For example: say I have a small town of 30 people, and the governing AI spawns the townspeople when I get close enough. If I were to shoot 22 people, the governing AI should only spawn a maximum of 8 people when I get close enough, and not the original limit of 30.
Thanks for all the help again; I am reading the documentation but it is nice to get a heads up about the limits of what I want to accomplish before I dedicate two months poring over every command, node, and script; this way I can change my plans and study for them accordingly.
|
|
|
|
|
|
|
 |
Tracer  |
Uber Modder | Member since: 20.01.2009, 02:39 | Posts: 1922 | Location: DFW, Texas |
Likes: 26 |
| |
|
Post Topic: Re: Several Questions About AI in General Posted 16.06.2012, 19:18 |
OK, well the |AIWave| Entities will only spawn AI, and not vehicles. However, It is possible through Flowgraphing to say, spawn one vehicle in the vicinity every time the |AIWave| triggers a spawn. Then it would be simple to rig a master logic that tells AI to enter the nearest vehicle and start following roads. You could even make it a probability (E.G, ON spawn, 50% chance- IF TRUE, AI ENTER vehicle.
On to your second question, the CryEngine 3 is so flexible when it comes to AI that this part is almost simple. Now, each |AIWave| entity is set via flowgraph to spawn a certain number of A.I ad infinitum until it is turned off. However, rather than trying to move the spawn, just have another spawner disabled at the second location. When the first |AIWave| entity is disabled (player leaves the area) the second |AIWave| entity will be enabled, spawning the same AI.
Third question (almost done!) This is the easiest one of the three. All you have to do is have a |Math:Equal| node linked to the |AIWave| Node at the BodyCount output. Like so... (The BooleanFrom Node is optional. I just prefer using it)
Lead Flowgraph Designer, Binary Sword Pty LtdFlowgraphs? I'm your guySarcasm is ON OFFQuote by Lavizh: Holy shitsticks. That's pure beauty! 
|
|
|
|
|
|
|
Hattoff  |
Beginner | Member since: 09.05.2012, 19:43 | Posts: 6 |
Likes: 0 |
| |
|
Post Topic: Re: Several Questions About AI in General Posted 17.06.2012, 03:17 |
Tracer, you rock. Thanks so much!
|
|
|
|
|
|
|
 |
Tracer  |
Uber Modder | Member since: 20.01.2009, 02:39 | Posts: 1922 | Location: DFW, Texas |
Likes: 26 |
| |
|
Post Topic: Re: Several Questions About AI in General Posted 17.06.2012, 05:00 |
Always happy to help
Lead Flowgraph Designer, Binary Sword Pty LtdFlowgraphs? I'm your guySarcasm is ON OFFQuote by Lavizh: Holy shitsticks. That's pure beauty! 
|
|
|
|
|
|