[java] Java for game dev?

Started by
59 comments, last by Son of Cain 16 years, 5 months ago
1. JavaGaming.org. Lots of links and discussion.

2. LWJGL. Binding for OpenGL, OpenAL, FMod and allows access to game controllers.

3. Slick. Fast 2D game library written on top of LWJGL and OpenGL.

4. JSmooth. Simple app which generates .exe wrappers around you jar files so windows people get a nice friendly exe to run.

5. Shameless self-promotion. [grin] Written with LWJGL.
Advertisement
Quote:Original post by Aldacron
You must be talking about the hockey video. That's a good looking vid, but the one for Nord has more wow-factor, methinks.


Your link is wrong :) But no, the video I saw wasn't *just* hockey, there were several games in there and overall I was very impressed by it all.
Progress is born from the opportunity to make mistakes.

My prize winning Connect 4 AI looks one move ahead, can you beat it? @nickstadb
Quote:Original post by InsaneBoarder234
Your link is wrong :)


Oops! Fixed it.

Quote:Original post by Aldacron
There's a thriving Java game development community online. You can find game engines like JMonkey (3D) and Slick (2D), which use native bindings for OpenGL, OpenAL, and such via libraries like LWJGL (and the official Sun alternatives, JOGL and JOAL).
Physics? Scripting? Input? Video? Networking? (No, Java's built in network stuff is not good enough.)
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by Promit
Physics? Scripting? Input? Video? Networking? (No, Java's built in network stuff is not good enough.)


There are a few physics options. JOODE is a Java port of ODE. There's a JMonkey physics package in development and, for 2D, there's Phys2D.

Scripting languages aren't really necessary in Java, since you can hotload classes on the fly and, with third-party libs, compile them on demand. But, that apparently seems like too much voodoo for most people, so there are a number of Java scripting languages out there. Where performance is a factor, pnuts and Rhino are the way to go. But Groovy and Jython are quite popular. There are many more, but I know nothing about them. Furthermore, Java 6 added a scripting framework to the standard APIs, so you can use a common interface to different scripting languages. The four I listed have implementations, as do several others.

As for input, the way to go is JInput, the cousin of JOGL and JOAL. This is used internally by LWJGL as well. It uses DirectInput on Windows, and whatever is appropriate on the other supported platforms. This allows game developers to use Joysticks, gamepads and other controllers not available through standard Java APIs.

Video playback is currently a problem. I don't know of any libraries that provide for this in a manner suitable for game programmers. This isn't an issue for most people currently using Java for gamedev, though it certainly can be for AAA titles. But, I suspect it's only a matter of time now that companies like NCSoft and Perpetual are using Java.

And for Networking, I wholly disagree with you. I haven't the faintest idea why you think that Java's networking isn't good enough, considering that the driving force behind Java for the last decade has been enterprise network applications. Unless you mean that the java.net and java.nio APIs are not high-level enough. In which case there's Apache Mina, JGN (JavaGameNetworking), and, at an extremely high level, Project Darkstar. Those are the ones I'm most familiar with, but I know there are a few more out there somewhere.

A decade ago, third party libraries had to be pushed down game developers' throats for the most part. These days, it's a chicken-and-egg situation. If nobody's using a language for game development, nobody's developing game libraries for it. If there are no game libraries for a language, nobody wants to develop games with it. The days of 'nobody's doing it' are quite over for Java. As time goes by, we are going to see more Java game-related libraries, improvements to existing libraries, and quite a bit of growth in the Java game space.
Quote:Original post by Aldacron
Quote:Original post by Promit
Physics? Scripting? Input? Video? Networking? (No, Java's built in network stuff is not good enough.)


... snip ...

Video playback is currently a problem. I don't know of any libraries that provide for this in a manner suitable for game programmers.

... snip ...



I haven't used it myself, so I don't know how useful it is to game developers, but here is a (supposedly) good library for media playback:

FMJ - Freedom for Media in Java
Quote:Original post by Promit(No, Java's built in network stuff is not good enough.)


Would you care to elaborate on that point? Many Java devs I work with shun the higher level libraries and prefer to work directly with the built-in stuff.

Everything else that Aldacron says is accurate and in touch with the current Java gamedev situation, and we all concede that movie playback blows right now, but everything else is improving by the day.

For 2D, Slick and Phys2D together make a killer combination, and for 3D, jME is the way to go.

- Jon
Quote:Original post by Jon914
Quote:Original post by Promit(No, Java's built in network stuff is not good enough.)


Would you care to elaborate on that point? Many Java devs I work with shun the higher level libraries and prefer to work directly with the built-in stuff.


No, he doesn't need to because he is a moderator. That means that he can go around trolling as much as he wants and if you don't like it then all you can do is to get angry about it.

Among the misinformation he spreads around the most incredible one was about "scripting languages". Did he pass the last 10 years with his head stuck up in his ass? From what planet did he come from? Java had scripting languages, and frameworks for plugging them into the JDK, long before it was included in the standard JDK (that means before .Net existed). Today there are many production ready options around, some developed by Sun itself.

This idea that somehow it's impossible to run other languages on top of the JVM could only from a cheerleader type of guy that doesn't have the slightest idea of how things work. He must be one of those that believe that .Net is faster than Java (because Microsoft said so) and that Visual Studio is the best IDE (because he doesn't know any other or doesn't care to know).

For the record, Naughty Dog created their own Lisp for producing PS2 games. C and C plus plus (or even C#) are hardly the only options for game development. It just takes a little of imagination to see ways of improving the life of developers.

There are a few things that I don't like about Java, but vast majority of the Java bashing you see on the internet is just bullshit. This guy Promit has set a new world record by not getting a single fact right.
Quote:Original post by signupsucks
No, he doesn't need to because he is a moderator. That means that he can go around trolling as much as he wants and if you don't like it then all you can do is to get angry about it.

Among the misinformation he spreads around the most incredible one was about "scripting languages". Did he pass the last 10 years with his head stuck up in his ass? From what planet did he come from? Java had scripting languages, and frameworks for plugging them into the JDK, long before it was included in the standard JDK (that means before .Net existed). Today there are many production ready options around, some developed by Sun itself.

This idea that somehow it's impossible to run other languages on top of the JVM could only from a cheerleader type of guy that doesn't have the slightest idea of how things work. He must be one of those that believe that .Net is faster than Java (because Microsoft said so) and that Visual Studio is the best IDE (because he doesn't know any other or doesn't care to know).

For the record, Naughty Dog created their own Lisp for producing PS2 games. C and C plus plus (or even C#) are hardly the only options for game development. It just takes a little of imagination to see ways of improving the life of developers.

There are a few things that I don't like about Java, but vast majority of the Java bashing you see on the internet is just bullshit. This guy Promit has set a new world record by not getting a single fact right.


Wow, you talk a lot without saying anything of substance.

Regarding scripting languages on the JVM, no one here said that they were impossible. Promit's exact words were "integrating a scripting language is a pain". Obviously he knows that you can run other languages on the JVM, as he mentions Jython.

(Personally, I've worked with Jython and Jruby, and yes the integration is kind of a pain. But I wouldn't say it's any more hard than integrating a scripting engine with any other language.)

If you have gripes with any of Promit's other statements, please explain what they are. Making blanket statements in the form of "everything that dude says is wrong!", is the opposite of helpful.
Quote:Original post by pinacolada
If you have gripes with any of Promit's other statements, please explain what they are. Making blanket statements in the form of "everything that dude says is wrong!", is the opposite of helpful.


Please read the thread, the answers are all there.

Scripting languages like Scala, Ruby, Groovy, &#106avascript and many others are all over the place. Not knowing for example that the JRuby people were hired by Sun for developing JRuby for the JVM and that it has excellent support on NetBeans for example is evidence enough that he doesn't have a clue of what he is talking about.

Oh yes, he didn't explain anything about "network being not good enough". I think he is the one that must explain himself, the other participants of the thread already answered the original question pretty well with information and links for libraries.



This topic is closed to new replies.

Advertisement