The way I see it, with Flash it's much easier to build something to a good standard. With Java it's much more difficult, but is a much better platform for building something to an amazing standard. For example there are plenty of topics around here simply asking on how to get to a stage where you can draw in the Applet.

So IMHO I'd recommend Flash because 1) you should get running with your project in less time and 2) there are lots of little niggling issues you just won't encounter (like if someone with an older version plays your game Flash gives a much better error message).

If you need to write about the technology you've used (to help justify why) then you can also bring up the fact that Flash is used heavily for web games where as Java just isn't (although there are some exceptional examples around online). Adobe also encourage using Flash for web games where as both Oracle (and Sun before them) don't do the same for Java.

It's actually quite sad that even this forum don't believe in Java anymore for web games ;-)

In my opinion:

If you want to do something simple, stick with FlashIf you want to make something client/server based with 3D and so on, go with Java

Mike

I entirely agree (about not believing in Java). With WebGL and the new 3D support coming in Flash then they will probably become better platforms for web 3D then Java.

But what you write has a far bigger impact then what your using. RuneScape and MineCraft aren't popular because they run on Java; and although I recommended Flash over it Java is still an excellent platform to develop on.

I'll probably go with Flash after reading all of this, we are planning on making a simple platform type game, wich uses 2D graphics.I also see that the common opinion is that Flash is good for simple projects (wich mine is ) and Java is more for the complex projects that include client/server communication and/or 3D graphics.

Is it the APIs which are bad?The language too verbose or hard to learn?Is deployment too difficult?Is Java too unreliable?Is Java penetration so far behind Flash that hardly anyone would get to see it?

As a desktop application, Java beats Flash hands down, but since we are talking about the Java Plugin here, due to the requirement of being embedded in a web page and comparing against Flash the situation is very different.

Years of neglect by Sun on clientside Java, at some points in its history the plugin has been unbelievably broken (super slow, crashing browsers, hanging computers, etc) that I'd go as far as to blame it solely for java's widespread tainted image of being slow and bloated. Its been so bad and for so long that most Java developers have given up all hope on java applets, hardly anyone uses the them these days. If Sun had focused on client side Java, they could have easily been where Flash is today (especially considering the head start they had).

Is it the APIs which are bad?The language too verbose or hard to learn?Is Java penetration so far behind Flash that hardly anyone would get to see it?

The Java API is pretty good and its easy to learn. Penetration isn't a big issue here as its has plenty of marketshare. Its a little verbose for gui development but its pretty good as a generally purpose language.

The Plugin has been way too unreliable and you have to jump way too many hoops to even get close to an experience that Flash provides. I've only seen PulpCore come relatively close to providing a flash like experience and even that was some super ninjastic hackage going on under the hood. The situation with the plugin has improved of late but it'll take a while for the damage to be undone and by the looks of it Flash will be way ahead by the time it does.

Its not only that the java plugin has been bad but Flash has been really good at clientside user experience, even though it doesn't provide as much as java it does what it does really well. Secondly the tools and editors for Flash have been excellent, really easy for non programmers (Artists).

The Plugin has been way too unreliable and you have to jump way too many hoops to even get close to an experience that Flash provides. I've only seen PulpCore come relatively close to providing a flash like experience and even that was some super ninjastic hackage going on under the hood.

Personally, though, I'd never put a serious effort into making a *serious* game in HTML5. Think about it. It's limited to running in browsers, the source code is readily available by simply doing view-source in the browser, and future-proofing your game will be a nightmare as years go by since browsers are continuously changing.

With Java you're not limited by where you run your game, application or applet. The code is a lot safer. And if you bundle your application in a EXE+JRE you're safer the game will run 10 years from now.

HTML5 is fine for most flash games out there, smallish web games, and that's really where the fight will take place, between flash and html5. Java will be on the sidelines, pretty much unaffected, because if flash hasn't already wiped java out by now, html5 won't either.

I do wonder about the portability of html5 games/apps. I guess there's no single embeddable package file, it's all just html and javascript, that depends on the environment where it was loaded from? Flash has the advantage of being easily distributable and embeddable anywhere.

Personally, though, I'd never put a serious effort into making a *serious* game in HTML5. Think about it. It's limited to running in browsers, the source code is readily available by simply doing view-source in the browser, and future-proofing your game will be a nightmare as years go by since browsers are continuously changing.

