princec
|
 |
«
Reply #60 - Posted
2006-02-11 17:15:07 » |
|
Interesting but Tim is way off on various points which I can't be bothered to go in to  If he wanted to see a proper productive language he need really go no further than BlitzMax. BTW .uj, about 4 years ago I decided to bet the farm on Java and I'm still in business! The very simple reasons for mainstream software houses sticking with C++ is consoles and experience and of course a total failure of Sun to push it. Give it 5 years and a Sony console running a fast JVM and you might see some change. Cas 
|
|
|
|
.uj
|
 |
«
Reply #61 - Posted
2006-02-11 17:32:22 » |
|
One of the inventors of C said it himself "First make it work, then make it fast."
You're confusing the view of the programmer with the view of the user. When did you last see "this product works!" draw hordes of costumers to a new product? Speed is different. That factor alone is behind most of the qualities that make a product "cool". Don't tell me you update your computer to make it slower?
|
|
|
|
|
Vorax
Senior Member    Projects: 1
System shutting down in 5..4..3...
|
 |
«
Reply #62 - Posted
2006-02-11 18:11:51 » |
|
One of the inventors of C said it himself "First make it work, then make it fast."
You're confusing the view of the programmer with the view of the user. When did you last see "this product works!" draw hordes of costumers to a new product? Speed is different. That factor alone is behind most of the qualities that make a product "cool". Don't tell me you update your computer to make it slower? If your your using hardware acceleration 75-95% of the work is being done on the card, speed of the language being used becomes far less important. The performance gains just aren't there to be had and the net result is you just increase development time and complexity for single digit FPS improvements. Example: You could have Doom 3 written entirely in assembly, running on a P4 3Ghz CPU, but if the graphics card sucks it won't be playable. Conversley, you can (and do) have Doom 3 running on a P3 733Mhz processor with a custom nVidia Geoforce 4ti (an XBox) and getting 30-60FPS. With hardware acceleration, the language being used only has to be "fast enough" - Java is fast enough.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
.uj
|
 |
«
Reply #63 - Posted
2006-02-11 19:52:39 » |
|
With hardware acceleration, the language being used only has to be "fast enough" - Java is fast enough.
Is there ever really a "fast enough". The "slack" the general processor experiences because processing is delegated to the graphics subsystem doesn't necessarily has to be consumed by the programming language itself. It can also be used to build a more complex (= more fun) game. And in other application areas like for example scientific simulations, say weather forecasting, there will never be any "slack". If one language consumes 15% more than some other language it takes away one day of simulation a week. I'll never buy the argument that it's okay for Java to be slower than C++. Basically it should be faster. This has been the promise ever since the early hype days. Maybe it finally is after 10 years. In that case the time has come for Sun to publish unquestionable proof.
|
|
|
|
|
Vorax
Senior Member    Projects: 1
System shutting down in 5..4..3...
|
 |
«
Reply #64 - Posted
2006-02-11 20:04:28 » |
|
With hardware acceleration, the language being used only has to be "fast enough" - Java is fast enough.
Is there ever really a "fast enough". Yes - Back in the day, we used to say the same thing about C in comparison to assembly. Old school assembly argued you couldn't use C to write games because it was to slow.
|
|
|
|
oNyx
|
 |
«
Reply #65 - Posted
2006-02-11 20:50:07 » |
|
With hardware acceleration, the language being used only has to be "fast enough" - Java is fast enough.
Is there ever really a "fast enough". The "slack" the general processor experiences because processing is delegated to the graphics subsystem doesn't necessarily has to be consumed by the programming language itself. It can also be used to build a more complex (= more fun) game. [...] Unfortunately time is a limited resource. You sorta forgot that in your statement... well, duh... that can happen. Programming the same thing in C/C++ already takes 3-5 times longer. Porting it to other platforms such as Mac also takes some time and now you also want to use that tiny speed advantage (which doesnt necessarily exist) to make the game even better with more processing power... mmh  A game where you spend all those resources on content and level design will be usually more fun.
|
|
|
|
princec
|
 |
«
Reply #66 - Posted
2006-02-11 21:21:43 » |
|
more complex (= more fun) game I know you're just playing devil's advocate but never was a more untrue statement said on these boards  But as for Sun's hype about the relative speeds of Java and C++, you're spot on, it shouldn't be slower these days, though it is most of the time. I always used to chuckle when a Java fanatic spouted the marketing bullshit to a C freak and included the words "theoretically" and "potentially" somewhere in the spiel, which the C freak always latched on to immediately... Cas 
|
|
|
|
Jeff
|
 |
