#5 —A bit of the AI

Doing an artificial intelligence for a game is always a challenge, even more when you don’t have any experience coding games. Before applying any AI directly to the project I create other project to make simple tutorials and learn more about GamePlayKit.

Initially I created a logic to the enemy chase the player, however, in this moment, it didn’t match with the level idea, because the enemies could fall in the abysses and challenges.

Not everything happens as expected.

Proceeding with the AI of the enemy, I created a simpler movement that matches with the idea of platform game. Inspired by Mario’s turtles the enemy goes forward til an abyss or obstacle, similar to a sentinel’s guard and changes its position when necessary.

Rodrigo Franzoi (iOS Developer)