Re: TD game (hijacking Re: Performant Controls (hijacking Re: Developing controls based on Canvas?))
I'm pretty burnt myself but it remains in the back of my mind and I will be devoting some effort to it. I think this is a good email to spark me to go and work on it. Before August is out will work on it. Thanks! jose From: Daniel Zwolenski zon...@gmail.com To: Richard Bair richard.b...@oracle.com Cc: openjfx-dev@openjdk.java.net List openjfx-dev@openjdk.java.net Sent: Tuesday, August 6, 2013 1:32 AM Subject: Re: TD game (hijacking Re: Performant Controls (hijacking Re: Developing controls based on Canvas?)) I'm out for that one for the foreseeable future. I've burnt up any and all free time on getting the desktop and iOS workflows working with Maven. I'm big time behind on client work. Tell you what though, if you can get someone at Oracle to take over the deployment tools and iOS stuff, I'd very happily switch over to building games and gliffy-like demo apps :) On Tue, Aug 6, 2013 at 3:02 PM, Richard Bair richard.b...@oracle.comwrote: It really wasn't ever supposed to be my TD game, I keep trying to get you (and others interested in the community) to develop it. I'm up to my eyeballs in work already, as I'm sure you can relate :-) Richard On Aug 5, 2013, at 9:24 PM, Daniel Zwolenski zon...@gmail.com wrote: You should be able to check out they work in your TD game and continue development on that then. On Tue, Aug 6, 2013 at 2:16 PM, Richard Bair richard.b...@oracle.comwrote: To add to the confusion, Canvas currently has some drastic z-order bugs, and some clipping issues, so using it combined with Nodes is currently a no-go. I believe those have all been fixed in the last couple of weeks. Richard
PathTransition jitter
Many moons ago I complained about jittery PathTransition animation. A bug was openned and I was provided a workaround. This was with Java 7. I revisted the old project that lead to that initial complain, this time with Java 8. The problem seems to be back. I could not find the old bug report, since I think the JavaFX team is not using the same bug tracking site. Below is the test code to reproduce. I tried it using JDK 8_64 u5, u11, u25, u112, u121 and the problem occurs with all of them. The ImageView stutters through the PathTransition. I have a new laptop with 6th gen I7 and plenty of ram. I do not think it is the hardware. This used to be smooth like butter. Anyone else experiencing this or can make any suggestions? @Override public void start(Stage primaryStage) { String rocketImgStr =
Re: PathTransition jitter
In case it helps, below is the original workaround that was provided. This workaround no longer has any affect. public class FixedPane extends Group { @Override public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) { if (!tx.isTranslateOrIdentity()) { super.impl_computeGeomBounds(bounds, BaseTransform.IDENTITY_TRANSFORM); } return super.impl_computeGeomBounds(bounds, tx); } } Forgot to include: using a Windows 10 and Geforce gtx GPU. From: Tom Eugelink <t...@tbee.org> To: openjfx-dev@openjdk.java.net Sent: Thursday, April 13, 2017 3:15 AM Subject: Re: PathTransition jitter I'm seeing some very small irregularities; short hesitations and then small jumps ahead. Nothing major, but it is not totally smooth. (2.6GHz Intel i5, AMD FirePro M5950 GPU, Windows 10 x64) Slowing the animation to 8 instead of 4 seconds, make these hiccups better visible. They're most definitely there. On 13-4-2017 08:46, Michael Paus wrote: > It runs perfectly smooth on my old MacBook Pro from 2012 with JDK 8u152 ea. > > Am 13.04.17 um 04:25 schrieb Jose Martinez: >> >> >> Many moons ago I complained about jittery PathTransition animation. A bug >> was openned and I was provided a workaround. This was with Java 7. I >> revisted the old project that lead to that initial complain, this time with >> Java 8. The problem seems to be back. I could not find the old bugreport, >> since I think the JavaFX team is not using the same bug trackingsite. >> Below is the test code to reproduce. I tried it using JDK 8_64 u5, u11, >> u25, u112, u121 and the problem occurs with all of them. The >> ImageViewstutters through the PathTransition. I have a new laptop with 6th >> gen I7 and plenty of ram. I do not think it is the hardware. This used to >> besmooth like butter. Anyone else experiencing this or can make any >> suggestions? >> >> @Override >> public void start(Stage primaryStage) { String rocketImgStr= >> "iVBORw0KGgoNSUhEUgAAADIdCAYAAADoxT9SCXBIWXMAAAsYAAALGAGJqbUQAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w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VeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0d
Re: javafx.scene.shape.Path (memory) inefficient PathElements
Just curious, did this make it to the 8u144 release? If not, any idea which release (or when) we can expect it? Thank youjose On Wednesday, May 24, 2017 08:38:41 PM EDT, Jim Grahamwrote: Thanks Tom, I've already posted a patch for 8180938 (lazy property creation). Check it out and let me know how it performs for you. I have a couple of changes to make to it (and an independent memory usage test to write) before I send it out for formal review... ...jim On 5/24/17 3:42 AM, Tom Schindl wrote: > Hi, > > I created: > - https://bugs.openjdk.java.net/browse/JDK-8180935 > - https://bugs.openjdk.java.net/browse/JDK-8180938 > > I'll work on a showcase to find out how much memory one can save. > > Tom > > On 04.05.17 23:33, Jim Graham wrote: >> Hi Tom, >> >> Those look like good suggestions. I would file bugs in JBS and create >> them separately: >> >> - Bug for lazy property creation in path elements >> - Feature request for lower-memory paths >> >> Did you benchmark how much the lazy properties, on their own, would save >> your application? >> >> ...jim >> >> On 5/4/17 2:22 PM, Tom Schindl wrote: >>> Hi, >>> >>> We are currently working on a PDF-Rendering library in JavaFX and we >>> need to draw glyphs using the JavaFX Path API (there are multiple >>> reasons why we don't use the Text-Node and or Canvas). >>> >>> When drawing a page full of Text this means that we have a Path-Object >>> with gazillions of MoveTo and CubicCurveTo elements who sum up to 30MB >>> just to represent them in the SG because PathElements store their >>> information in properties and forcefully intialize them in their >>> constructor. >>> >>> The only public API to work around this problem is to construct a >>> StringBuffer and use SVGPath which means: >>> * it takes time to construct the SVG-Path-String >>> * it takes time to parse the SVG-Path-String in JavaFX >>> >>> As an experiment (and because we are still on Java8 we can easily do >>> that) was that we created our own Shape-Subclass who: >>> * uses floats (there's no reason to use double in the SG when the >>> backing API - Path2D - is float based) >>> * passes the floats directly to the Path2D/NGPath API >>> >>> Guess what: We now need 2.5MB / page which means 27.5MB is the overhead >>> added by the current Path-API - ouch! >>> >>> I think a fairly low hanging memory optimization for the PathElement >>> would be to create properties lazy (only if someone access the property). >>> >>> For MoveTo this would mean the following minimal change (eg for the >>> x-value): >>> >>> private DoubleProperty x; >>> private double _x; >>> >>> public final void setX(double value) { >>> if (x != null) { >>> xProperty().set(value); >>> } else { >>> _x = value; >>> u(); >>> } >>> } >>> >>> public final double getX() { >>> return x == null ? _x : x.get(); >>> } >>> >>> public final DoubleProperty xProperty() { >>> if (x == null) { >>> x = new DoublePropertyBase(_x) { >>> >>> @Override >>> public void invalidated() { >>> u(); >>> } >>> >>> @Override >>> public Object getBean() { >>> return MoveTo.this; >>> } >>> >>> @Override >>> public String getName() { >>> return "x"; >>> } >>> }; >>> } >>> return x; >>> } >>> >>> I guess 99% of the code out there never access the Property so the small >>> footprint added by the primitive field is justifiable. >>> >>> This still has the overhead of all the needless PathElement objects >>> hanging around so another idea is to have a 3rd SG-Path-Type who >>> strictly uses the float-Primitives with a similar API to Path2D (in fact >>> it only acts as a public API to Path2D). >>> >>> Thoughts? >>> >>> Tom >>> > >
Re: PathTransition jitter
In previous post I mentioned Kevin, I meant Jim. In the last update from Jim for this bug, he mentioned that it could be related to synchronization and frame rate vs rendering. https://bugs.openjdk.java.net/browse/JDK-8178805 I tried to run tests to prove this out, but was not able to notice any anomalies with either the frame rate nor the MasterTimer. The method used to test the MasterTimer by passing it an AnimationTimer that stores the delta time. A hiccup in the MasterTimer should be noticed from the AnimationTimer by storing the delta times and plotting them. While gathering those times, might as well collect the instant FPS and plot those as well. Would the synchronization issue be notied through either of these methods or am I off the mark here? The program in the link below does what I mentioned. When you run it either wait for the program to plot the points or click on the black background to force the points to draw on the screen (red is delta time from the MasterTimer and light green is the FPS). I like to wait till the jitter happens then click the background right away. After running many tests I do not see any hiccups in the plots that match the noticed occurrences of jitter. Does this mean that it could be a render issue? https://pastebin.com/XjiqE9yu From: Jose Martinez <jmartine_1...@yahoo.com> To: Kevin Rushforth <kevin.rushfo...@oracle.com> Cc: "openjfx-dev@openjdk.java.net" <openjfx-dev@openjdk.java.net>; Lord Chaos <joearo...@gmail.com> Sent: Sunday, May 7, 2017 12:03 AM Subject: Re: PathTransition jitter Looks like I am unable to update the Jira ticket so I guess I'll update the bug in here. Kevin mentioned that there is some relief if "-Djavafx.animation.fullspeed=true" VM option is used. I notice that it does improve but not remove the problem. Also, the jitter is not limited to PathTransition. In the example below the problem is reproduced by using Timeline and no PathTransition. Since like this is not just an issue with PathTransition, would it be possible to bump up the priority on this? The Jira mentions the fix is scheduled for Java 10. Does this affect all animation in JavaFX? Is there anyway to move objects on the screen without jitter? private void pathJitterBug(Stage primaryStage) { // Circle circle = new Circle(30, Color.RED); // Path path = new Path(); // path.getElements().add(new MoveTo(100, 100)); // path.getElements().add(new LineTo(500, 100)); // path.getElements().add(new LineTo(500, 500)); // path.getElements().add(new LineTo(100, 500)); // path.getElements().add(new LineTo(100, 100)); // // PathTransition pathTransition = new PathTransition(Duration.seconds(10), path, circle); // pathTransition.setCycleCount(Animation.INDEFINITE); // pathTransition.setOrientation(PathTransition.OrientationType.ORTHOGONAL_TO_TANGENT); // pathTransition.playFromStart(); // Circle circle2 = new Circle(20, Color.BLUE); Timeline tl = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(circle2.centerXProperty(), 125), new KeyValue(circle2.centerYProperty(), 125)), new KeyFrame(Duration.seconds(5), new KeyValue(circle2.centerXProperty(), 425), new KeyValue(circle2.centerYProperty(), 425)) ); tl.setCycleCount(Timeline.INDEFINITE); tl.setAutoReverse(true); tl.playFromStart(); // Circle circle3 = new Circle(20, Color.GREEN); Timeline tl2 = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(circle3.centerXProperty(), 425), new KeyValue(circle3.centerYProperty(), 125)), new KeyFrame(Duration.seconds(5), new KeyValue(circle3.centerXProperty(), 125), new KeyValue(circle3.centerYProperty(), 425)) ); tl2.setCycleCount(Timeline.INDEFINITE); tl2.setAutoReverse(true); tl2.playFromStart(); // Group root = new Group(); // root.getChildren().addAll(circle, circle2, circle3); root.getChildren().addAll(circle2, circle3); Scene scene = new Scene(root, 600, 600); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); } From: Kevin Rushforth <kevin.rushfo...@oracle.com> To: Jose Martinez <jmartine_1...@yahoo.com> Cc: "openjfx-dev@openjdk.java.net" <openjfx-dev@openjdk.java.net>; Lord Chaos <joearo...@gmail.com> Sent: Friday, April 14, 2017 9:29 AM Subject: Re: PathTransition jitter And here is the direct link in JBS: https://bugs.openjdk.java.net/browse/JDK-8178805 -- Kevin Jose Martinez wrote: > Thank you Kevin. > For those interested here is the bug report: > http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8178805 > > > > > F
Re: PathTransition jitter
Looks like I am unable to update the Jira ticket so I guess I'll update the bug in here. Kevin mentioned that there is some relief if "-Djavafx.animation.fullspeed=true" VM option is used. I notice that it does improve but not remove the problem. Also, the jitter is not limited to PathTransition. In the example below the problem is reproduced by using Timeline and no PathTransition. Since like this is not just an issue with PathTransition, would it be possible to bump up the priority on this? The Jira mentions the fix is scheduled for Java 10. Does this affect all animation in JavaFX? Is there anyway to move objects on the screen without jitter? private void pathJitterBug(Stage primaryStage) { // Circle circle = new Circle(30, Color.RED); // Path path = new Path(); // path.getElements().add(new MoveTo(100, 100)); // path.getElements().add(new LineTo(500, 100)); // path.getElements().add(new LineTo(500, 500)); // path.getElements().add(new LineTo(100, 500)); // path.getElements().add(new LineTo(100, 100)); // // PathTransition pathTransition = new PathTransition(Duration.seconds(10), path, circle); // pathTransition.setCycleCount(Animation.INDEFINITE); // pathTransition.setOrientation(PathTransition.OrientationType.ORTHOGONAL_TO_TANGENT); // pathTransition.playFromStart(); // Circle circle2 = new Circle(20, Color.BLUE); Timeline tl = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(circle2.centerXProperty(), 125), new KeyValue(circle2.centerYProperty(), 125)), new KeyFrame(Duration.seconds(5), new KeyValue(circle2.centerXProperty(), 425), new KeyValue(circle2.centerYProperty(), 425)) ); tl.setCycleCount(Timeline.INDEFINITE); tl.setAutoReverse(true); tl.playFromStart(); // Circle circle3 = new Circle(20, Color.GREEN); Timeline tl2 = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(circle3.centerXProperty(), 425), new KeyValue(circle3.centerYProperty(), 125)), new KeyFrame(Duration.seconds(5), new KeyValue(circle3.centerXProperty(), 125), new KeyValue(circle3.centerYProperty(), 425)) ); tl2.setCycleCount(Timeline.INDEFINITE); tl2.setAutoReverse(true); tl2.playFromStart(); // Group root = new Group(); // root.getChildren().addAll(circle, circle2, circle3); root.getChildren().addAll(circle2, circle3); Scene scene = new Scene(root, 600, 600); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); } From: Kevin Rushforth <kevin.rushfo...@oracle.com> To: Jose Martinez <jmartine_1...@yahoo.com> Cc: "openjfx-dev@openjdk.java.net" <openjfx-dev@openjdk.java.net>; Lord Chaos <joearo...@gmail.com> Sent: Friday, April 14, 2017 9:29 AM Subject: Re: PathTransition jitter And here is the direct link in JBS: https://bugs.openjdk.java.net/browse/JDK-8178805 -- Kevin Jose Martinez wrote: > Thank you Kevin. > For those interested here is the bug report: > http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8178805 > > > > > From: Kevin Rushforth <kevin.rushfo...@oracle.com> > To: Jose Martinez <jmartine_1...@yahoo.com> > Cc: "openjfx-dev@openjdk.java.net" <openjfx-dev@openjdk.java.net> > Sent: Thursday, April 13, 2017 7:49 AM > Subject: Re: PathTransition jitter > > One more thing: all bugs were transfered from the old JavaFX JIRA intoJBS in > June 2015. You can find the ones you filed using this query: > > https://bugs.openjdk.java.net/issues/?jql=reporter%3Djmartinezjfx > > -- Kevin > > > Jose Martinez wrote: > In case it helps, below is the original workaround that was provided. This >workaround no longer has any affect. > public class FixedPane extends Group { @Override > public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform >tx) { > if (!tx.isTranslateOrIdentity()) { > super.impl_computeGeomBounds(bounds, >BaseTransform.IDENTITY_TRANSFORM); > } > return super.impl_computeGeomBounds(bounds, tx); > } > } > Forgot to include: using a Windows 10 and Geforce gtx GPU. > > From: Tom Eugelink <t...@tbee.org> > To: openjfx-dev@openjdk.java.net > Sent: Thursday, April 13, 2017 3:15 AM > Subject: Re: PathTransition jitter > > I'm seeing some very small irregularities; short hesitations and then small > jumps ahead. Nothing major, but it is not totally smooth. (2.6GHz Intel i5, > AMD FirePro M5950 GPU, Windows 10 x64) > > Slowing the animation to 8 instead of 4 seconds, make these hiccups b