All the Interesting Things

This is a personal web log. All information posted here does not represent my employer. I do not speak for my employer.
Thursday May 28, 2009

3rd Article on Writing the JavaFX Pac-Man Game

The latest JavaFX article of writing the Pac-Man game is published today. It is the third out of a five-article series: "Writing the Pac-Man Game in JavaFX - Part 3".

In this article, the ghosts are introduced. The animation of the ghosts are almost the same as the Pac-Man character. It is basically moving a CustomNode and switching the images. There are three sets of images for the animation: normal, hollow and flashing. The moving algorithm of the ghosts is the heart of the code. In this article, for simplicity, a random moving algorithm is applied. A more complicated moving behavior of the ghosts will be introduced in Article 5. Click on the below image to try the program so far. The Pac-man and ghosts cannot eat each other even they meet in the maze.



Related Articles:

Pac-Man Game WidgetFX Widget
JavaFX Game Example Code: MineSweeper
JavaFX Game Demo Example: Pac-Man

Other links:

Applicant of American Citizenship Information, software and guide.
Guide American Citizenship in United States
Canadian Citizenship Application and Practice Exam
Haining Zhang

Comments:

Post a Comment:
Comments are closed for this entry.

Archives
Links
Referrers