problem with PathTransition causing flickering of its Node
jmartine_1026 at yahoo.com
Fri Jun 1 08:15:22 PDT 2012
I leave the Scene alone, so what ever it has as default is what it is using
primaryStage.setScene(new Scene(root, WIDTH, HEIGHT));
where "root" is:
private static Group root = new Group();
I then add to "root" another Group that I call "round", which has another Group called "enemyUnits", and in there is where the Nodes with their PathTransition are located.
From: Joseph Andresen <joseph.andresen at oracle.com>
To: Kevin Rushforth <kevin.rushforth at oracle.com>
Cc: Jose Martinez <jmartine_1026 at yahoo.com>; openjfx mailing list <openjfx-dev at openjdk.java.net>
Sent: Friday, June 1, 2012 11:05 AM
Subject: Re: problem with PathTransition causing flickering of its Node
Can you describe the state of the scene? Are you using a perspective camera?
On Jun 1, 2012, at 7:53 AM, Kevin Rushforth <kevin.rushforth at oracle.com> wrote:
> One thing to try: can you run it with "-Dprism.dirtyopts=false" and see if the problem persists?
> In any case, please file a JIRA bug against the "Animation" component.
> -- Kevin
> Jose Martinez wrote:
>> In the project (a video game) I am working on I use a lot of PathTransitions to move enemy units across the map. I am noticing flickering of the Nodes in the PathTransitions. By flickering I mean they lose and gain visibility. It does not happen all the time. The paths are pretty simple Shapes... straight lines. I am using Orthogonal orientation.
>> here are some things I have noticed....
>> 1) There is an increase in flickering occurring when there is a lot happening on the screen.
>> 2) There is an increase in flickering when the PathTransition's Node is moving over another Node.
>> 3) Points 1 and 2 might be related or have the same root cause but its hard to tell.
>> 4) If I change the rate of PathTransition to a low number (so that the Node is moving really slow) then the Node just becomes non-visible (cant see it on the screen) yet it is there because the projectiles in the game that are shooting the Nodes are in fact striking them, so you can tell that the Node is in fact moving along the path but just not visible. UPDATE: This also happens when moving at non-slow regular rate as I found out last night.
>> 6) I do not suspect its a performance issue because when I do cause performance issues I get a studder not a flicker and the whole game slows up. While flickering the Node still moves smoothly through the path.
>> Currently the Node that I am using in this case is a Group with an ImageView and an invisible Rectangle in it. This Group is inside another which is inside another Group which is inside the root Scene.
>> Any ideas what could be causing the flickering?
More information about the openjfx-dev