Inteligencia artificial para NPC basada en objetivos.
Características
- Esta técnica funciona asignando a cada personaje, a los que llamaremos agentes diferentes planes. Cada plan está formado por varias acciones hasta llegar a una acción objetivo, en cuyo caso se generará un nuevo plan. Así mismo, cada personaje puede tener varios planes asociados.
This technique works by assigning each character, which we will call agents, different plans. Each plan is made up of several actions until a target action is reached, in which case a new plan is generated. Likewise, each character can have several plans associated with it.
- En el caso concreto del juego mostrado aquí, tanto los objetivos de los agentes como sus propios movimientos están realizados utilizando esta técnica.
In the specific case of the game shown here, both the agents’ objectives and their own movements are realised using this technique.
- El agente Guardián tiene como objetivo alcanzar al agente andrómeda, para lo cual previamente debe de conseguir tanto una llave como un arma. Si consigue alcanzar a andrómeda, el jugador habrá perdido.
The Guardian agent has the objective of reaching the andromeda agent, for which he must first obtain both a key and a weapon. If he manages to reach andromeda, the player has lost.
- El objetivo del jugador es eliminar al Guardián antes de que consiga llegar hasta andrómeda.
The player’s objective is to eliminate the Guardian before it reaches Andromeda.


Además, hay otros tres agentes.
In addition, there are three agents more

Este tipo de agente siempre patrullará alrededor del Guardián, a modo de escolta.
This type of agent will always patrol around the Guardian, as an escort.

Este tipo de agente siempre patrullará en modo Wander por el escenario.
This type of agent will always patrol the scenario in Wander mode.

Este tipo de agente siempre patrullará siguiendo los waypoints asignados a cada uno.
This type of officer will always patrol following the waypoints assigned to each officer.
Los movimientos Goap de todos los NPC básicos son:
- Patrol Mode: En este modo el NPC patrulla ya sea en modo Wander, Waypoints o alrededor del Guardián.
- In this mode the NPC patrols either in Wander Mode, Waypoints or around the Guardian.
- Chase Mode: Si se detecta al jugador en un ángulo y distancia concreta, el NPC perseguirá al jugador.
- If the player is detected at a specific angle and distance, the NPC will chase the player.
- Attack Mode: Si el jugador se encuentra cerca, atacará.
- If the player is close, the NPC will attack.
- Repair Mode: Si el NPC baja su nivel de vida por debajo de un umbral, huirá a repararse al punto de reparación más cercano, siempre y cuando no esté atacando.
- If the NPC’s health drops below a threshold, he will flee to the nearest repair point, as long as he is not attacking.
- Hide Mode: Al llegar al punto de reparación comienza a repararse.
- Upon reaching the repair point, he starts repairing himself.
- Protect Mode: Si el jugador está atacando al Guardián, todos los NPC se dirigirán hacia el jugador para defender al Guardián.
- If the player is attacking the Guardian, all NPCs will move towards the player to defend the Guardian
- Todos los movimientos pueden ser interrumpidos en cualquier momento si cambia el estado del mundo. Por ejemplo, si se está en modo de reparación, pero el jugador se acerca a atacar, el NPC pasará también al ataque.
- All movement can be interrupted at any time if the state of the world changes. For example, if you are in repair mode, but the player approaches to attack, the NPC will also go on the attack
Pinche aquí para jugar versión WEBGL. Click here to play WEBGL version.
