User Tools

Site Tools


three_dimensional_dynamic_grazing

Concept: Physics-compliant autograzing

Summary

A 3-D game could implement an AI that allows a target to dodge in place if an incoming attack would hit the edge of the target's hit area. The ability to dodge is related to how well the attack is aimed. An attack that is aimed dead center is probably going to hit.

2-D Precedent

Some 2-d action games allow for an attack to randomly “miss” a target. Often, the target sprite animates a dodging movement. This is harder to pull off in 3-d games because there is no extra dimension to fool the player into imagining that the attack may have gone off into. An attack either visibly hits the target or it does not.

Examples

Examples of how this would appear in gameplay:

Street Fighter

The combatant can bob his head, lean to the side, or lean back to cause a punch to miss.

Starfighter

In a spacefighter game, the ship can fire side thrusters or rotate the ship slightly to cause a shot to miss.

Cheap camera work

A cheap alternative may be to move the camera perpendicular to the direction of the attack, temporarily restoring a 2-d viewpoint so that the player may be fooled into imagining that the attack missed.

Components of the Dodge AI

Incoming attack detection

Incoming attack detection. The AI must be able to tell whether attacks will be likely hits or misses, and when the attack is likely to arrive.

In a first-person shooter where gunshots are instant hits based on a line of fire, the dodge AI may be able to detect shots before they are fired based on the player's line of fire and the pattern of firing (shots per second).

Dodge maneuvers

The maneuvers may be based on a scripted set of reactions. A function determines the best action to take based on the angle of the attack.

Recovery maneuvers

The fistfighter stands up straight again. The starfighter fires the opposite thruster to cancel out its momentum.

Notes

For a Street Fighter type game, the dodging motion places the target off-balance until the target recovers. This may restrict the target's ability to move, attack, or continue dodging.

A fighter's attack patterns may be written to include optimum stance requirements. The fighter's stance may be variable, and the attacks have their best effect when the fighter is nearest to the optimum stance. Certain dodge maneuvers can more easily lead into an attack than others.

Alternately, the fighter may have an AI that chooses the most optimum attack to use for the given attack button pressed (light or strong), based on the fighter's current stance.

For an action RPG where players level up, character levels may influence whether the attack AI dodges a given attack or not.

Fine-Grained Movement AI

As a related concept, fine-grained movement in three dimensions is more difficult than in two dimensions. Gameplay can benefit from a movement AI that automatically handles staying on ledges, difficult jumps, etc, allowing the player to merely guide the character in a direction. Such an AI could also be used for the fine-grained movements necessary to dodge incoming but poorly aimed attacks.

three_dimensional_dynamic_grazing.txt · Last modified: 2014/02/22 19:03 by deltatango