In this section, we will outline the steps taken to implement a number of animated enemy sprites that the player must attempt to avoid in order to stay alive. We will also look at the steps taken to implement a simplistic form of artificial intelligence known as patrolling. By utilizing this technique, we can give life to each of the enemies by allowing them to move freely around the level. This will involve the implementation of an
Enemy object as well as adjusting the
Main objects to handle the newly created
Enemyobject, which will be responsible for creating and drawing enemies to the canvas. We will also be updating the enemy's position ...