Flash or Java?

Started by
7 comments, last by Simagery 17 years, 6 months ago
Hi, I'm new to game design and development. Could anyone please tell me more or less the benefits or cons of game development in FLash Vs. JAva? Thanks a lot!
Advertisement
Lets see what I can think of, personally I am a java kinda guy. But I will tell you what I know about flash.

Java:
been around forever; available in many forms (script, compiled, etc).
typically does not require the user to pre-installed a plug-in.
particularly suited for creating interactive animations and combining animation with other Web page elements.
not particularly efficient use of graphic elements (bitmaps, etc).
applets are typically larger than Flash; longer downloads, longer load times.
scalable to any processor-driven platform (computers, cell phones, appliances, smart cards, etc)

Flash:
requires a plug-in (designed and produced by Macromedia Inc.); plug-in must be updated intermittently.
supports a wider range of graphic elements (GIFs, fonts, etc) and features (opacity, etc).
highly efficient use of graphic elements (vector-graphics).
smaller, more self-contained files than Java; faster downloads, faster loading.
supports MP3.
files will give far more reliable (animation) playback rates between different machines and browsers.
So, if you're in the comparison game there are a few obvious differences:

Java is universally available and usable; Flash's usability depends on the (admittedly broad) propogation of Macromedia's Flash plug-in.
Flash produces smaller applets that load and download faster.
Java integrates easily with other web page elements; Flash less so.
Flash has a definate vector-graphics "look"; Java apps can look like whatever the designers choose.
Flash is much more self-contained and easy to deliver as a stand-alone (albeit plug-in dependent) applet; Java less so.
Java can be scaled to any platform that has a processor; Flash less so.

Hope I was of assistance!

Artix
Is there any reason you're focusing on Flash or Java? I would recommend Python. You can get started very quickly with PyGame, and I've found Python programming to be much more fun than Java (can't speak for Flash).

  • Open source (non-proprietary)

  • No plugin required (scripts can be built into native executable files for people that don't have Python installed)

  • I'm not sure how the performance compares to Java or Flash. You can use third-party tools/libraries like Psyco or Pyrex to speed up Python scripts dramatically. You can also write Python-compatible modules in C/C++ for the ultimate in performance

- Mike
Please excuse my ignorance about the topic if i'm wrong, but do you even need to actually learn a language for Flash. I recently downloaded Flash Mx to try and make animations, and it doesnt seem like there is any actual programming involved. It seems much more like just animating art.
Artix, Mike,

Thanks for your replies guys. I want to design games for a larger web site, so that they can be used (played) in the site, so by your input I suppose that starting up with flash will be a better thing due to the fast load and easier programming right? then moving on to java for a bit more complex games maybe.

Any particular site for tutorials that you like?

Thanks again!
Quote:Original post by omgh4x0rz
Please excuse my ignorance about the topic if i'm wrong, but do you even need to actually learn a language for Flash. I recently downloaded Flash Mx to try and make animations, and it doesnt seem like there is any actual programming involved. It seems much more like just animating art.


ActionScript is the very capable language which you'd use to introduce more complex behaviour, such as that which you'd need in a game. It's built into Flash. So, yes, there is some programming involved - and certainly if you were building a game.
[TheUnbeliever]
Flash:
Since the flash engine has to render the vector graphics (most of the time), flash apps are gonna run very very slooooowwww....

Try making an aircraft vertical-scroller shooter game, put 20 enemies inside and generate bullets at 2 bullets per second.
Or perhaps, try a gigantic snake game and see what happens once the snake has eaten 100 foods.

Feel the lag...

That's the reason why no one has been making advanced first-person shooter games, complex racing games, or a game with a complicated particle system in flash.
Quote:Original post by Artix
Java is universally available and usable; Flash's usability depends on the (admittedly broad) propogation of Macromedia's Flash plug-in.

I just wanted to clear up this misconception as it is actually backwards. The majority of machines don't have Java installed and it is required that you install the JVM before running any applets, etc. Whereas Macromedia Flash is basically a gaurantee (higher than 99% of systems used online by users).

Quote:
Java integrates easily with other web page elements; Flash less so.

Could you please give me an example? It's just that after thinking about it I couldn't think of a single way Java can interact with the page that Flash can't.

Quote:
Java can be scaled to any platform that has a processor; Flash less so.

Considering Flash runs on Windows, Linux, and MacOS (which are the only system platforms that matter for PC games) this statement really doesn't make sense.
I've personally decided on Flash as my game development platform of choice. You can read many of my observations here at my blog: Troy's posts related to Flash Game Development.

I prefer it over Java for two big reasons: it's lighterweight, and the language (ActionScript) is more to my liking (though I'm a huge fan of Java as a language as well).

Java offers a few significant advantages, though: for non-rendering-related operations, it's faster. And for some types of programming (like threads), it's more appropriate.

You have to remember that Flash was a vector animation package first, with a tiny bit of branching/conditional interactivity mixed-in. It wasn't until Flash 5 that true scripting was introduced, and not really until Flash 8 was true bitmap rendering introduced (true in the sense that its fully programmable like a game programmer would expect). Flash 9 introduces ActionScript 3, which offers language improvements, as well as a lot of virtual machine optimizations.

Flash 7 is currently available on MacOS, Windows, Linux, PSP, and several other embedded platforms. Flash 8 is available for MacOS and Windows. Flash 9 is available for MacOS (including Intels) and Windows (including Vista), with a beta (not sure if its public yet) for Linux (finaling in Q1Y07, I believe).

MySpace has shifted its Flash components to requiring Flash Player 9 (for security reasons), so the installed base is growing faster than previous versions. Flash Players 7 and 8 are available on something like 85%+ of web-enabled computers. Since Flash Player 7 (perhaps earlier), the plugin has been able to update itself without the user having to do more than click "okay" when prompted (a browser re-launch may be necessary).

Flash Player 9 just introduced (in beta form) a full-screen mode in the web plugin, which is pretty cool. As far as I can tell (and would hope), the Flash content can't activate full-screen mode, the user has to right-click and select it from the context menu (and then do the same or press ESC to return to the browser). I believe this will be great for gaming, as the switchover is seamless and instant (though no video mode changes, unfortunately).

If you want to develop your Flash games in a traditional, code-oriented environment (like you would for Java, C++, C#, Python, etc...), you can grab the excellent (and recently finished from beta) FlashDevelop. I can't say enough good things about this product, and its open source (built on C#.NET) (though Windows only currently, it runs perfectly under Parallels and folks are looking at porting it to Mono). There's also the MTASC compiler (which FlashDevelop uses) that you can integrate into the IDE of your choice (if someone else hasn't already done it for you). You can find plenty of open source tools at the excellent OSFlash wiki.

For games, in a web browser (or even outside of one!), I'd recommend Flash whole heartedly. The only thing so far it lacks that I miss (from a programming perspective) is threading. Not a big deal for most of the games one would make in a web browser, and the plugin itself is asychronous when it comes to network requests (which would be the most likely candidate for threads), so it doesn't come up too often. The only impact is when you have code that runs for too long (a second or so) without returning to the player it pops up a warning dialog (like &#106avascript in the browser would).

Any questions, feel free to ask! I'm a huge fan and have done a great deal of research on the subject.

This topic is closed to new replies.

Advertisement