#Modular Character/Player/AI System

1 messages · Page 1 of 1 (latest)

tawdry prism
#

Let's start with the simplest part.

Create a CharacterController node. It uses a controlled_character variable to decide what character node is being controlled. It issues action commands to the controlled_character. Make one for each controller detected.

Create a CharacterAI node that uses a goal-oriented finite state machine to select the next action command(s).

Each character nodes decide how to do those action commands (they might ignore the command if they can't do the action).

#

Abilities can get complicated very quickly, and making them modular will depend a lot on what type of game you're making and what sort of operations an ability actually controls.

#

For example, do the same dodge animations work for every character? Or does the character need to decide what dodging means?

hearty terrace
#

The same dodge ability should be the same for every character, at least the basic functionality. For example, the animation is called the same, but is different. The behaviour itself is also the same, e.g. you move horizontally in one direction as long as the animation is playing, but the distance of this movement can vary from character to character.