Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kentaro

[java] Java as a serious gamedev platform...

This topic is 5558 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

Doesn''t anyone take Java seriously as a programming language? I understand that its design can sometimes be a little troublesome (casting from Object to pull things out of data structure classes is annoying) and that it might run slower than well-written C++ because of its semi-interpreted nature. However, with computing power increasing at an exponential rate and with a lot of new developments in Java technology, I''m surprised and even a bit offended that I still hear people saying that Java is only good for making tiny game applets. The rest of their words, the way I hear or read them, usually imply that C/C++ is the one and only language for programming games and that anything else is either unacceptable, buggy, slow, or a combination of these three. Do you accept Java as a serious language for programming games in? What are Java''s major strengths and weaknesses as a game development platform? Please discuss. =) (I realize that out there somewhere is a LONG dissertation on Java as a game development platform. I don''t really care to read it though; I post this to see the discussion unfold.) This isn''''t life in the fast lane, it''''s life in the oncoming traffic. -- Terry Pratchett

Share this post


Link to post
Share on other sites
Advertisement
Okay you asked us to discuss. Umm... Java sucks, hows that . Seriously I looked at the java syntax and all and I was just wtf, then again when it comes to programming I''m a control freak and I hate all languages like BASIC/VB/JAVA etc.

Share this post


Link to post
Share on other sites
I think Java is a language to be taken seriously. With well-written code and JIT, Java can have performance on par with C++. There have been studies proving this and I have noticed it in my own work.

But I''m not just saying that. If you want proof, go to http://www.minatrix.com/burningmetal2.html and play Burning Metal 3d, (although unfortunatly you have to sign up for some stupid free account to play).

Anyone who tries to make a blanket statement, like "Java is slow", is just uninformed.

Share this post


Link to post
Share on other sites
Okay, umm... RamboBones, u are an idiot... Comparing Basic to Java, hmmmmmm stfu

On a more serious note, i think that Java has lots of potential for game development, and Java performance is increasing greatly. Theoretically, the JIT has the potential of being even faster than C++ because it finishes compiling code at run-time, and therefore can take advantage of system specific features.

I have written a good number of 3d applications with OpenGL for Java, and performance has not been a problem. Some stuff includes a fractal terrain generator, Quake MD2 and BSP renderer etc. I REALLY want to do a full "port" of Q2 into Java. I say "port" because i dont actually want to just convert the code, but rather try to take a more OO approach to it. I think this will be an excellent project, and anyone with any experience please contact me. I would love to work on this project.

Share this post


Link to post
Share on other sites
They''d be right if they said "Java is slower " though.

There are several critical issues with Java performance right now as a general purpose games development tool:

- the lack of "structs" for NIO buffer access. (If you don''t understand this then don''t comment about it please but at least give us your votes at [url]http://developer.java.sun.com/developer/bugParade/bugs/4820062.html[/url])

- escape analysis to prevent garbage getting created in the first place; works excellently in Jet 3.0 so I should think they''d better get it in Hotspot sharpish

- the lack of "const" (or a design by contract) which enables a whole bunch of excellent compiler optimisations

- A two-stage compiler that does fast client-style Hotspot JIT and then goes on to do server-style Hotspot JITting later. The client VM, like it or not, is really too slow for performance games. The server VM is just fine but takes far too long to start up and it looks pretty unprofessional.

- Fix the bloody floating point performance so it''s as fast as IBMs, at least

- Run that garbage collector concurrently during the vertical blank by default We need a specific gaming VM with specific gaming optimisations for best performance.

All these factors together combine to conspire to give us a relative speed to C++ of between 50% and 90% for the average application depending on fillrate usage. When all of them are done we should see between 90-100% of C++ speed.

So go and vote for structs, NOW!

Cas

ps. Anything qualified with the words "theoretically" and "potentially" essentially means "no, it''s not there yet" to a C++ programmer.

Share this post


Link to post
Share on other sites
quote:
(I realize that out there somewhere is a LONG dissertation on Java as a game development platform. I don't really care to read it though; I post this to see the discussion unfold.)


Why do I want to discuss it with a pretentious ass? Thats how you come off with comments like that. Besides this has been talked to death on this forum and every other java forum even remotely related to game dev.

I like Java the language just fine; its alot easier to get stuff done with than with c++ IMO.

However, I don't like the massive bloat of Suns Java libraries. I don't like the fact if I make a standalone game I have to distribute the latest JRE with it or trust to the user to try to play it on OEM crap vm's. I don't like making applets that run like crap on 50% of computers out there.

I showed with my sidescrolling applet that Java + AWT is more than sufficient to do just about any 2D retro style game you want with a current JRE.

So what have you done?

EDIT: Cas - I vote NO to LWJGL; why must I have a Geforce 2 or better to use it?

[edited by - nonnus29 on March 6, 2003 8:51:20 PM]

Share this post


Link to post
Share on other sites
You think Java is slow?? look at this!!

http://arkanae.tuxfamily.org/en/

100% Java 3D Online Game. And its running on a application server with Java Enterprice Server beans. Find a better technology for c++!!

[img]http://arkanae.tuxfamily.org/screen10.jpg[/img]

[edited by - Eulogy on March 7, 2003 3:33:57 AM]

Share this post


Link to post
Share on other sites
nonnus, the LWJGL works from everything from Microsoft''s shitbag ancient software renderer right up through Mesa and on to Geforce 4 and Radeon9700s! It''s an OpenGL wrapper, not a Geforce wrapper!

So vote yes Actually don''t, go and vote for structs instead! We need another 50 odd votes to get it onto the top 25. Not many people realise what a performance killer this is for games (or even high performance IO in general) so it needs to be brought the the attention of the world at large.

Cas

Share this post


Link to post
Share on other sites
cas, please let me know more about structs. why are they so important? i hardly know any c++ at all. i know how to use structs and how to write them, just not so familiar with what''s going on behind the scenes when using structs.

you can get by just fine in c++ and not use a single struct, right?

Share this post


Link to post
Share on other sites
I think a lot of people stopped taking Java seriously when a million java applets began appearing on really cheap geocities websites.

Join the World Wide Revolution:

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!