It's not limited to running in browsers. All you need is a JS engine, a Canvas/Audio/input implementation, and a little bit of wrapper code. The guy who made Biolab also wrote such a thing (it's OpenGL accelerated and runs on iPhone). And of course there are other easier options like PhoneGap or XULRunner, which basically just turn some website into a stand-alone application.

If the code is minified it's about as "save" as minified Java code. Not having to run it through a decompiler first doesn't really change much. Actually, this step is replaced with running it through a formatter.

I do wonder about the portability of html5 games/apps. I guess there's no single embeddable package file, it's all just html and javascript, that depends on the environment where it was loaded from? Flash has the advantage of being easily distributable and embeddable anywhere.

The bare minimum is one script file and one resource file. But usually there will be at least 2 resource files. One which contains everything with audio as Ogg/Vorbis and another one which contains everything with Audio as MP3 (or AAC). The former is for every browser and the latter is for bloody Safari and f-ing IE9. Depending on the browsers capabilities one of those files will be downloaded.

The script file can be bootstrapping + game code or just bootstrapping (and the game code is in the resource file).

PulpCore is really great, both in API, design process and deployment (does half the job of Java Applet system). But still I had issues when I loaded the same applet in two tabs at once (in old applet system before 6u10+). I suppose now you could use the separate_jvm option in new applet system (now it's probably much more widespread) and everything would work well

I also recently looked at javafx.com and looked much more functional than before, they're even not afraid to use JavaFX applet to select the demos (previously they used some DHTML crap).

What, realistically, is the performance difference between Java 6 and the fastest JS engines out there at raw compute power and memory writes?

Dunno about realistically, but for at least some comparison look here, compare V8 with Java6 -server. Sadly there is no Java6 -client (but that's probably not much relevant these days). The difference is still very big and I doubt it will be comparable to Java because of the dynamic nature of Javascript language.

It's not limited to running in browsers. All you need is a JS engine, a Canvas/Audio/input implementation, and a little bit of wrapper code. The guy who made Biolab also wrote such a thing (it's OpenGL accelerated and runs on iPhone). And of course there are other easier options like PhoneGap or XULRunner, which basically just turn some website into a stand-alone application.

If the code is minified it's about as "save" as minified Java code. Not having to run it through a decompiler first doesn't really change much. Actually, this step is replaced with running it through a formatter.

It's the same thing, really.

The bare minimum is one script file and one resource file. But usually there will be at least 2 resource files. One which contains everything with audio as Ogg/Vorbis and another one which contains everything with Audio as MP3 (or AAC). The former is for every browser and the latter is for bloody Safari and f-ing IE9. Depending on the browsers capabilities one of those files will be downloaded.

The script file can be bootstrapping + game code or just bootstrapping (and the game code is in the resource file).

It can be a pain to get javascript code to work the same in different browsers, let alone on totally different platforms. There will always be those hacks to get around variations between browsers, e.g. if(ie) { ... } else if(firefox) { ...}.

I've written a lot of javascript code for two different legacy set-top-boxes, who supposedly have the exactly same browser, but there are plenty minor differences that matter a lot. For instance, one box can run anonymous functions in a timer, the other cannot. One cannot handle a long integer, the other can, so if you were to use timestamps in milliseconds, you'd be out of luck on one of the boxes.I've written a GUI platform in javascript that works great in Firefox, but I'd need months to get it working in Internet Explorer.

But perhaps that is all worth it. Javascript is pretty portable considering. It's the most used and widespread programming language out there.

After writing it for 5 years, I still hate how bad the OOP support is. It's like they've gone out of their way to not evolve javascript. It was never intended to be used so much, but it's #1 out there, it was supposed to be used as a "helper" scripting language for forms and stuff, and therefore doesn't even have basic OOP support. I'd really like to have classes, abstract classes, inheritence, polymorphism. I know you can simulate a lot of this stuff, but it just doesn't feel right.

Hm I still wonder why no-one's just made (experimentally) a browser that simply executes Java code instead of Javascript.

I see the benchmarks put Java at roughly 10x faster than Javascript which means I won't be making Revenge of the Titans any time soon in JS. I'm already trying to figure out a way of using more than one core to get more performance out of it (just to achieve 60fps)

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org