«
Reply #67 - Posted
2006-02-11 21:36:17 » |
|
Someone once asked me what you call a programmer who refuses to change his tools.
I answered "unemployed."
Changing tools is not an end in itself. What's important is to use the right tool for the job. Agreed 100%. But if you refuse to ever change tools, you cannot be using the right tool for the job. Up and until say 2 years ago the right tool for graphics intensive games has been C++. It's not about high programmer productivity. It's not about good internal design. It's about raw speed and low-level control.
Okay there I disagree. Having been a game programmer in the industy. Its about MONEY. Money has two factors-- cost to produce the product v. sales of the product.. Sales is driven by product performance, cost is driven by productivity or lack thereof. There probably isn't a single company who bet on Java more than two years ago that's still in business. That's were you find your unemployed programmer.
Existance proofs defeat this statement: Legacy Interactive, Mind Control Software, Three Rings Design, Jagex Design, Cyberstep... In fact all of those companies have had hit and award winning games. My replies have been regarding the OP's opinion that users of C++ instead of "modern" languages like Java are living in the past. I find that a strange proposition considering that Java hasn't really been a viable alternative for the most of its 10 years of existance. In spite of its alleged modernity it just hasn't cut.
See above. The big questions is "viable for what." There have been pure Java games that were highly financially successful almost since the start of Java. (POGO games for instance.) There have been quite a few action games written with custom JNI layers to talk to OpenGL or an existing low level graphics engine. All thats happened recently is that some reasonably standard pre-built solutions for that JNI has emerged, and about 5 years ago the VM more or less caught up with C for raw speed. When will we see the first JVM being written in something else than C++ (for non-experimental purposes)? I could bet you anything that C++ will be the right tool for that job for many years to come.
This is a nonsense question. When will we see a C compiler that doesn't have an ASM bootstrap module? Never. Thats the nature of compiler/systems design. You bootstrap up on the back of what is already there. MOST of the Sun JVM is now in Java and has been for awhile. Really Cas, on the rest I put it down to difference of POV and opinion but YOU of all people should know better then to repeat this ancient nonsense cry of the c-bigot. Edit: I shoudl have known better. That wasn't Cas talking like an ignorant slashdotter. My apologies to Cas.
|
|
|
|
princec
|
 |
«
Reply #68 - Posted
2006-02-12 00:11:25 » |
|
Er, I think you're talking to .uj there aren't you Jeff? UNless it's wrt. Java speed, and it's still not as fast as C++. But it's very nearly there. Roll on two-stage compilation and escape analysis. Cas 
|
|
|
|
Breakfast
|
 |
«
Reply #69 - Posted
2006-02-12 00:46:03 » |
|
Don't tell me you update your computer to make it slower? You don't use Windows, do you?
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Jeff
|
 |
«
Reply #70 - Posted
2006-02-12 01:53:23 » |
|
Er, I think you're talking to .uj there aren't you Jeff?
Oh your right. Sorry. Somehow i misread. That makes MUCH more sense. *You* always talk like a Java informed person. This noob on the other hand needs a lot of retraining of misconceptions and FUDded notions.
|
|
|
|
kaffiene
|
 |
«
Reply #71 - Posted
2006-02-12 10:07:32 » |
|
Er, I think you're talking to .uj there aren't you Jeff? UNless it's wrt. Java speed, and it's still not as fast as C++. But it's very nearly there. Roll on two-stage compilation and escape analysis. Cas  It will be interesting to see how the speed comparisons stack up with 1.6. I've found my Java code to be 85-95% of C++ speed back in Java 1.4 and better again with 1.5. I recently tried a 1.6 development build and it sped up my Java ray tracer by 20% over Java1.5. On the face of it, that suggests that Java must be getting reasonably similar to C++ (maybe sower in one or two spots, possibly faster here or there). The Java 5 benchmarks versus C++ looked reasonably good and it seems 1.6 is making big strides again. This is something that encourages me about java. When was the last time you saw C/C++ compilers making 20% speed increases per version? C/C++ is very mature and is not making great new strides, Java is getting seriously improved in speed with each new release.
|
|
|
|
|
.uj
|
 |
