JavaFX graphics performance and suitability for advanced animations

Daniel Zwolenski zonski at gmail.com
Sat May 25 06:23:22 PDT 2013


The Tower Defense game did go quiet. Partly this was because I was traveling up until a couple of weeks ago. 

But a bigger reason is because even in the very simple and limited functionality we had we already hit some pretty serious issues. The canvas in particular was doing really weird buffer-overflow style effects and having big z-order issues. Animations, particularly with text, were jerky and not real nice, with timing and smoothness issues. 

At this stage I don't think there's much point developing the game code further until the issues it has hit get reviewed by the jfx team. Basically the point of the game was to test jfx performance and on that front, it found jfx to be very poor. Note that I'm using the term 'performance' to mean 'smoothness of user experience' not the more limited and less useful metric of 'framerate' 

Its entirely possible that the problems may be in the game code itself but someone from the jfx team would need to feed back on this, since as far as we could, we used best practices or guessed at them. Part of the point of the project was to get feedback on these best practices from people who understood the internals of jfx. 

It is also possible that j8 has improved here but someone would need to run the game code against this. Based on John's comments, it sounds like similar issues are still present. 

I documented the issues in an email several months back (issues are easily reproduced by running the code) and had kind of hoped there might be a little look into it while I was away, but without a bit of noise around the topic I think it lost focus. 

I am happy to help anyone who is interested to reproduce and investigate the issues. Just ask. 


On 25/05/2013, at 10:03 PM, "John C. Turnbull" <ozemale at ozemail.com.au> wrote:

> I have previously posed questions about the limits of performance that can
> be expected with JavaFX and also the kind of applications for which it is
> suitable.
> 
> 
> 
> In response to this and other questions from JavaFX developers a project was
> created to develop a Tower Defence game in JavaFX.  Has this project been
> abandoned?  Is there a recent release with a working game?  Last time I
> checked the game was at a stage where it showed a few enemies approaching
> but that was about it.
> 
> 
> 
> I am still very interested in this whole topic.  From my own personal
> endeavours I have found JavaFX (in general) to be disappointing when it
> comes to performance.  Even with the latest builds of JavaFX 8, the
> animations in Ensemble are quite choppy and not at all smooth on both of the
> (Windows) machines I have run Ensemble on.  On the same machines however,
> even complex animations that I have developed using OpenGL and C++ are very
> smooth indeed.
> 
> 
> 
> I am principally a Java developer and do not want to have to use C/C++ for
> my projects but if there is something inherent in JavaFX that prevents it
> from performing at an adequate level then I would like to know about it.
> 
> 
> 
> 1.       Can someone from Oracle please outline the full range of
> applications for which JavaFX is or will be suitable for?
> 
> 
> 
> 2.       Is there something inherent in the JavaFX architecture (such as
> CPU/GPU interaction, the performance of the JVM or the Java language itself)
> that limits its suitability and thus effectiveness in advanced
> animations/visualisations?
> 
> 
> 
> 3.       Is this choppiness and lack of smoothness I have experienced
> typical of JavaFX performance or is it some issue with my
> environment/drivers etc.?
> 
> 
> 
> 4.       Is JavaFX more targeted at form-based UIs rather than high
> performance graphics?
> 
> 
> 
> 5.       Do you have any other comments on JavaFX and its suitability for
> advanced animations and visualisations?
> 
> 
> 
> Thanks,
> 
> 
> 
> -jct
> 


More information about the openjfx-dev mailing list