If you ever wanted a reason to use a modern langauge...

My astonishment was actually how long Java has been viable as a games programming language (as many posters here have already said) and how few game development teams had picked it up given how high time pressure in game development is meant to be and how much more complicated PC games in particular are becoming.

However, I was hoping to get reasons why Java wasn’t being picked up (why it wasn’t viable) since having used it for games development for a few years and for other applications for a lot longer I still can’t see and reasons other than a stigma associated with the language.

Let the troll-fest continue!

Kev

Just my two cents.

The whole argument that someone should move to a “modern language” just because it’s modern and has theoretical productivity improvement sounds so much like the Ruby madness going around the web applications side, don’t you think? It’s equally irrational.

If I were a C++ developer (I work with Java BTW) I’d think the same way I think about the the Ruby zealots.

Which makes me to believe that Java supporters are susceptible to such marketing talk more than other kinds of professionals. They MUST jump to the latest bandwagon, just because it’s SUPPOSED to be so. It’s change for the sake of change (things always change, isn’t it? So there MUST be a change, in my favor of course) .

I think Java game programmers should work in producing hits and games that not only show the power of the platform and gain of productivity but also adds something to the current business model. I heard the other day that some rock bands are just self publishing their works on the internet, with no involvement of the recording labels whasoever, and getting actually known and successful! :slight_smile: I mean, isn’t it a clue of what to do, go “internet”?

Second, the concept of Java not suitable for “demanding desktop applications” doesn’t meet the reality. Java is not a niche language, it’s widely used. It happens that most people associate “desktop applications” with IE, Word, Excel and Doom, so if they are not written in Java it means Java is not there. It couldn’t be more wrong.

Graphics performance has been rather slower to improve than computational performance. Especially if you consider the basic Java API (AWT, Java2D, Swing) as opposed to extensions allowing access to OpenGL.

Otherwise there has been a lot of unjustified performance stigma.

I wonder why people use C++ instead of assembler because assembler is way faster than C++. Having programmed in assembler for time than i wished for i don’t find it that hard and i can optimize a program to be of minimal size and about 10%-50% faster than whatever modern C++ compiler can do. There are a lot of clever assembler tricks that compilers don’t use and are not smart enough to detect take advantage from. This includes all kind of trivial things like using flags, weird registers and cpu behavior to optimize the code to more advanced tricks like manipulating code dynamically and generate your own code in realtime. Something that the jvm JIT is suposed to do after a warmup period while it collects profile data but it’s probably not yet smart enough to do it right.

Ask a C++ programmer why he programs i C++ when hand optimized assembler code is faster and you get a load of different misinformed answers. The different is not significant when it fact it is in certain circunstances. Thats why C++ compilers have inline assemblers. A C++ compiler can do all optimizations a assembler coder can do and better. Only if it is a bad assembler coder.

My point is that being able to hire people that can code without needing to pay much for their formation and having a compiler that is smart enough to optimize the code well are very important factors. Java facilitates the process of integration by allowing java programs to run clean in many different platforms and it allows the JIT to have “smarter” code optimizations by using a jvm. When people tried to make compiler optimization process work better and smarter they ended up creating their own vms just to facilitate the optimization process. This is not something people question it’s a natural evolution step. Even M$ is switching to C# with their own jvm. At the end C++ will disapear and will be replaced by lower level C and assembler code.

The benchmarks made by the C++ side are also filled with misinformation and these guys have been clever with this, taking advantage of the minimal difference in performance between C++ and Java. Whenever someone makes a Java benchmark program a C++ progammer comes up and does a similar benchmark that runs faster. Because he knows the benchmark and knows the platform where it will run. But ask a C++ programmer do a benchmark that runs with minimal modifications in different OSs and different hardware configurations and you won’t see the big advantage C++ programmers claim.

We’ve been able to say that, on the average, Java meets C++ speed for almost 6 years. Chris Rijk showed this long ago. I suggest you search the web for his name and tests.

Edit: ive even done the google work for you in the next message

They key is what you test and how. On real world apps, on the average, we are seeing equivalent speed. Some tasks C is faster at, some tasks Java kicks C’s butt and has for quite awhile. In general, when faced with appropriate algorthims for the languages strengths for all itnents and purposes they perfrom euqally and have for a long time.

And frankly Im tired of this troll. You can lead a horse to water but you cannot make him think.

So as far as Im concrned… plonk

For the google challenged:

http://www.aceshardware.com/Spades/read.php?article_id=153

This was almost 6 years ago. Do the math.

I suppose i should be greatful in that this has inspired my adding something to the FAQ. I didnt put a discussion of Chris’s benchmarks in originally because honestly I thought noone was that behind the times.

Now that its there my last comment is RTFF.

Slightly OT, and I realise this thread exists as a troll magnet, but this comment got right on my tits:

[quote]The whole argument that someone should move to a “modern language” just because it’s modern and has theoretical productivity improvement sounds so much like the Ruby madness going around the web applications side, don’t you think? It’s equally irrational.
[/quote]
Are you a web application developer and have you developed an application in Ruby /Rails? If not sit down, take a deep breath and pour yourself a lovely hot cup of stfu. The Ruby/Rails combination is by far the smartest development platform I have used in six years of web programming. It’s not perfect and there is a learning curve both for the language and the platform, but to dismiss the talk about it as irrational is entirely mistaken. Unlike “Web 2.0” exponents and thier “we’re so clever that we’re going to call DHTML “AJAX” and make like it’s something big and new” approach there is a kernel of undeniable excellence to the Ruby hype.

