Prototype of Artificial Intelligence for enemies — Unity

Introduction

In this arti­cle we see a pro­to­type of arti­fi­cial intel­li­gence for ene­mies in Unity. 

These ene­mies will be in dif­fer­ent states accord­ing to what hap­pens dur­ing the game. The states are "Guard", "Search­ing", "Attack­ing", "Cov­er­ing".

The idea for this pro­to­type came about because a per­son wrote to me in the channel's com­ments ask­ing how you could get ene­mies to detect you, alert each oth­er, warn oth­ers and attack. 

CHECK OUT THIS CRAZY EXPERIMENT

To answer your ques­tion I cre­at­ed a project at Uni­ty propos­ing an approach to the prob­lem and made a video explain­ing how this pro­to­type of arti­fi­cial intel­li­gence for ene­mies worked. You can see it below.

Download project files

You can down­load the project files to import and view the scripts in detail.

What are we gonna do with this?

At the moment it's just a pro­to­type that I made on a week­end and that meets the prob­lem I was posed.

How­ev­er every­thing can be improved, I am think­ing of cre­at­ing a more com­plex sys­tem based on this, improve the code, mod­u­lar­ize more, cre­ate a bet­ter mod­el for the weapon, sep­a­rate the range of vision of the Ene­my Script, improve in gen­er­al the indi­vid­ual states.

YouTube
Scroll to Top
Secured By miniOrange