The 2nd article of the series, “Writing the Pac-Man Game in JavaFX“, is published today.
The first article introduced a data model in Java and the JavaFX drawing logic of the maze. In the 2nd article, the animation part of the Pac-Man character is detailed. When you are reading, you can click on the java web start links to see the Pac-Man opening and closing mouths, and gradually moving inside the maze. The keyboard handling code is illustrated as well.
Some JavaFX features demostrated in these two articles include:
. shapes . keyboard handling . animation timeline . java code integration . Transfromation
Hope you can enjoy reading the articles. You can use arrow keys to play a no-ghost version of the game. The Pac-Man character now can move around and gobble dots. Try it by clicking the below screenshot: