All the Interesting ThingsThis 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: Other links: Posted at 11:22PM May 28, 2009 by morningstar in JavaFX |
Thursday May 21, 2009
Second Article on Writing the JavaFX Pac-Man Game Published
The second article of a series, "Writing the Pac-Man Game in JavaFX - Part 2", is published today. In the first article, I introduced a data model expressed in Java and the JavaFX drawing logic of the maze. In the 2nd article, the animation 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 logic is introduced as well. Some JavaFX features demostrated in these two articles include: . shapes . animation . keyboard handling . java code integration . Transfromation Hope you can enjoy reading the articles. You can use arrow keys to control the Pac-Man character to move around and gobble dots. Try the never-to-die version of the game by clicking the below screenshot:
Other Related Articles: Posted at 11:54PM May 21, 2009 by morningstar in JavaFX | Comments[1]
Monday May 18, 2009
JavaFX Demo Program: Wish Tree
To give some fun to my kids, I wrote a small JavaFX program to let them make wishes on a wish tree( such as 'I want a Barbie'). If they do something good, they may be awarded a wish coming true. :) This program uses effect classes of JavaFX API to create the scene. Colorful stars can be placed on the tree to stand for wishes. More details inlcluding source code of the program can be found here: JavaFX Wish Tree. You can click on the below web start image to start placing your wishes on the tree now. Just click on the tree and enter your name and wishes. Enjoy! (JDK 1.5+, better with JDK 1.6 U10)
Posted at 10:21PM May 18, 2009 by morningstar in JavaFX |
Saturday May 16, 2009
Five Articles on JavaFX Pac-Man Game
Posted at 09:23AM May 16, 2009 by morningstar in JavaFX |
Thursday May 14, 2009
My Articles on Writing the Pac-Man Game in JavaFX
After I wrote the Pac-Man game with JavaFX, many people were asking me to give more details on writing the game. JavaFX guru Jim Weaver had invited me to write some articles on the game. Now, with Jim's help, our articles are featured on O'Reilly's insiderRIA.com . Here is the link to the articles: Writing the Pac-Man Game in JavaFX Posted at 08:51PM May 14, 2009 by morningstar in JavaFX | Comments[1] |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||