Jump to content
  • Advertisement
Sign in to follow this  
Aezon

Java vs Flash(Web gaming)

This topic is 3169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I googled this and came up with nothing, so I have come here: What are the pros and cons of game development in Java and Flash and how do they compare to each other? FYI this is mainly for web development, with a possibility of making a stand-alone EXE for offline play. Edit: I am more experienced in java than Actionscript, but for game development specifically, I have more experience in Flash. I decided to throw this in if experience effects anything.

Share this post


Link to post
Share on other sites
Advertisement
On the surface, Java is a lot more powerful than Flash. Flash, on the other hand, may be easier on beginners.

Java Pros:
- A powerful programming language and VM environment.
- Arguably faster rendering vs. Flash.
- Threading support.
- Excellent documentation (compared to Flash, imho).

Java Cons:
- Performance on some systems/browsers isn't that great always.
- More dangerous (and treated as such by browsers).
- You really need to be a programmer to use it.
- You need a lot more "framework" to get rendering/input going.

Flash Pros:
- Designed specifically for graphics output (animations, movies, etc).
- Easy for beginners to venture into making games.
- Development-time visualization (time-line based development).
- Built-in, simple, resource management.
- AS3 :D
- Supports 3D rendering (Flash Player 10+)

Flash Cons:
- Single threaded. No support for multithreading.
- Performance problems (inherent to Flash).
- Lackluster documentation.
- Terrible code editor (Adobe Flash CSx)
- Terrible debugging (Adobe Flash CSx)
- AS2. 'nuff said.
- 3D Support is...wonky...
- A lot of quirks you need to get used to.

From a programmer's perspective, I like Java better. From a designer's perspective, I like Flash better. Personally, I hate both. [grin]

Share this post


Link to post
Share on other sites
You can always take to heart that the best way to distribute Java is to fake it's deployment as something else.

Share this post


Link to post
Share on other sites
Some corrections/additions to Programmer One's comments:

Nobody should be using the Flash IDE for writing AS3 code. Flex Builder is a great IDE, and Flash Develop is a good free one. Both are based on Eclipse. Flex Builder has good debugging-- you can set break points, explore properties, profile memory and cpu usage, etc., generally seems about the same as Eclipse for Java. Flash Develop has poor debugging.

Additional pros to Flash:

Adobe seems to have done a good job creating a player that runs basically the same everywhere and integrates smoothly with few surprises.

There's huge infrastructure on the web for Flash game distribution. If you write a fun, addictive Flash game, you can be almost guaranteed to reach millions of players with minimal marketing.

Flash apps load quickly and support preloaders.

Additional cons to Flash:

Flash only currently supports TCP/IP for networking, which may be important if you want to do multiplayer.

AS3 in general has been conspicuously made simpler at the expense of some language features: multithreading, generics (besides the new Vector class), fewer numeric primitives.

Doesn't really support a right-click control scheme.

In conclusion, I would still recommend Flash for browser based games UNLESS you have a specific requirement that you know requires Java.

Share this post


Link to post
Share on other sites
Thanks for the help, but I have an addendum to my questions:

Which is better for security, and efficiency? Also, can you use openGL and Java in a web browser?

Share this post


Link to post
Share on other sites
Quote:
Original post by Aezon
Thanks for the help, but I have an addendum to my questions:

Which is better for security, and efficiency? Also, can you use openGL and Java in a web browser?

I'm assuming that if this game can do it then you can do it.

Share this post


Link to post
Share on other sites
Java supports OpenGL through LWJGL or JOGL libraries, there are game engines taht use those also.
If you're planning on having hardware accelerated 3D graphics, then Flash is not really an option for you.

Share this post


Link to post
Share on other sites
Yeah, you can take advantage of hardware acceleration with Java 2D (or JOGL, or LWJGL, but those require your users to download 400k+ of jars), something I don't think is possible in Flash. Unfortunately, it comes down to this: Flash plugin is almost everywhere, Java plugin is not. Java is only now slowly getting over its bad rep (which by now is undeserved, but memories linger longer). In addition, Java plugin was significantly improved in Java 6u10, but you'll probably have to be lucky to get that on the target browser. Most portals for web games also do not accept applets. So even though Java is technically superior, if you want to make money off browser games, you'll almost certainly have to go with Flash.

Do a thread search over at javagaming.org, this topic comes up there pretty often.

Share this post


Link to post
Share on other sites
Thank you for that link, lightbringer. I imagine it will be quite helpful in my studies.


So, am I correct in assuming that my premise is that of requiring a bit of reputation as a game developer in order to have a successful java gaming site?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!