Pros and Cons of Java

Hey everybody,

For a school project i need to make a game thats able to run on websites.

I was thinking of using Flash or Java, but i dont know the pros and cons of Java.

I want to make a good thought out decision of wich software i’m going to use, i hope you can help me with this decision?

Thanks in advance for your time!

J.

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.

But my personal recommendation would be JavaScript + HTML5 Canvas.

Pros:
Can compile into a executable jar for desktop use.
Cross-platform.
Slick2D is awesome.
Garbage collection is nice.
Better syntax than flash.
Great Client/Server stuff.

Cons:
Doesn’t compile into a exe.
Needs the Java JRE to run.
Cross-platform is a little buggy.
Heap can’t be auto resized.

Thanks for the (very) quick response! :smiley:

I now have a bit more to go on for my decision, i’ll probably go with Flash though.

If you’d look at the programming language, wich one would have the easiest learning curve?

Personally i think actionscript has an easier learning curve than Java, but i dont know for certain.

if you were to be so inclined, u could make it into an exe, and you can even bundle the jre with it :P.

java rules :smiley:

[quote=“jmcklap0,post:4,topic:35913”]
IMHO I wouldn’t look at the language, I’d look at the libraries. That’s where your real learning curve and issues will be.

It’s actually quite sad that even this forum don’t believe in Java anymore for web games :wink:

In my opinion:

If you want to do something simple, stick with Flash
If 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.

If you are an engineer, use Java.

If you are an artist, use Flash.

F** I hate Flash. It’s made for people who don’t know how to program.

I would go with what you know most.
But does sound like flash is good for small projects.

Anyone doing 3D in the browser these days is probably using Unity.

Cas :slight_smile:

If you want to do something simple, stick with Flash

It’s actually even a bit easier with JavaScript/Canvas. The language is tiny, the base lib is tiny, the new APIs are tiny, and all you need is a good editor (like Komodo Edit). That’s it.

Thanks for all the replies! I really appreciate it!

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 :P) and Java is more for the complex projects that include client/server communication and/or 3D graphics.

I thank you all for your time and help!

You all really helped me out with making a good decision!

Thanks again! :smiley:

It is slightly sad someone comes to Javagaming.org, the only dedicated site for Java games development on the internets, and we tell him to use some other technology.

What happened there then?

Cas :slight_smile:

Sounds like Flash was the right tool for the problem he wanted to solve, his alternative was to use Java Applets. Do you really think recommending Java Applets in this case was a better choice?

Well, there’s the thing… how has this come to pass?

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?

Cas :slight_smile:

BTW did you take a look at HTML5 and canvas features?

sample: http://www.geek.com/articles/games/html5-platformer-biolab-disaster-proves-flash-has-serious-competition-20100913/

Yes, all brilliant and such, if somewhat missing the point of developing in Java.

Cas :slight_smile:

Interestingly, Dynastica is a game written in C++ (using ogre3D) that uses java as the launcher!

So maybe java is not so bad in terms of reliability, penetration and deployment…

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).

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).