Simple NPC and Intelligent NPC

Source: Internet
Author: User

NPC can be divided into two kinds: the simple NPC and the intelligent NPC, the two kinds of NPC's processing logic is different.

The difference between the two NPC is whether the NPC AI script exists.
The simple NPC does not have AI scripts, only the NPC moves, the simple response of the attack.
The smart NPC is controlled by AI scripts.

From the processing logic, the simple NPC does not need independent AI processing, and the intelligent NPC has an independent AI loop.
The intelligent NPC is an intelligent creature that responds to the game world when it is the same as the persona.
A simple NPC has the same treatment as an object, just some data, and if no intelligent creature can perceive them,
They do not need to exist and do not need to be processed by the game Master loop.
When the perceptual regions of intelligent organisms contain simple NPC, they are instantiated.

For example, two smart NPC will attack each other, regardless of whether there is a person looking around,
The server is always handling their movements and attacks.
And simple NPCs do not exist if there is no intelligent biological observation around them,
The server does not need to handle a simple NPC that does not have to be aware.

Intelligent NPC requires Game Master loop processing, should minimize quantity.
If the behavior of the smart NPC is OK and does not need to be handled at all times, it should be converted to a simple NPC.
For example, the gyrus of the NPC is determined, and the amount of T1 time is known, so when it enters the role perception at T2 time,
The amount of blood can be calculated from the time difference, not necessarily in the t1-t2 period
There is no need to think of it as a smart NPC for computing gyrus.
If the NPC can eat red drug gyrus under AI script control, the server cannot predict the gyrus amount,
The NPC is a smart NPC and must be handled at all times.

(Jin Qing's column)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.