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. |
|
Monday Dec 08, 2008
My First JavaFX Game: PAC MAN (updated example) I updated my JavaFX PACMAN game with some features today:
1) The ghosts can run away from the pacman after the pacman eats the magic bean.
Right now, 85% of the game is completed. Things to do:
JRE 1.5+ required, JRE1.6 U10 is better, click on the below image or button to start playing, or watch it on Youtube:
If you cannot play now, you can watch the video:
Posted at 07:39AM Dec 08, 2008 by morningstar in JavaFX | Comments[19] |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nice work can I have code please
Posted by Anuradha on December 08, 2008 at 08:17 PM PST #
Doesn't do much on OS X. The board comes up, and you can press a key to 'start', but no sign of Pac-Man or any ghosts.
It's kind of amusing to contemplate the shock and horror of the original game creators at seeing their game take 2.8 megabytes on disk?
Posted by Jesse Barnum on December 08, 2008 at 08:27 PM PST #
Hi Jesse,
I have not tried it on Mac. According JavaFX spec, it should work on Mac OS. I only run it on Windows.
My code only takes up about 80KB. It is probably the JavaFX runtime(including some native libraries) that occupies 2.8MB.
Posted by morningstar on December 08, 2008 at 10:31 PM PST #
Anuradha,
I will probably release the source code when I finish the game. Maybe you check back with me a bit later. Thx.
Posted by Morningstar on December 08, 2008 at 10:37 PM PST #
Excellent work!
Loads very quickly and is looking really good.
Posted by Patrick on December 09, 2008 at 12:16 AM PST #
Funny that it does not work on mac, it works fine on linux (whereas with the annoucement about javafx being only for windows and mac I did not know what to expect).
Posted by Marc on December 09, 2008 at 04:34 AM PST #
I don't have a Mac machine to run. Has anyone successfully run it on Mac? Solaris and Linux is possibly supported as long as the code does not have native call(i.e. pure java code). The current JavaFX SDK 1.0 does not have native libraries of Solaris and Linux.
Posted by Morningstar on December 09, 2008 at 04:43 AM PST #
I must agree, loads extremely quickly and looks extremely good. Plays well.
I must say, the future for java apps looks bright. I only beef is our deployment strategies, but we'll get there.
PAC ON BABY!
Posted by Francis Adu-Gyamfi on December 09, 2008 at 07:56 AM PST #
I just finished level 1 on my Mac (Leopard, as current as possible).
Posted by Jason Lee on December 09, 2008 at 08:03 AM PST #
Nice. Add sounds effect and 'perfect'.
You could allow a full screen mode as well....
Posted by 86.142.182.65 on December 09, 2008 at 09:24 AM PST #
great game! works great on linux (ubuntu 8.10).
Posted by eitan on December 09, 2008 at 12:06 PM PST #
Works well on Mac 10.5.5 with latest Java version
Posted by aehrenr on December 09, 2008 at 12:52 PM PST #
I think the problem on Mac occurs only with JDK5 (max for 32bit Intel or PowerPC). I see exactly what Anuradha described on my 32bit Mac (Leopard).
Posted by Igor Minar on December 09, 2008 at 05:39 PM PST #
Running on Mac OS X on Tiger (java 5) I realized the game is actually running, but all the sprites are invisible. I can move the keys around and my invisible pac man gobbles up dots. I ran around for a bit until encountering an invisible ghost, at which point the pac man sprite became visible only long enough for me to witness his gruesome demise.
Posted by S Barnum on December 10, 2008 at 09:21 AM PST #
correction - I meant Jesse Barnum not Anuradha and was referring to the second post from the top
Posted by Igor Minar on December 10, 2008 at 10:13 AM PST #
Very nice.
I just remember a French television company had licenced Java VM for its TV boxes during the nineties. They have developped their own VM for embedding it into their boxes. In order to validate their VM implementation, the main developper has been autorised to develop a game on top of VM, it was "Boulder Dash" ( http://en.wikipedia.org/wiki/Boulder_Dash ).
So, I think it's nice to see games developped on top of JavaFX, it's may be even better than animation demo for promoting JavaFX ;-)
Posted by Dominique De Vito on December 10, 2008 at 10:19 PM PST #
thanks this nice Article
Posted by Air Jordans on December 12, 2008 at 01:34 AM PST #
Nice game, it works perfectly on OpenSolaris !! Even if JavaFX is not yet ported to OpenSolairs ;)
Posted by Karim on December 12, 2008 at 01:45 AM PST #
...Works fine on my Mac Book Pro...
Posted by AlskiOnTheWeb on December 19, 2008 at 02:52 PM PST #