Hey no need to get pissed with some poor lost souls. ;D They are only trying to get someone to beat their misconceptions and learn something with some hard facts. That was getting obvious when they constantly avoided backing up their arguments with proof.

I think that explains the subject. If you tell some C++ programmer about the memory management part he will argue that he can build a custom memory management system that can beat the jvm. The funny thing is that he will do that by using a technique similar to garbage collection. That is create a memory poll and manage memory allocation himself using what knowledge he has of the benchmark to get an advantage and he has to be a skilled programmer to do that. C++ may shine in all kinds of micro-benchs but for real games it’s becoming a pain with game studios only making games for one plaform and sometimes two (usually xbox or ps besides the pc) to minimize the effort of having multiple teams with the PC or the console version ending up screwed most of the time.

I didn’t say Ruby on Rails was irrational, I said that the Ruby hype is irrational. You can have good frameworks in any language, and that doesn’t mean the whole platform is the thing closest to perfection. BTW Ruby is older than Java itself, isn’t it curious that some “hype” can influentiate people’s opinions all of a sudden?

BTW, are you a web developer and have you used any decent tool for developing software? At least the software I work on is more than a frontend to a database so the “recipe” demonstration won’t impress me that much.

Every so often BBB coems up with something that I just can’t argue with.

Amen brother. And crap is crap in ANY language.

Not sure he wanted the facts though, since anyone who actually gave them to him is apparently a “zelot” or “childish”…

SIc Semper Trolls

I can see your frustration but it isn’t my fault. Blame your weak argumentation. Are you sure you could talk a horse into going to water? If he won’t you just declare him a troll right ;D You’re quite a troll yourself by the way. One that is taking himself far too seriously.

I’m playing the devil’s advocate because I like Java. I think now and with version 6 is the time when Java finally is up to it on the desktop. But you have to convince the C++ people so I’ve put myself in their place to collect arguments.

I hereby declare Jeff winner of The Strongest pro-Java Argument Contest: You’re a troll if you don’t use Java! ;D

It’s because C++ is a porttable high-level multi-paradigm language derived from C with a performance that’s comparable to assembly for a substantial size application.

It’s because C++ is a perfectly good alternative. One argument for using Java is that it’s more productive, but is it really?

Just one example to be specific. In Java there’s a tendency to not use classes (and even arrays) in time constrained code because object creation is expensive. You’re basically reverting to use Java as you would C. There are many aspects of productivity but this is one: C++ lets you keep up your data abstractions in lower level code without performance penalties to a much larger extent than Java.

To some extent that’s true, but rarely so, and even when it is true, a simple bit of abstraction in the design will help you tune it out. Instead of directly coding to an array of Vector3fs one would instead have the abstraction ArrayOfVector3fs; if it turned out the overhead of having 1m Vector3fs floating was a performance hit upon profiling you could easily implement ArrayOfVector3fs to use 3 big float arrays instead. As an example. The point being you’d design it right first, profile it if there was a problem, then tune it easily.

The productivity benefits are pretty much concrete and having been doing this stuff for more years than I care to count the difference I’ve experienced with Java is quite profound. In fact I don’t think there is anyone worth listening to on TEH INTARWEB who would disagree with that, apart from C++ programmers, and as they’re programmers and not managers they are probably not the people to be asking. I’m a manager now and I’ll tell you this for free: a team of Java programmers runs rings around a team of C++ programmers. The arguments about performance and productivity are just completely irrelevant. The problem now is about deployment (lack of fast VM and x-plat graphics API on any console), skills (lack of available talent - shouldn’t be too long though), and middleware (no JRenderware etc.).

Cas :slight_smile:

That suggestion may save memory space but if would almost certainly degrade time performance. The reason is that you will now have to create a Vector3f object for every access to ArrayOfVector3fs.

You will almost certainly have to give up the Vector3f abstraction at a substantial part of the code to improve performance. I haven’t looked at any of the scenegraph implementations available but I would be surprised if they haven’t done that.

Oh no you wouldn’t :slight_smile: And this is where the design part comes in, but this is getting a bit specific for this thread.

Cas :slight_smile:

Well explain your design. You don’t have to be specific.

As I got it you said that instead of having an array of Vector3f objects you abstract that to a class ArrayOfVector3fs holding the array. What do you get out of that class? Still Vector3f objects I presume. You may then later change the implementation of ArrayOfVector3fs to hold three arrays of floats. But that doesn’t influence the ArrayOfVector3fs’s public interface. It still has to deliver Vector3f objects. The difference is that now they have to be produced on demand from individual floats held in arrays.

That was your proposed design and it reduces memory requirements but degrades time performance. Or did you have something else in mind?

For example did you think of moving code from outside of ArrayOfVector3fs working on Vector3f objects to inside of ArrayOfVector3fs now instead working on vectors of float? Then your design is nothing more than the administration of a lowering of the abtstraction level. And this is exactly what I said. In Java you tend to have to do this for efficiency reasons. In C++ you don’t.

I can give you a hint (heading out the door) - data can be proxied - objects can be resused.

You mean object pooling? That’s generally considered a bad idea with todays fast GC. Object pooling just gets in the way.

And this is still just a fix of the fundamental problem. Object creation in Java is expensive so you tend to lower the abstraction level in time challanged code more than you would in C++. So C++ allows you to program at a higher abstraction level in this type of code. This is generally considered good for programmer productivity.