Java and Flash

Those of you who follow Kev’s blog may have seen a recent entry about the surge in interest with Java applets which was sparked by Milpa. He then posed the question: if Java developers are keen on replicating the “Flash experience”, why not just use Flash instead and reap the deployment benefits?

Then there’s a more piquing question to ask that’s on the flip side. What if Flash/AS3 let developers make 2D games that were just as rich as those made in Java? Where would Java stand in that situation? It could happen in just 1-2 years the way Flash is advancing.

Version 10 looks promising, Version 9 is testing the OGL/DX graphics pipelines, people are porting Box2D and other libraries to AS3 with great success. Then, to top it off, AIR now lets people deploy rich Flash games to the desktop.

Well as Java developer I guess one reason its a whole new development platform with its own toolchains and quirks.

And if its 1-2 years from being as rich as Java is today. Then how much richer will Java be in that timeframe?

I can only speak for myself, but Flash just doesn’t cut it. When I evaluated Flash some 2 years ago, it was in no way on the par with Java by means of flexibility and performance. I dont know how it currently stands, but I understand it’s getting pretty close at that.

If they would be just as rich then there wouldn’t be any reason to why not. Java may have new features by then, but it would probably bloath the JVM even more with stuff we dont need for games. Flash is more focussed around games and web thingies. They got the plugin installing / loading & presentation right from the beginning… I hope Sun does things right with this new lightweight JVM.

My main gripe with flash is its incredible ability to always use 100% cpu for a stupid small banner.

Performance for flash is really below Java - at least the measurements I’ve seen, even with the new jit.

The 100% thing is fair enough, it is ridiculous, however evidently it doesn’t bother the masses - or they don’t know enough to be bothered.

As I’ve said on my blog performance is definitely a concern, but as we’re pretty fond of saying around here - does it matter as long as it’s “good enough”? (which it appears to be seeing some of the games out there in Flash).

I had to do some stuff in Flash recently using the Flex stuff which integrated into Eclipse via some scripts. It was pretty painless and there were some remarkable similarities between it and Java :wink: As I’ve always found with Java 2D, once I upped the number of things flying around the screen or started to change the complete screen every time it slowed down to unbearable - pretty much what was expected.

The most compelling reason to not use Flash for us is simple, we like Java and the Java Language - we already know it :slight_smile:

Kev

Well thats exactly it, isn’t it ?

95% of the flash games out there are so simple that there isn’t an issue, and most of them are at most 640x480 maximum. Furthermore the logic in a typical game is rarely something that requires a lot of horsepower - especially with a low entity count.

Does anybody have experience with versioning and timeline editing when 10+ people are working on the same flash project? And would you put flash on your server? (for games with server based logic. Read: any secure MP game).

Again, I agree on the blog as well. The thing is the games that are being pushed out as Flash-beating Java applets are also that simple. To differentiate java games there would have to be something either visually or logic wise that makes it worth using Java and jumping through the required hoops. Trying to beat flash with flash like games isn’t really worth it - which is all the blog post said too.

Kev

Sorry for not knowing this but I have a question…

is there any way you can make use of right-click in a flash game? The lack of this has always annoyed me tremendously.

[quote]Everything changed this year. The language got entirely refreshed, and performance in apps that use AS3 is much better. For example, physics is something I’ve seen crop up this year for the first time. The runtime also uses JIT compilation.
[/quote]
And on the other hand Java is also getting better on the deployment front. The new consumer JRE in development will hopefully make it just as easy and quick as installing flash.

I think the main reason Flash is so widely deployed is cause stupid web developers decide to use flash on there website for splash intro screens. Yesterday I even saw it used for a scrolling banner of text… wtf there is marquee HTML tag that does that.

There are people (like myself) who want to create fun, casual 2D games with a positive user experience, and they want to do it with Java. It’s really that simple. It’s not about creating a “Flash experience” (if it were, Milpa would have been made with vector graphics, not raster, and it would have run at 30fps, not 60fps :slight_smile: ) and it’s not about trying to beat Flash (the last thing I would want to do is try to play catch-up with Adobe).

A big reason Milpa is compared to Flash is because of the animation, but Flash doesn’t have a monopoly on animation. Honestly, I was inspired more with modern-day Nintendo games than anything. I love they way their UIs animate.

I suppose the other reasonable argument is now that PulpCore is here, most of the hoop jumping required is already done for you :smiley:

Kev

Also whether the new plugin from cosumer JRE is really going to be all that. The current release doesn’t seem to make that much difference. Even though it’s pluggable applets still depend on AWT - thats a big chunky module to download - potentially percieved as part of your game if this is the first time a user has used an applet with their new consumer JRE.

Kev

Thats pretty interesting given the existing extension mechanism which essentially allows you to do this. Wonder why they’re reinventing?

Kev