Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are (almost) all the on-line games written in ActionScript (Flash) not Java?

I absolutely love good defender games (e.g. Gemcraft, Protector: reclaiming the throne) as they can be intellectually quite challenging; it's like playing chess but a little less thinking and a bit more action. Sadly, there are not that many good ones out there and I thought I would create one myself and share it with the rest of the world by making it available on-line.

I have never worked with ActionScript but when it comes to on-line games, this is the main choice. I have tried to find a decent 2D game in the form of a Java applet but to no avail. Why is this so? I could write the game, most comfortably, in Delphi for Win32 but then people would need to download the executable, which could deter some form downloading it, and also it would only work on Windows. I am also familiar with Java, having worked with Java for the last four years or so; although, I don't have much experience with games programming.

Should I not be deterred by the fact that all on-line games are written for in Flash and create my defender game as a Java applet, or should I consider learning ActionScript and games development for the ActionScript Virtual Machine (AS3 looks very much like Java... but still, it's an entirely new technology to me and I might never use it professionally.)

Could you, please, just answer the the question in the title? Why Flash, not Java applets? Is it only 'politics'?

like image 344
Peter Perháč Avatar asked Mar 16 '10 15:03

Peter Perháč


People also ask

What language are flash games made in?

HTML5, CSS3, and JavaScript are the three primary languages used to develop flash games.

Is ActionScript similar to JavaScript?

ActionScript is very similar to JavaScript, except it is built solely for interacting with Flash applications.

What are Flash games made in?

Flash® games are interactive media created for online and mobile applications using the Adobe-owned, Macromedia-developed Flash® software. Originally developed as an animation program, programmers and artists began using Flash® to create interactive games using its proprietary ActionScript® code.


3 Answers

Flash is more popular since its penetration rate is huge.

Flash is also more powerful when it comes to create and integrate graphics assets (since Flash CS* is also a vector animation editor). It's also very easy to embed sounds and fonts assets, to play with bitmap effects, without using any aditional library.

And last but not least, there's a lot of sites who offers ActionScript APIs in order to earn money with your games by adding various ads in it (such as MochiMedia, Kongregate...)

like image 167
Zed-K Avatar answered Nov 18 '22 22:11

Zed-K


Flash provides a fully-built graphics and sound engine that will handle separate objects ("sprites") on paths and animation.

In Java those features would need to be provided by third-party library. Java does provides the necessary building stones to build such an engine, however.

JavaFX might change this, however.

like image 40
Joachim Sauer Avatar answered Nov 18 '22 21:11

Joachim Sauer


I can provide a little insight on the Java side: Early in the history of Java, Sun tried to push Java applets as the new way to display dynamic content in a browser. This attempt was doomed to failure by the combination of the following factors:

  • Java had (and still has) a lengthy load time for the (JRE) runtime;
  • Java originally had only AWT as a GUI toolkit, and AWT is limited and really ugly;
  • Java used to be a lot slower before the advent of faster CPUs and JIT compiling;
  • Java was (many think intentionally) supported very half-heartedly by Microsoft in IE, so it wasn't well integrated and ran poorly.

All this gave Java (deservedly) a horrible reputation, from which desktop and browser Java have still not recovered. To most people, Java stands for ugly, slow and often not working applications. It still suffers from this stigma today.

While both Java and Flash are Turing complete programmng environments, Java is more universal, with a bigger set of libraries for all kinds of different purposes. Sun strove to have the Java environment be universal among platforms, so browser-side Java includes a lot of libraries that are usually not needed. Again, more load time.

like image 4
Carl Smotricz Avatar answered Nov 18 '22 23:11

Carl Smotricz