Bad guy
We'll define the bad guy's properties; these include his spawn point, direction of motion, and speed of movement.
--the enemy table holds all the parameter we need for the enemy's movement enemyTable = {} --length enemyTable.l=0 --space between the bottom and the ground enemyTable.t=0 --width enemyTable.w=32 --height enemyTable.h=32 --direction enemyTable.dir=-1 --initial velocity in x direction enemyTable.vX = 0 --animation state based on direction enemyTable.animation = EnemyLeft ---set speed and death/life Boolean local EnemySpeed = 25 local EnemyDied = false --get the enemy sprite image file local enemyImage = love.graphics.newImage("maps/wheelie_right.png") ---configure animation for enemy local a8 = anim8.newGrid(32, 32, enemyImage:getWidth(), enemyImage:getHeight()) local EnemyRight = anim8.newAnimation( a8('1-4',1), 0.9) local EnemyLeft = anim8.newAnimation(a8('1-4',1),),0.9,nil,true) ---now the EnemySpawn() function, this basically holds the parameters to update the enemy...