All my doubts about jME

HamsterofDeath said:

no vm can eliminate object creation in loops and allocate the object's members used inside the loop on the stack outside the loop and recycle them. i can.

thats a job that is done by clever compilers

If you want to do a lot of direct byte manipulation C++ is faster anyway. If you want to optimize certain calculations using the latest techniques the VM will probably take a year or two to catch up with you. If you think you have enough time or money to spend on doing these kind of optimizations, and you think performance is a real must, I'd recommend going with C++. Though some older game developers might tell you C++ is just too much overhead compared to C and you should go with C, and then someone will tell you that you're better of with assembly.



However, that would suggest I'm talking to someone with several-million-dollars in their pockets, and several-more-million-dollars-of-investment behind them.



More realistically speaking we're dealing with 2 other types of people here. Either hobbiests (such as myself), they should just pick the language they are best at (since you'll be the most productive with that), or want to be better at (since that's how you'll learn the most). Or people on a limited budget. These could be everything from amateur gamedevelopers (who's budget is time) to indy developers (who typically have to create something (either a demo or a finished product) with limited means) or big(ger) companies with a big(ger) bag of money who are looking to see how they can get more value out for their money.



I personally believe that for by far the most medium to large scale software project you'll get more done in less time if you use Java instead of C++. Due to the improvments to the language, the better tools available, and the quality of the libraries, I think with Java you'll get a faster, more stable and more maintainable product for the same amount of time or money invested.



Game developent is a very specific case though, I think it's especially important here to look at your own situation… If you have an office full of C++ programmers who can crank out inner-loop SSE4 optimized in their sleep, or if you have access to all kinds of great C++ middleware that is just right for the kind of game you want to make, then I'd think long and hard before setteling on Java.



Also, it's not a black and white situation. C++, C and asm are never more than a JNI call away, and most crucial data in jME (the geometry) is stored as native ByteBuffers, so that it is easily reachable from outside of Java.

so many things are better to optimize on algorithm level anyways, and with java you have more time to explore those :wink:

MrCoder said:

so many things are better to optimize on algorithm level anyways, and with java you have more time to explore those ;)

Well said!

I am working on the other side of 3D apps.

We are using jmonkey for workflow simulations.

For us it was never a question if we would use java as java is extremly powerful in  all business related areas (database connectivity, remoting, UI frameworks).

Speed isn't an issue for us since JDK 1.4 and things are getting better with every release.

JMonkey does an awesome job on the technology and algorithm side. I am not worrying about JNI as it is a relatively thin layer.

The most important thing for me is that we could cut down development time by a lot as there are a lot good libraries available and the whole java opensource world is just exploding (apache commons anyone  ;)).

I know that C/C++ will be ahead of java for a few years and java might never reach that point.

The thing that makes C/C++ faster than Java is mostly the fact that people are doing inline-assembly stuff or things that are verrrry close to the underlying hardware platform.