JavaFx 2.0 - an approach to game sprite animation

java, javafx-2, swing

Solution

Read this blog entry: http://blog.netopyr.com/2012/03/09/creating-a-sprite-animation-with-javafx/

This is best realization of JavaFX sprite animation ever :)

Problem

Wow... JavaFx 2 has thrown me for a loop when it comes to game programming. I am trying to etermine how best to approach player controlled sprite animation. (ie. making enemies and things and the player animate). I know how to write code to read a spritesheet and set up a game loop in AS3 or Java swing... but it I'm having a real tough time wrapping my head around how the animation loop in my game should interact with whatever component of FX it is that renders. I've studied the api. There is a TranslateTransition class. But it seems excessive compared to other languages. And eberything else looks completely interface based or just too limited. I'm reading Pro JavaFx2 by Weaver... and man am I having trouble replicating that coding style. But I can read it find :) Don't know whether to love or hate this beast yet. Any suggestions?

Original source