Skip navigation.
Home
That which cannot be rendered in binary is by definition a delusion
 

JavaFX

I've always wanted to design a video game. Its rather stunning that I've never done so, since I've played several. However I wanted to do something "simmy" and so I felt something bundled with Java might be a good starting place.

I messed with Processing, but while its good at what it does, the painful rate at which it refreshes its views -- especially if text is involved -- made it something of a nonstarter.

JavaFX on the other hand is built for dynamic interactive multimedia on multiple platform.

I.e., games.

Its a very insular thing-- JavaFX is essentially a scripting language overlaying much of Java. I wrestled with it for a while; as I wanted much of the content to be dynamic -- i.e., to be able to have sprites come in and out of the view as opposed to just manipulating the ones I'd set up from the get go -- the documentation was not as useful as I'd hoped, but once I bought the Alpha of the Apress book, a lot of stuff made sense.

bunnies and Trees

No bunnies were harmed in the making of this game, sadly

I have figured out how to make oceans of trees and bunnies, and how to get them to move. Next step: release the hounds!

The one downer is that FX is purely 2d. While I do like 3D graphics esp. for games, I would like to have the option to use 3D and it seems a bit strange that such an obviously game-centric tool would opt for flatland.

http://javafx.com/samples/FishSim/index.html

is a  much more interesting sample -- essentially a digital Koi pond.

I don't usually advocate a technology til I've gotten good at it, but the JavaFX platform really has  a lot going for it. For one it was designed with mobile phone development in mind; for another, well, you get Java stuff like swing right there.

Keep in mind though that its scripting language really is a language; unlike Procesing which is "Java Lite" ("Java Script?") Processing has a syntax all its own. There is a trend in Java to take the scripting route. I think its kind of a low bencmark when a programming language needs a scripting overlay to be comprehensible. For me I gave up on Java back in the 90's; paradoxically, I've gotten good enough in scripting OOP in PHP to actually appreaciate Java now . And as far as web dev goes, my feeling is still, "If you think you have a website complex enough to require Java, you probably haven't tried any other development environment." But when it cones to games, there is a point where the scripty hackery of Flash just becomes tiresome and you want a real OOP backend. (this is the 90's Flash guy who still hasn't tried Flex speaking.)

I'll post more here as I get deeper into JavaFX.

Post new comment

  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <p> <span><small> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <param> <strike> <caption>
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options