Javafx vs Flash VS Silverlight

Source: Internet
Author: User

This is a comparison test on the application speed of javafx, Flash, and Silverlight long ago. It was uploaded to the blog for reference. However, this test result is not highly reliable. First, the three versions have been improved, and second, the javafx algorithm used by the original author is not consistent with those of flash and Silverlight ......

The author's website here, there are a lot of flash, Silverlight application examples: http://www.shinedraw.com/

  • Carousel [javafx 1.1]

     

    (399 kib, 1,485 hits)

  • FPS meter [Flash 9, as3]

     

    (129.9 kib, 2,742 hits)

  • FPS meter [Silverlight 2, C #]

     

    (139.6 kib, 2,851 hits)

Javafx
Flash

Silverlight


Author's words:

Openly speaking, I have no good impression on javafx. I think this may be due to the following reasons:

1. I don't have any UI editing tools. I always deal with scripts. If you can only use encoding for development, it is not fun at all.

2. The application always takes a long time to load successfully. I don't know why. In short, it takes a short time to start the program in IE to display the content.

3. Running a program with javafx requires not only the. jar file, but also the configuration of. JNLP.

4. I don't know which attributes can be associated with a specific object.

5. In some cases, the debugger cannot obtain the correct error location.

6. javafx is a brand new script, which takes a long time to learn.

7. When scrolling the page, the javafx may have a residual image.

 

In fact, I still have some bad experiences, so I will not list them one by one.

Some may say that javafx is a relatively new technology. These are common problems and you need to wait patiently. I agree with this, so I will wait for the future development of javafx and then take the time to learn about it.

I still remember that Silverlight was not very attractive in its first version. So what will happen under javafx?

----------------------------

In addition, I will add a new implementation of lgame-simple:

 

Package Org. loon. test; <br/> Import Java. AWT. color; <br/> Import Java. AWT. graphics2d; <br/> Import Java. AWT. image; <br/> Import Java. AWT. event. keyevent; <br/> Import Java. AWT. event. mouseevent; <br/> Import Java. AWT. geom. affinetransform; <br/> Import Org. loon. framework. game. simple. gamescene; <br/> Import Org. loon. framework. game. simple. core. deploy; <br/> Import Org. loon. framework. game. simple. core. lsystem; <br/> Import Org. loon. framework. game. simple. core. ltimercontext; <br/> Import Org. loon. framework. game. simple. core. screen; <br/> Import Org. loon. framework. game. simple. utils. graphicsutils; <br/>/** <br/> * Copyright 2008-2009 <br/> * licensed under the Apache license, version 2.0 (the "License"); you may not <br/> * use this file except T in compliance with the license. you may obtain a copy of <br/> * The license at <br/> * http://www.apache.org/licenses/LICENSE-2.0 <br/> * unless required by applicable law or agreed to in writing, software <br/> * distributed under the license is distributed on an "as is" basis, without <br/> * warranties or conditions of any kind, either express or implied. see the <br/> * license for the specific language governing permissions and limitations under <br/> * the license. <br/> * @ project loonframework <br/> * @ author chenpeng <br/> * @ Email: ceponline@yahoo.com.cn <br/> * @ version 0.1 <br/> */<br/> public class FPS extends screen {<br/> private final static int ycenter = 90; <br/> private final static int xcenter = 220; <br/> private final static double shift = math. PI/2; <br/> private double image_gap = math. pi; <br/> private double angle; <br/> private double angle_rad = angle * Math. PI/180; <br/> private int total; <br/> class carousel {<br/> double X, Y, scale; <br/> int width, height; <br/> image; <br/> Public parameter usel (string filename) {<br/> This. image = graphicsutils. loadImage (filename); <br/> This. width = image. getwidth (null); <br/> This. height = image. getheight (null); <br/>}< br/> Public void draw (graphics2d g) {<br/> affinetransform transform = new affinetransform (); <br/> transform. translate (x, y); <br/> transform. scale (scale, scale); <br/> G. drawimage (image, transform, null); <br/>}< br/> Public void Update (double I, double angle) {<br/> scale = 0.8 + 0.5 * Math. sin (angle + I * image_gap + shift); <br/> X = math. cos (angle + I * image_gap + shift) * xcenter + xcenter; <br/> Y = math. sin (angle + I * image_gap + shift) * ycenter + ycenter; <br/>}< br/> private invalid usel [] Using usels = new invalid usel [0]; <br/> Public void alter (ltimercontext timer) {<br/> angle_rad = angle_rad + math. PI/60; <br/> for (INT I = 0; I <total; I ++) {<br/> carousels [I]. update (I, angle_rad); <br/>}< br/> Public synchronized void addcarousel () {<br/> int Index = Total % 6; <br/> If (Total = carousels. length) {<br/> using usels = (using usel []) lsystem. expand (carousels, (total + 1) * 5 ); <br/>}< br/> export usels [total ++] = new carousel ("images/image" + index + ". PNG "); <br/> image_gap = math. pI * 2/total; <br/>}< br/> Public void draw (graphics2d g) {<br/> G. setcolor (color. white); <br/> G. drawstring ("Total number of images:" + total ). intern (), 15, getheight ()-25); <br/> for (INT I = 0; I <total; I ++) {<br/> using usels [I]. draw (g); <br/>}< br/> Public void leftclick (mouseevent e) {<br/> addmediausel (); <br/>}< br/> Public void middleclick (mouseevent e) {<br/>}< br/> Public void rightclick (mouseevent E) {<br/>}< br/> Public void onkey (keyevent e) {<br/>}< br/> Public void onkeyup (keyevent E) {<br/>}< br/> Public static void main (string [] ARGs) {<br/> gamescene frame = new gamescene ("lgame-simple-FPS test ", (550,400); <br/> deploy = frame. getdeploy (); <br/> deploy. setscreen (New FPS (); <br/> deploy. setshowfps (true); <br/> deploy. setlogo (false); <br/> deploy. setfps (100); <br/> deploy. mainloop (); <br/> frame. showframe (); <br/>}< br/>

 



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.