See Having Some Issues With Making Pacman to understand this question fully. Just look at the first part of the accepted answer. And this is in java!
I am using the array as shown in the link above. I have my pacman character moving around fine other then the fact that it is moving 21 pixels every 100ms therefore it's not smooth at all.
Currently I'm just multiplying the x and y of the current array position by 21. I'm wondering how I would go about making this smooth. I have tried some ways of how to move but they have not worked and I'm not very skilled and my ways are not efficient, therefore I have come here looking for a good way to move around smoothly.
Some things that you may need to know: Pacman is first checking spot in direction of key press.(example: right arrow down. Is it clear?) If clear it will proceed to call another class which handles moving pacman until there is a wall or enemy.
You need to create two loops. A game loop, which works out the logic of the game, and runs every 100ms, and an animation loop, which runs more frequently, maybe every 20ms and calculates where all the sprites should be.
// in pseudo code
sleep 20 ms
if i++ % 5 == 0
do game loop
do animation loop with i
// passing i to animation loop will allow you to easily calculate how far sprite is along path to destination