A.I.

A.I. in Game Maker

A.I Guide

A.I. or artificial intelligence is easier than you may think when A.I. is considered in the context of most video games. What passes for A.I. is actually simple scripted behaviors such as walking across a platform, following an object, or executing a boss pattern.

Advanced A.I. is only needed for strategy games such as chess and strategy RPGs.

Simple A.I. Behaviors

Simple A.I. behaviors tend to be based on one of several simple things :

  • A single (or couple) of basic calculations. (see Following).
  • An order of events (as in boss A.I.
  • The result of a random number generator.

End to End Platform Walking (Platform Guard)

This can be done in the drag and drop or in code. To accomplish this in drag and drop first create a sprite and set it to transparent, and name it spr_marker. Then make an object and name it obj_marker. In your enemy set a collision with obj_marker and put reverse horizontal movement in the movement section of the Drag and Drop menu. The code version will be added soon.

Following

(Main article: follow)

Following requires an object to find and know where another object is and then move towards it. Most versions of pong make the computer player follow the ball — but only along one axis.

Boss A.I / Patterns

In most 2D games, bosses lack any kind of real artificial intelligence. They just follow a pattern. One of the best ways to create such a pattern is to use a time line to space the actions in the pattern.

Complex A.I Behaviors

Bot A.I.

Bot A.I. is A.I. used in constructing independent or semi independent constructs which may act alone or as part of a team.

Team / Group A.I.

A more complicated A.I. construction is team or group A.I.

Bots in a first person shooter may act under the direction of the player or as the opposing team while using teamwork.

Pathfinding

Pathfinding is a form of A.I. which uses an algorithm to make an object avoid obstacles. Game Maker as a couple of pathfinding functions built in. They are