Thursday, May 21, 2009

My JavaFX Contest Entry Part I

I started playing with JavaFX a couple of weeks before someone pointed out the JavaFX Challenge to me. I must admit...at first I was less than enamored with JavFX (I remember looking at some examples back in the early days with the long inline scenegraph definitions and I said "ick").

After the official release (and 1.1 that followed), I took a closer look and was hooked. Programming was fun again. I could get the ideas out of my head and out through my fingers onto the screen quicker than ever before. I started out with a little dice animation. I did up some glossy dice faces in Inkscape (the best open source vector graphics program) and was kinda happy with it.
Animation wasn't as smooth as I would have liked and I couldn't get sound to work, but I got a good introduction to Image, ImageView, transitions, sequences and all the rest of the JavaFX crucials. The sound thing really irritated me and I found many many posts with people lamenting about their inability to get sound to work properly in JavaFX. After lots of experimenting and reading, I stumbled across this post here (at the bottom) which gave me a perfect solution. I could play sounds (including short ones) with overlapping...and stopping/restarting with no issues. Yay! Special thanks to Adam Armistead for his work.

I then ran across a series of posts here and here that showed how easy it was to integrate a physics engine with JavaFX. Yikes. The ideas started percolating.....

No comments:

Post a Comment