The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Why don't more companies make their games in Java

It seams to me that it suits the industry very well, especially for mmorpg's, my team are using java for the client-side stuff almost exclusively... but why don't you see it more often? On the web almost all games are flash and desktop based games all seam to be C or C++ based. It just got me thinking and I wondered if anyone had an answer (btw, I come crom a creative rather than a programming background).

Re: Why don't more companies make their games in Java

But I know what you're getting at. There is a bit of a stigma attached to game programming in Java. There's a stereotype that Java is slow, and this stereotype was reinforced by the fact that many early Java programmers didn't really know what they were doing- doing things like tying up the EDT will make your program slow and unresponsive, which makes people think that Java itself is slow. But that's like assuming all blue cars are slow because you saw a driver of a blue car forget to take off the emergency brake!

Also, many Java programmers are admittedly not very good web developers (myself included), which results in some awesome Java games sitting in the middle of a boring gray website. This causes people to dismiss the whole thing for lack of a shiny website, which might not be fair but is pretty much expected.

Finally, people claim that the overhead of the JRE results in slowdown, but this is pretty much a moot point on modern machines. Plus I would argue that the benefits you get such as garbage collection, compiler optimizations, ease of maintenance, and the Java community are worth any perceived overhead.

That being said, I think that Java is poised to make a bit of a comeback in the game development world, especially for things like Android development. It'll be interesting to see how html5 impacts things, but Java game development is far from dead.

And to be fair, Java isn't as newbie-friendly as flash (especially with the libraries out there for game development) or things like GameMaker, and it's not as close to the metal as C or C++, so it sits in an unhappy middle ground. But libraries like JMonkeyEngine and LWJGL are helping with that, as well as the Processing language, which is built on top of Java.

I'm actually working on a site with all of this in mind. Check it out if you feel like it: Static Void Games

Re: Why don't more companies make their games in Java

My .02 - I'd say while there's historical reasons, much of it today ties back to what a company can market. Take a look at the market nowadays, and you've got quite a few platforms in which a JRE does not exists but C or C++ code can be compiled and ran (Game Consoles, portable devices (mainly Mac products - iPhone, iTouch, iPad)). The write-once run anywhere java concept holds true for PC's and server architectures, but breaks down for many of the money making deployment devices in the gaming industry (in other words writing in C/C++ lets you target as many platforms as possible, java does not).

Re: Why don't more companies make their games in Java

Originally Posted by cheadleand

Nice website idea... I enjoyed your quidich game though I must admit that I found the snitch a little to easy to catch . What's the fave game you have developed?

Thanks! With Quidditch, I designed it with two players in mind, and I didn't want matches to go on forever without end. If you want to prolong the game, you can bat the snitch away instead of catching it.

My favorite is probably the ant colony simulation: Ant Colony Simulation by Kevin - Static Void Games It's not really a game at all, but the ideas I got to play with because of it are really interesting. I'll actually be taking a grad class in the fall on Natural Computation, which basically means algorithms inspired from things in nature (so evolution, things like the ant colony simulation, etc). Really interesting stuff.

The site in general is a way for me to grow as a developer, and I think I learn a little bit from each game I make, so hopefully I'm improving. I would say the site as a whole is my favorite creation, and that I haven't made my favorite game yet!

Re: Why don't more companies make their games in Java

Originally Posted by KevinWorkman

Thanks! With Quidditch, I designed it with two players in mind, and I didn't want matches to go on forever without end. If you want to prolong the game, you can bat the snitch away instead of catching it.

My favorite is probably the ant colony simulation: Ant Colony Simulation by Kevin - Static Void Games It's not really a game at all, but the ideas I got to play with because of it are really interesting. I'll actually be taking a grad class in the fall on Natural Computation, which basically means algorithms inspired from things in nature (so evolution, things like the ant colony simulation, etc). Really interesting stuff.

The site in general is a way for me to grow as a developer, and I think I learn a little bit from each game I make, so hopefully I'm improving. I would say the site as a whole is my favorite creation, and that I haven't made my favorite game yet!

I believe you hit bludgers with a bat, not the snitch. (However, I'm sure it's been done in a game before.)

Re: Why don't more companies make their games in Java

Originally Posted by javapenguin

I believe you hit bludgers with a bat, not the snitch. (However, I'm sure it's been done in a game before.)

Call it artistic license. The game focuses on hitting the bludgers, but you can also hit the snitch away- you would conceivably do this if the points that catching the snitch awards you still wouldn't be enough to win the game. So you hit it away, try to score more points, then catch it next time it comes around.

Quidditch is also not designed to be 1-on-1, so I had to modify the rules slightly- just like you slightly modify the rules of basketball for 1-on-1 games.

Re: Why don't more companies make their games in Java

from my experience, main pro and cons using java are:
pro:
-rich API
-threading is easier than in native
-no compilation time, more productive then
-language is made to be used with OOP (AOP is used too, but no fancy multi paradigm thingies like in C++)
-fast enough for real time game
-non game oriented libs (i.e netty for network...)
-Scripting integration(jsr223)
-ecosystem(eclipse, maven, ant, sonar are high quality and free tools)
-GC

cons:
-ram overhead
-lack of good libraries to make games(like ogre, bullet, open al, binding exist, but often outdated)
-and the worst is deployement, classpath(differ in ide, jar), lib path(differ in ide, jar and native bin generated)

With better bindings and tools to help to maintain deployement process, java would be perfect to make games

Re: Why don't more companies make their games in Java

Originally Posted by Yildiz-online

cons:
-ram overhead
-lack of good libraries to make games(like ogre, bullet, open al, binding exist, but often outdated)
-and the worst is deployement, classpath(differ in ide, jar), lib path(differ in ide, jar and native bin generated)

With better bindings and tools to help to maintain deployement process, java would be perfect to make games

I think you're way off in saying there's a lack of good libraries to make games with Java! There are frameworks such as LWJGL, libgdx, and jMonkeyEngine that help with all of the things you mention here. For example, libgdx (which includes a box2d binding as well as OpenGL rendering, sprite and sound management, etc) lets you write in Java, then outputs executables, Android apps, Java applets, web start, runnable jars, AND html5- all based on the same code. Sure, deployment is a bit tricky when you first start out (as it is in every language). But it becomes a non-issue once you learn how to use these kinds of tools.