Final Project: Zelda 291: Artificial Intelligence
by Barry Huntley
Theory: Each individual AI routine is tailored to the individual properties of each enemy. It bases
its movement and attacks upon the proximity of Link to the enemy as well as the layout of the blocks
in the room. Also, for every enemy killed in a room, the remaining enemies sight range is increased.
Internal Structures: None, the AI only uses other structures. (Specifically, the GameObject and GameRoom structure)
- AIObject (Public)
- AIObject PROTO far C EnemyPtr:word, RoomPtr:word
- Purpose: This function is the only public function of the Artificial Intelligence API.
It determines which type of object has been passed to it and then calls the appropriate
private AI function listed below.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AILockwamentus (Private)
- AILockwamentus PROTO near C EnemyPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for the Lockwamantus enemy.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AIGel (Private)
- AIGel PROTO near C EnemyPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for the Gel enemy.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AIGoriya (Private)
- AIGoriya PROTO near C EnemyPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for the Goriya enemy.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AIKeese (Private)
- AIKeese PROTO near C EnemyPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for the Keese enemy.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AIStalfos (Private)
- AIStalfos PROTO near C EnemyPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for the Stalfos enemy.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the AI movements/attacks.
- Notes: The pointer to the gameroom will be used to determine walking direction.
- AIFireball (Private)
- AIFireball PROTO near C FireballPtr:word, RoomPtr:word
- Purpose: This function will determine the next movement for a fireball weapon.
- Inputs: A pointer to the fireball.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the fireball will be updated to reflect the new movements.
- AILink (Private)
- AILink PROTO near C Link:word, Room:word
- Purpose: This function will determine the next movement for Link.
- Inputs: A pointer to the object whose AI is being requested.
A pointer to the gameroom structure to determine valid movements.
- Outputs: The status variables of the enemy will be updated to reflect the keyboard/joystick inputs for link.
Back to the main project page