«
Reply #72 - Posted
2006-02-12 11:29:50 » |
|
*You* always talk like a Java informed person. This noob on the other hand needs a lot of retraining of misconceptions and FUDded notions.
I guess I'm "the noob".  I find the OP's astonishment over that not everybody immediately abandons C++ for the "modern" Java very strange indeed. Java has been as good as it is today only a fraction of its existance. During the rest of its time the road is littered with failed projects because Java just didn't cut it. Therefore in my view Java has a serious credibility problem it has yet to overcome. There's no reason what so ever to even consider Java for the next five years if you're happy with C++ today. Java may still be around but probably as a niche language for server applications rather than the language of choise for demanding desktop applications. If you like Java, as I do actually  , you may try it but at your own risk. The risk is somewhat offset by the fact that Java has the support of IBM and that Microsoft is promoting a similar technology. The fact that Sun is now in bed with Microsoft has also somewhat reduced the risk of adopting Java. So regardless of what starry-eyed evangelists like Jeff may tell you, you're more likely to lose your job if you bet on Java than if you don't. That's the lesson the history of Java teaches you.
|
|
|
|
|
princec
|
 |
«
Reply #73 - Posted
2006-02-12 12:01:01 » |
|
He does, er, have a point there... as a contingency I use Java in the day job though, which guarantees me a job for at least the next decade, and I can re-use my skills on the gaming front. We don't hire C++ programmers any more. Cas 
|
|
|
|
.uj
|
 |
«
Reply #74 - Posted
2006-02-12 12:13:23 » |
|
This is something that encourages me about java. When was the last time you saw C/C++ compilers making 20% speed increases per version? C/C++ is very mature and is not making great new strides, Java is getting seriously improved in speed with each new release.
I agree, but isn't it quite strange that we're still talking about Java's future speed? Will we ever be able to say that Java is as fast or even faster than C++ now. Even after 10 years of speed increases we're not there yet. At any given point during this long period of time have those who bought into the hype and bet on Java becoming as fast as C++ been disappointed. This is part of Java's huge credibility deficit.
|
|
|
|
|
.uj
|
 |
«
Reply #75 - Posted
2006-02-12 13:55:14 » |
|
Its about MONEY.
Money has two factors-- cost to produce the product v. sales of the product..
Sales is driven by product performance, cost is driven by productivity or lack thereof.
I see! You mean that by using Java the performance will suck but that doesn't matter because the product becomes so cheap one can afford to throw it away immediately? 
|
|
|
|
|
oNyx
|
 |
«
Reply #76 - Posted
2006-02-12 14:05:48 » |
|
>There's no reason what so ever to even consider Java for the next five years if you're happy with C++ today.
Productivity, xplatform and security.
>At any given point during this long period of time have those who bought into the hype and bet on Java >becoming as fast as C++ been disappointed.
Speed was never part of the hype. And how could it have been? There was no JIT at the beginning.
|
|
|
|
.uj
|
 |
«
Reply #77 - Posted
2006-02-12 14:40:58 » |
|
Speed was never part of the hype. And how could it have been? There was no JIT at the beginning.
Sun filed a JIT patent as early as 1996-05-20, http://www.freepatentsonline.com/6151703.htmlThe possibility of JIT compiling and that it would very soon allow Java to run faster than statically compiled languages such as C++ was very much part of the early Java hype.
|
|
|
|
|
blahblahblahh
|
 |
«
Reply #78 - Posted
2006-02-12 15:44:29 » |
|
I find the OP's astonishment over that not everybody immediately abandons C++ for the "modern" Java very strange indeed. Java has been as good as it is today only a fraction of its existance. During the rest of its time the road is littered with failed projects because Java just didn't cut it. Therefore in my view Java has a serious credibility problem it has yet to overcome.
Fair enough There's no reason what so ever to even consider Java for the next five years if you're happy with C++ today. Java may still be around but probably as a niche language for server applications rather than the language of choise for demanding desktop applications.
Yes, actually, there is: you're making money today with your current product, but if that product could be coerced into doing more than it does, you could make a lot more money. You've got a version 5 to go out next year, and you've chosen which 25 of the 500 possible features to include (so that it only takes 1 year to make, reather than 10). But...if a switch to java could let you make 45 of those features in the same time-frame, you've got a great reason to move to java. NB: the above was written s/java/[other language]/ - this is usually the main reason for switching language. People didnt switch to C++ for speed, they switched because they could do more in less time, so they could make more profit / put more competitors out of business / sell at a lower price but with same profit margin. So regardless of what starry-eyed evangelists like Jeff may tell you, you're more likely to lose your job if you bet on Java than if you don't. That's the lesson the history of Java teaches you.
Nah, no-one loses their job for betting on java: people lose their job for writing crap that they happened to chose to write in java. Incompetence is incompetence no matter what the platform  .
|
malloc will be first against the wall when the revolution comes...
|
|
|
Mark Thornton
|
 |
