Advertisement

[java] Machine Code?

Started by March 26, 2001 08:33 AM
13 comments, last by ijiro 23 years, 9 months ago
Just out of curiosity, you really think that development in C++ is as quick as Java? With all the memory issues, it seems to take much longer, especially when you have one really random, annoying, seemingly inconceivable bug. Also, Java has so many good tested classes to use that things are easier to get started on, in my opinion.

Note: I am completely biased, I just like Java alot right now. Additionally, most of my rigorous programming gets done for and at school (where it must compile on their machines) so I don''t really have access to professional debuggers (especially for memory issues), and additionally programming C++ for school means writing all of my own new data structures (They don''t really provide alot of libraries, where Sun makes everything compatible with the JFC). So I am definately at an advantage when programming in Java for school, because I can get into the heart of the program quickly by using the JFC efficently.

One last note: I program better in Java than C++ now, so I am doubly biased!!

--OctDev
The Tyr project is here.
There's no reason at all why you shouldn't use Java to develope platform specific games. Although Java was designed with platform independence in mind you don't always have to use it that way which is why JNI exists. To be honest, having platform independent games isn't really that important considering most (but not all) game players use Windows.

As to the 'why not just use C++' argument, Java does have some advantages over C++ in terms of better design features and improved productivity. Check this article out if you are interested in the benefits: Why Java can be used for games Developement time using Java is reduced by quite a bit and you get a lot less headaches with it.

Writing a wrapper around DirectX would mean that you could knock out games a lot quicker than you could in C++ but they might run a little slower depending on the type of game you are writing and how good a coder you are. A lot of people go on about speed and optimisation when they are only writing little 2D games that even the lowest end computers can handle with ease. Plus when compiled to native code Java doesn't run that much slower than C++ code (and sometimes can even run faster!) and it is catching up all the time.

BTW, Visual J++ does produce an .exe but unfortunately it doesn't compiler to native code. It just packs the class files into the exe. The program still runs on a MS JVM. Why they didn't include a native code compiler is beyond me seeing as if you are using it to write Windows programs then they are going to be platform specific anyway. Another IDE that includes a native code compiler is VisualCafe but it's pretty expensive although very good.

Edited by - Kaijin on April 20, 2001 9:24:47 PM
Advertisement
...and this debate will get much more interesting with the release of JDK 1.4 (what is up with Sun's versioning criteria?). Check out javagaming.org.

GamesToGO: The Console Gamer's Paradise

Edited by - Aldacron on April 21, 2001 10:38:09 AM
The direct memory access will be a very welcome feature, I feel a significant speed bonus coming on
platform independance is a nice bonus but that''s not why I use it. I use it because it has nice syntax and garbage collection. All because a language has an emphasis on platform independance doesn''t mean you have to use it that way, I have no loyalty to some abstract design goals. I just want to get things done and I''ll pick up any tool that can help me, but I''m not going to pick up any agenda. Likewise I''m one of the most object oriented guys I know, yet I don''t program that way out any particular reason other than it works, so I don''t feel any guilt when I break a commandment.

This topic is closed to new replies.

Advertisement