I have a Game Programming team and i would like use java for our games. Then, Java is fast? Our first game will be an Adventure 3D, the second will be a strategic game (2D or 3D) or a FPS Quake style (3D of course). Is java a good way? is faster?

I need help with this questions. Our ideas is make commercial games in CD (for win,linux etc...) and game web-versions perhaps.

I have but one question: have you programmed games before? If you haven't you should seriously look into writing pong, tetris, or pacman in Java first, so you can get a feel for the language. It is very beneficial as a first project.

As to your other questions, yes, projects have been done in Java similar to the ones you wish to pursue.

Hi It depends what you mean by fast enough. For 3D this boils down to one question, do you need that extra 1% on your framerate more than you need that extra few months development time. If the answer is yes, then you will want to go to C++ with opengl and spend the extra few months dev time. If you want to write something quickly that runs 99% of the speed, then java with JOGL will be fast enough. JOGL is a java binding to opengl going through a JNI interface, so it runs at the speed of the hardware with a little over head for the JNI calls. The maths that goes on inside the VM is very very fast (Jeff has some interesting insight on this one). If your talking 2D games, then using the standard 2D methods isn't quick enough, but there are now accelerated 2D images and I understand his support is improving, so by the time you release your game the 2D should be quick enough too. On the 3D front, are you planning on using a scenegraph (like java3d or xith3d) or are you going to re-invent the wheel and write your own?

Endolf

P.S. It's difficult to measure performance of jogl compared to C++ with opengl for anything other than really simple scenes as jogl is relativly new and most poeple don't have complicated enough scenes to try it with, Magicosm springs to mind as something that is complicated, but with no C++ version to compare too, we have no idea of a performance ratio.

I have a Game Programming team and i would like use java for our games. Then, Java is fast? Our first game will be an Adventure 3D, the second will be a strategic game (2D or 3D) or a FPS Quake style (3D of course). Is java a good way? is faster?

From an application point of view many articles from Java experts indicate that modern JVMs run Java code roughly as fast as a native C++ code would do, and sometimes the JVMs do even better.It's important however to know what to do and what never to do. There's a nice online book on performance tuning: http://java.sun.com/docs/books/performance/

When it comes to 3d you could use:* an OpenGL binding like JOGL (BSD licenced) for a low level 3d API. Its small platform dependant DLL is available practically for any OpenGL enabled platform.* a Java 3d engine like Xith3d basing on JOGL (also kind of BSD) for a high level 3d API.With both ways you can do fast 3d graphics. I don't think (anymore) these ways would be slower than compared to C++.

I've learned the OpenGL basics first with JOGL and now recommend to use Xith3d because it will allow you to concentrate on your game. Xith3d is optimized for games, it looks very promising and is pretty fast. Since it's similar to SUN's Java3d you can read many parts of Java3d's existing knowledge bases.

As a former C++ programmer I can tell you that your development cycle will be much more efficient with Java than with C++, much more error-proof and you don't have to re-invent the wheel all day because Java's standard library is very large and brillant. Java is great (and I'm on edge for its new generics with Java 1.5).

Quote

do you know Web's with good games in java to convince to me?

The only full blown 100% Java game I've seen so far has been Alienflux. Well, ~100% Java because it uses a native OpenGL binding but this souldn't be a problem with SUN embracing OpenGL quite a bit.

It depends what you mean by fast enough. For 3D this boils down to one question, do you need that extra 1% on your framerate more than you need that extra few months development time. If the answer is yes, then you will want to go to C++ with opengl and spend the extra few months dev time. If you want to write something quickly that runs 99% of the speed, then java with JOGL will be fast enough.

1) The availability of experienced game developers who know C++ vs the number that know Java. There are many more developers available who are experienced in writing (professional) games in C++.

2) The (mis)conception that Java is slow and shouldn't be used to games held by many technical engineers. Java has had the "slow" tag for a long time, its hard to shake off. However, once arguments on these lines boil down to cold figures the results is normally as mentioned above. It is difficult to get games developer even thinking about Java, let alone consider the speed implications properly

3) The end user conception of Java. Although many Java developers will tell you that you just don't need to let the end user know what the game is written in, it generally becomes apparant (JRE download, error messge, stack traces etc..) Many end users also have believe in the stigma associated with Java. This isn't a very severe problem since this isn't a huge user base.

4) The lack of commerical engines available based in Java/OpenGL (JOGL). The strong commercial engines have existed quite a while and hence are rooted in C++. This is being remedied by initiatives like Xith3D and Jist3D. With luck this won't be too much of an issue for long.

*I* would recommend it totally. However, I would say that you need to go in to development with your eyes OPEN.

