Sign in to follow this  
agm_ultimatex

java jmonkey engine/lwjgl vs using c++/opengl

Recommended Posts

I am currently both fond of c++/opengl and java. My friend and I hope to develope a decent 3d rpg over the next few/several years. I know c++ and opengl are quite powerful, and reasonably quick, however I also cannot ignore the fact that java is available to all OS'. My concern with using java is that utilizes JAR files, and most of the users out in the world, are not familiar with those, and may not feel comfortable running a jar. Theyd prefer seeing good old .exe or a simple zip file that contains the exe. Any input is greatly appreciated. [Edited by - agm_ultimatex on May 12, 2008 6:34:13 PM]

Share this post


Link to post
Share on other sites
Sounds like you want JSmooth. You can write a java app as normal and package it up in jars. Then you use jsmooth to generate a native windows exe which launches your java app in a nice easy double click.

I use it for windows builds and it works great. For non windows platforms I just distribute a self executing jar (or use Java Webstart) and it doesn't need any code changes at all. [grin]

Share this post


Link to post
Share on other sites
It should also be pointed out that both C++ and OpenGL are multiplatform compatible. You just have to compile it for each platform, but the source code itself can be kept platform independent relatively painlessly by using a library to wrap system calls (such as SDL, Allegro, wxWidgets or Qt).

But if Java suffices for your needs, then by all means, go for it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hnefi
It should also be pointed out that both C++ and OpenGL are multiplatform compatible. You just have to compile it for each platform, but the source code itself can be kept platform independent relatively painlessly by using a library to wrap system calls (such as SDL, Allegro, wxWidgets or Qt).

But if Java suffices for your needs, then by all means, go for it.


I am going down the 3d route. Im not sure how much SDL goes into 3d???
I've been doing some of the lazy foo tutorials, its been interesting.

Share this post


Link to post
Share on other sites
Quote:
Original post by agm_ultimatex
I know c++ and opengl are quite powerful, and reasonably quick, however I also cannot ignore the fact that java is available to all OS'.
Any Java you use is, ultimately, going to have to utilize native libraries for the graphics, etc. Basically, you will have exactly the same dependencies using LWJGL or JOGL that you have with OpenGL. It will be no more cross-platform that C++ and OpenGL (which are both perfectly cross-platform).

Share this post


Link to post
Share on other sites
Quote:
Original post by agm_ultimatex
I am going down the 3d route. Im not sure how much SDL goes into 3d???
I've been doing some of the lazy foo tutorials, its been interesting.

Since SDL lets you interface directly with OpenGL, anything that can be done in OpenGL can be done in SDL. You don't use SDL's graphics libray - you use OpenGL instead. There are tutorials of how to set up an OpenGL window in SDL on SDL's webpage. It's very easy.

Share this post


Link to post
Share on other sites
Quote:
Original post by smitty1276Any Java you use is, ultimately, going to have to utilize native libraries for the graphics, etc. Basically, you will have exactly the same dependencies using LWJGL or JOGL that you have with OpenGL. It will be no more cross-platform that C++ and OpenGL (which are both perfectly cross-platform).


But there's no need to compile the JOGL or LWJGL native binaries for each platform unless you need to modify the source, which is rare indeed. They all come precompiled and ready to go. And when using Java Webstart, you don't even need to bundle the JOGL or LWJGL files with the app or maintain the downloads yourself. They can be pulled from their respective websites automatically and updated in the same way without you ever needing to bother with it. And since the Java source for your app will not be compiled for each platform, there's no platform-specific code to maintain. I think that does score a bit higher for Java in the cross-platform category.

I'm not trying to argue, just pointing out some conveniences in the maintenance and distribution of cross-platform Java apps these days. Distribution used to be my biggest gripe with Java, but it's much, much better now. At any rate, the need to maintain a cross-platform code base is only one of the many issues that need to be considered and probably shouldn't be the deciding factor.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this