Jump to content
  • Advertisement
Sign in to follow this  
InsaneBoarder234

[java] Java for game dev?

This topic is 3896 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'm studying java as part of my university course so I was thinking about doing a 4e6 entry in java in order to boost and strengthen my skills. I already have a fairly good understanding of C/C++ so that side of things isn't a problem, I'm just wondering what other people think of java with regards to game development? What is it like performance wise? Are there many (any?) "libraries" out there to aid in java game development? If it matters at all, I don't plan on doing any kind of 3D graphics for this project if it goes ahead.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by InsaneBoarder234
I'm studying java as part of my university course so I was thinking about doing a 4e6 entry in java in order to boost and strengthen my skills. I already have a fairly good understanding of C/C++ so that side of things isn't a problem, I'm just wondering what other people think of java with regards to game development? What is it like performance wise? Are there many (any?) "libraries" out there to aid in java game development?

If it matters at all, I don't plan on doing any kind of 3D graphics for this project if it goes ahead.


performance is(or was, havn't looked in quite some time) slightly behind .NET and a bit ahead of mono(or atleast it was last time i looked at mono). (if you're using suns JVM , i don't know how the others perform). Either way both .NET and Java was fast enough last time i looked and should be more than fine today.

As for libraries you probably want to look at LWJGL (bindings for OpenGL and OpenAL) (There are ofcourse other libraries aswell as some engines you can use)
(Oh , and despite what some people say, LWJGL works fine in applets or with Java webstart aswell (you just get a security warning since LWJGL executes largely outside the VM))

Share this post


Link to post
Share on other sites
actually my personal opinion (and also that I was told) Java performance is not that far behind any longer. There are bindings for opengl and (I guess) even DirectX. So you have all the hardware accelaration you get with c/c++ too.

If you consider to use Java for games professionally I would suggest to go a step deeper into J2ME (Micro Edition) for celluphones, there is the bigger java market so far.

And (if you haven't knowen so far) there is the JMonkey engine. I haven't worked with it so far, but it realy looked great.

One benefit Java has (and shares with C#) are the applets. With a little fantasy and java (or C#) you can do great things on the upcomming browser game market (I forgot the name of the MMORPG as applet, made by an british company).

But if you allready have a good understandig of c/c++ stick to it, but a mix (with Java) can never be wrong.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
The people who have paid any attention to Java (read: almost nobody who does anything vaguely serious with graphics) know that performance isn't really a problem for it. (Ironically, most of Java's performance issues are with desktop apps that are GUI heavy, because of how badly written the Java UI libraries are.) What IS a problem:
  • Poor SDK and library support. Nobody supports Java or is even interested. This one will probably never change. Of course it's caused by...
  • Extremely poor interoperability support. JNI is just a cruel practical joke on developers. Nobody is interested in doing this work, because of the monumental failure on Sun's part to do anything reasonable here.
  • Poor language expressiveness. Java is an extraordinarily dull, uninteresting, and weak language. It does an alright job of covering the basics, and stops there. There's simply no sophistication to the language. And thanks to the library support issues, integrating a scripting language is a pain too. (Could Jython help here? Hard to say.)
  • Java3D. This was the official 3D route from Java for some time, and whoever designed it was a complete moron (and probably had a Phd). JOGL has come into the fold now, but it's far too late for a lot of people.
  • Perception. Sun basically fed us a bullshit line over the last 10 years. While Java's more or less reached what was originally promised, people have a real bad taste in their mouth after it all.
That is why people no longer pay any attention to Java for game development. Hell, people don't even bother with applets anymore; that market was completely taken over by Flash.

Share this post


Link to post
Share on other sites
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).

Promit's rather pessimistic list is a bit off. There are plenty of libraries out there that will help with game development, and most of those cover the cases where you really need JNI (for bindings to system APIs like OpenGL and OpenAL, for example). You can write complete games in Java without ever dropping to JNI yourself. The bit about language expressiveness is his own personal gripe. I'm an old C guy, but I quite like Java myself. Java3D is open source now and has improved from the old days, but there are much better options available like JMonkey (and it's not too late for a lot of people). As for his last point, the perception thing, that certainly is a problem. There's a lot of FUD out there, as Promit so aptly demonstrates, that is based on outdated, or just plain wrong, information. So that surely has contributed to Java's bad rep. I can't count the number of times I've seen people make a comment like, "I can't believe that's made with Java" after playing a Java game.

Hobbyists and indie shops have been using Java to develop games for years. Games like Puzzle Pirates, Tribal Trouble, Bang! Howdy and all of the PuppyGames stuff, are all made with Java. Now, it's starting to gain some traction in the mainstream industry as well. NCSoft's Austin studio has at least one Java project in development using the JMonkey engine (and several of their improvements to the code base make it back to the JMonkey's source repository). Perpetual, along with some other companies who haven't gone public about it yet, are integrating Project Darkstar (a.k.a the Sun Game Server) into their MMO pipelines. And of course, Java is ubiquitous on mobile platforms.

In other words, there's no problem with using Java for game development. The best place to go for help and more info javagaming.org. There, you'll find a number of people currently using Java for different game, and game-related, projects, who will answer your questions based on practical experience and point you in the right direction.

Share this post


Link to post
Share on other sites
You are making a game for a contest, and probably your game won't be played by more than 1000 people. I am pretty sure Java's performance is more than enough for your game -- heck, I think it is even enough to create all sorts of 2D games, and you do not even need OpenGL bindings. There are far more important optimization issues that you should be thinking about to make yourself a better programmer.

There are Java optimizers out there for your micro-optimization needs. Check ProGuard, an open-source-industry-standard obfuscator + optimizer.




Unless you are making BioShock II, you shouldn't be worried about Java being too slow.

Share this post


Link to post
Share on other sites
Having been a student who studied java 3 years ago and know what was capable 3 years ago. I can assure you'll have no problem making your game, but don't be so depressed when you start seeing it lag unless they've fixed that.

Dang, I was gonna provide you a link to the 2d game that I made, but can't remember my old usename password for the site to grab the link.

Well in a nutshell the Java API supports 2D Graphics double buffering, and I think I saw some new article about java and active rendering, so just hearing about that java must be doing something amazing.

Given that, and the fact that most all cellphones use some sorta of Java RE, and most all games if not all use the Java technology to create the games for the cellphones.

I forgot to mention that what I do remember most about my game(Mario clone) I made in java while I was attending my AP Comp Sci class that taught us java was I didn't have to use any third party libraries whatsoever to make the game, and it wasn't that complicated as it would of been if I had just used C++ STL stuff to make a game. Hope this helps!

Good Luck

Share this post


Link to post
Share on other sites
Quote:
Original post by Woron kar DeDulle
there is the JMonkey engine.

Quote:
Original post by Aldacron
I can't count the number of times I've seen people make a comment like, "I can't believe that's made with Java" after playing a Java game.


Hehe, I just watched a demo video on the JMonkey website and I just have to say wow!

My only real experience with java (prior to uni) is with various GUI based applications and applets. I've never been keen on these, they never seem to be very responsive or execute fast, hence giving me the idea that java isn't great performance wise. Well now I've been enlightened somewhat!

Well I'm quite happy about using java for a 4e6 project, now I just need to get an idea down on paper (read .txt file)!

Thanks for the responses and links everyone :)

Share this post


Link to post
Share on other sites
Quote:
Original post by InsaneBoarder234
Hehe, I just watched a demo video on the JMonkey website and I just have to say wow!


You must be talking about the hockey video. That's a good looking vid, but the one for Nord has more wow-factor, methinks.

EDIT: Fixed the link

[Edited by - Aldacron on October 12, 2007 8:34:42 PM]

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!