If you're coming from a C++ background, you're going to love some bits and hate others (I'm sure Preston would agree with this). There is a learning curve involved.

If you're coming from no programming background then Java is a great place to start! However, starting with a full blown game would be a big mistake (as Gergis says above).

Where speed is concerned you're going to lose a bit on C++ but the development time gained well outweighs this (as Endolf says above).

It is defintely true to say that your can produce high quality games with a good performance and all with a great yield (for examples see cfmdobbie's post).

Java is a good language to be writing games in. It has advantages and disadvantages over other langauges and you need to be aware of these. However, overall, from an external point of view I would choose Java as a games development language.

then with java I can make good games with quality and yield? Without having problems to need great equipment etc...

Take a look at the examples I've listed above. With the right skills, there's no reason at all why you personally can't write games in Java as good as those, as they are already using Java technology. Everything you see there is possible with Java, by virtue of the fact that they already exist.

Naturally, they aren't the pinnacle of Java gaming - there will be games yet to be developed that will be better than them.

Quote

you recommend it totally

Quite frankly, you'd be hard pressed to find someone who'd disagree with that statement, given that this is a Java gaming forum! Please be aware that our views are biased, and let the examples speak for themselves.

If you're coming from a C++ background, you're going to love some bits and hate others (I'm sure Preston would agree with this). There is a learning curve involved.

Yes, the learning curve is there. However it depends on your programming background. Before C++ I did program Object Pascal, so Java always looked more natural to me than C++.The only thing I'm missing in Java is generics but it's around the corner (Java 1.5), so no complain.

I too would clearly recommend Java to Zeaolon.It lets you concentrate on the real task: programming your game/application, and not battling with buggy (C++) compilers, strange (C++) syntax and even more strange peeking and poking in memory (memory holes etc). Still writing games isn't easy, it's more complex than application programming. Java won't do that for you. ;-)

To Zeaolon's other question: Since there are plenty of excellent free developments tools and good documents (also Javadocs) available for Java (IDEs etc) I find it cheaper and simpler to get started with Java compared to C++.

But if you look at the history you will see there was a time when 'all game companies" programmed in assembly. It took quite awhile for C to take hold. Then for a long time game companies would only use C, not C++.

With any new tehcnology there are issues of learning curve and unknown risks. Game companies are typically risk averse beause of the heavy risks already inherent in game publishing. (For example, noone can predict if game play will be a "hit", a "flop" or somewhere in between.)

For this reason game companies tend to stick to the devils they know (such as C). Even if Java reduces many of the development risks, and most of us here believe it does, it is a new and unknown quantity to the game developers.

Finally, there's the question of learning new ways to do things. game programmers always have too much to do in too little time. As such its most convenient to keep using the same bag of tricks you already know. Even if Java is quicker to code in, and again most of us here believe it is, shifting means learning a whole new skill set which is an upfront time cost.

In the end the industry will shift the same way it has in the past. A few far-thinking folks will do great Java games, proving that it can be done, and then the rest of the industry will slowly migrate or die off. (How many assembly programmers do you see jobs for these days??)

Got a question about Java and game programming? Just new to the Java Game Development Community? Try my FAQ. Its likely you'll learn something!

Exactly.(I hoped no one would have started that silly "my IDE is better than yours" discussion. :-)

Quote

Now? jogl? java3d? lwjgl? xith3D? other?

i Repite, for commercial games. i need speed and yield.

You have to decide if you want to go the low level 3d API way, or the high level 3d API way.If you are pretty good at programming OpenGL directly and have got enough time and knowledge to write your own 3d engine, use SUN's semi-official OpenGL binding named JOGL.

If you think you go better with a high level 3d API, use Xith3d. While it's similar to Java3D in several aspects from an end user's point of view, it's optimized for games, so it's faster, and it's alive (Java3d is currently frozen at SUN). Also since it's BSD Opensource you could modify parts which don't fit to your needs.

Quote

What is the minimum requirments form an application 3D in java? approximately

Really the same you will have for any 3d game no matter in which language it's being developed.If your graphics card is fast and your CPU so will be your 3d game.

That is a good start, you can probably evaluate them based on your own needs a lot better than we can, as most of us have decided on one or the other so will have biased views.

Quote

Now? jogl? java3d? lwjgl? xith3D? other?

Jogl and lwjgl are both low level opengl bindings (ok, lwjgl does more, but for now we are concentrating on the graphics side of things), Java3D and Xith3D are higher level scene graphs. For development speed I recomend a scenegraph over GL bindings (and you'd only end up having to write your own to some degree anyway). Java3D is probably more generic and more optimised right now as Xith is still fairly young. Java3D is pretty much dead in terms of new development, and doesn't support things like stencil buffer opertations. Sun keep saying it's not dead, but apart from bug fixes (which havn't been released) it's as good as (sorry guys). Getting commercial support (in terms of new features and bug fixes) for any of the above items wouldn't be easy, if sun are still doing anything with java3d I can't imagine it being cheap to get on board with commercially. Jogl is a community project, as is Xith, lwjgl is different, I can't comment on what they would/would not be willing to commercially support. The advantage of the community projects is that you can always submit bug fixes/new features if you find/fix/develop them.

Quote

i Repite, for commercial games. i need speed and yield.

Then I would recoment Java3D or Xith, as a hobby games developer I have chosen xith is it is still active, even if it is still young.

Quote

What is the minimum requirments form an application 3D in java? approximately

It purely depends on your app, but I generally recon that it's not far of what it would need in C++, but with a good chunk of memory added, that is one place where java still isn't great, on the other hand, RAM is cheap these days. If your aiming towards 3d accelerated gamers with geforce 2+ (or ATI equivelant) then I would expect them to have probably 512mb ram and at least a 1ghz processor

This is what I was trying to say: I only write games as a hobby rather than commercially, so some of my decissions might not be appropriate for you. I am using Xith3D as it is being actively developed and improved. They haven't worked extensivly on the performance enhancments yet as they are still working on content, It is still quick though. I would certainly recoment Java3D or Xith3D as they are high level scene graphs and your development time will be drastically reduced. By the time you are close to testing/publishing your game Xith3D will have improved considerably with new abilities and performance enhancments. Again, these are just my opinions, as it's a commercial venture you will have to decide where to invest your time and money. If it were my money, and my choice, I would probably choose to go with Xith3D.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org