«
Reply #79 - Posted
2006-02-12 17:37:16 » |
|
Even after 10 years of speed increases we're not there yet. At any given point during this long period of time have those who bought into the hype and bet on Java becoming as fast as C++ been disappointed. This is part of Java's huge credibility deficit.
When I was first looking at using Java (> 5 years ago) I tested some of my own code and even then the speed difference between Java and C++ was modest on that code. Since then a greater variety of code now approaches C++ performance, and fewer coding tricks are required. Adding stuff like escape analysis may not speed up code which has been optimised by the programmer, but rather allow ordinary straight forward code to run as fast as that written by the performance specialist.
|
|
|
|
|
kevglass
|
 |
«
Reply #80 - Posted
2006-02-12 18:24:00 » |
|
I find the OP's astonishment over that not everybody immediately abandons C++ for the "modern" Java very strange indeed. Java has been as good as it is today only a fraction of its existance. During the rest of its time the road is littered with failed projects because Java just didn't cut it. Therefore in my view Java has a serious credibility problem it has yet to overcome.
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
|
|
|
|
thiagosc
Senior Newbie 
|
 |
«
Reply #81 - Posted
2006-02-12 19:15:27 » |
|
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!  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.
|
|
|
|
|
Mark Thornton
|
 |
«
Reply #82 - Posted
2006-02-12 19:18:50 » |
|
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.
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.
|
|
|
|
|
zingbat
|
 |
«
Reply #83 - Posted
2006-02-12 20:35:20 » |
|
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.
|
|
|
|
|
Jeff
|
 |
«
Reply #84 - Posted
2006-02-12 20:54:07 » |
|
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**
|
|
|
|
Jeff
|
 |
«
Reply #85 - Posted
2006-02-12 21:01:51 » |
|
For the google challenged: http://www.aceshardware.com/Spades/read.php?article_id=153This 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.
|
|
|
|
Breakfast
|
 |
«
Reply #86 - Posted
2006-02-12 21:42:05 » |
|
Slightly OT, and I realise this thread exists as a troll magnet, but this comment got right on my tits: 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. 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.
|
|
|
|
|
zingbat
|
 |
«
Reply #87 - Posted
2006-02-13 00:30:03 » |
|
Hey no need to get pissed with some poor lost souls.  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. Is Java Slow? No. Once upon a time, when Java was brand new, there were some real performance issues. Today however modern Desktop VMs have the equivalent of C/C++ performance. This was shown as early as 3 years ago in benchmarks done by a gentleman by the name of Chris Rijk, and things have only improved since Chris's benchmarks. Note however that I say "equivalent" not "the same as." Just as there are faster and slower idioms in C (for instance, sequential access of arrys by index is significantly slower then 'pointer walking') there are faster and slower idioms in Java. There are some things C/C++ is significantly faster at then Java, most noteably random (non-sequential) access into arrays. There are some things that Java is much faster at then C/C++, noteably allocation and deallocation of memory. This means that algorithyms that are optimal in C/C++ may be sub-optimal in Java, and vice versa. On the whole however, for any sigificantly complex problem, well written Java code averages out to about the same speed as a program that does the equivalent functions in well written C/C++. This was shown as far back as 2000 by some independant benchamrks by a man named Chris Rijk published on the very well respected site Tom's Hardware. You can find those here: http://www.aceshardware.com/Spades/read.php?article_id=153Since then Java has only continued to get faster. Thanks to .uj for pointing out that some people still need to be told about what was proved six years ago 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.
|
|
|
|
|
thiagosc
Senior Newbie 
|
 |
«
Reply #88 - Posted
2006-02-13 01:37:21 » |
|
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.
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.
|
|
|
|
|
Jeff
|
 |
«
Reply #89 - Posted
2006-02-13 02:19:33 » |
|
So regardless of what starry-eyed evangelists like Jeff may tell you, you're more likely to lose your job if you bet on Java than if you don't. That's the lesson the history of Java teaches you.
Nah, no-one loses their job for betting on java: people lose their job for writing crap that they happened to chose to write in java. Incompetence is incompetence no matter what the platform  . Every so often BBB coems up with something that I just can't argue with. Amen brother. And crap is crap in ANY language.
|
|
|
|
|