1
Graphics / Move Pacman/Snake automatically
« on: February 11, 2012, 09:26:04 pm »
Hi,
I have developed a pacman game in SFML.
The pacman is moving through the grid now only when the keys are pressed.
How can I change that to move Pacman move automatically one block of a rid at a time? That is, the pacman will be moving and arrow keys are only used for direction change. This is the behavior in a normal pacman or a snake game.
I have used delay and sleep only to end up unsuccessful.
Please help me.
I have developed a pacman game in SFML.
The pacman is moving through the grid now only when the keys are pressed.
How can I change that to move Pacman move automatically one block of a rid at a time? That is, the pacman will be moving and arrow keys are only used for direction change. This is the behavior in a normal pacman or a snake game.
I have used delay and sleep only to end up unsuccessful.
Please help me.