im making a kinda rpg game wich has an section whit pac-man like enviroment. i have the enemy, an person whit red glowing eyes and evil look, and the pac man, a guy eating his way in the maze.
im trying to have the enemy navigate towards the enmy, but whitout hitting any walls. i made loads of dots, which he should follow. he goes to the dot that is closest by the player, and reapeats this till he meets the player.
for this i use a mask that overlaps the dots so the enemy detects the dot and moves to it. but somehow the enmy doesnt center on the dot, but it hits on the top and then search for new dot. the mask is a cross of 1 pixel wide, so when it collisions its sure that he doesnt hit any walls. but this isnt working i had to chance the cross to a very large variant to make it detect the dots. this makes the enemy not move in straight lines, which is needed for this game to work properly
the game is on layout "kelder"im posting the cap here whit all the code. im trying to get this pac-man thing working for like a few weeks, so i would be very happy if someone could help me out:(
if anyone could help i would be very very happy