I ported the original JavaFX 1 code to JavaFX 2 using the Java SE bundle of Netbeans 7.1 Beta on my MacBook. If you want to play the game on a Mac you can install the SDK and samples, download my JAR file, and place it in your samples folder. Double-click the
pacman.jar
file from within the javafx-samples-2.0
folder to launch the game. Make sure you install the samples according to the instructions here.
If you are on Windows, you will need to have Java SE 6 Update 26 or later and the JavaFX 2 runtime installed. If everything is installed correctly, you can click here to launch Pac-Man in Java Web Start. Or you can play in the applet below. If JavaFX 2 is not installed correctly, you will see an image asking you to install JavaFX rather than a working applet.
I can post the source code here or put it on GitHub if anyone is interested. Right now, the code is a bit messy. It still has all of Henry Zhang's original JavaFX 1 code commented-out inline with the new JavaFX 2 code. Enjoy the game!
Nice job!! I would like to see the sources. Thank you.
ReplyDeleteNice work.
ReplyDeleteAny particular reason why you link to jnlp file directly and not using dtjava? E.g. like it is
described here:
http://download.oracle.com/javafx/2.0/deployment/deployment_toolkit.htm#sthref46
@Anonymous:
ReplyDeleteAll deployment code was automatically generated by NetBeans into the dist/ directory of the project. I simply copied the HTML from the automatically generated files.
Thanks for the link. I'll play around with having the JavaScript handle the click to see if it works better.
Cool job!!! Thanks!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI'm having trouble installing JavaFX for OSX... actually I wouldn't know where to begin. The downloadable file contains a bunch of dylib/jnilib, where do I put them? The Oracle webstate just states "unzip to your filesystem" as instructions, but obviously that's not much of a help.
ReplyDeleteCan someone please help me?
I would like to have a copy of the source code for review. You can send it in my email, gjbalan12@yahoo.com. Thanks.
ReplyDeleteHey, very nice work. i am actually expertimenting with javafx2, and it would be a great help to see your source code. can you communicate it?
ReplyDeleteCan you send me the sourcecode?
ReplyDeleterossmann.dominik@yahoo.com
very nice blog
ReplyDelete