Implementing AI into a game:

There are a couple of methods I plan on using to incorporate AI usage into a game the first of which would be to implement Boids Flocking to a group of animals such as birds or fish etc which would be used to mimic how animals would react in certain situations for example so may flee on site or when there is movement too close, This would be a great way to incorporate AI which would hopefully seamlessly blend in to the game and allow for greater immersion.
Flocking algorithm and rules. Agents (boids) are shown as triangles, interactions as dashed lines, and the radius of perception as differently colored circles depending on the vector considered. Alignment and cohesion reinforce flocking behavior while repulsion disrupts it. In alignment (green), a boid will adjust its trajectory to match congruent flockmates. In cohesion (green), a given boid moves toward the center of mass of all congruent flockmates within its field of vision. In separation (yellow), all boids maintain a minimum distance from one another regardless of whether they are congruent or incongruent. Cohesion, alignment, and separation are the core forces in Reynolds’ original flocking algorithm. We have added repulsion (red) which operates between an agent’s field of vision and the smaller, concentric circle describing its radius of separation. The magnitudes of alignment, cohesion, and repulsion are a function of the phylogenetic distance between the agents as described in the implementation


The next AI aspect I plan to implement would be a stamina bar using fuzzy logic as the character would be moving about quite a lot and sometimes at speed so if they are running then the stamina bar will decrease as they are running and slowly fill up when walking or stationary.
Image result for stamina bar

Comments

Popular Posts