To blue-lightning:
I think we both agree that 100% pure Java is useless for commerical-class games and that some kind of JNI (or other native support) is needed.
And sure, a finely tuned and hand optimized C++ program can never be outrun by a Java program no matter how clever the Java compiler is.
As you can see in the article I actually propose that C++ are used for for all the parts where speed is absolutelty essential (and we need to "break the rules"). May point is that too many people are using C++ too many places where it is not needed.
There is no need to finely tune every single line of the control code of your game, because it not is run as often as, for instance, the graphics routines. If you break the rules with every line of code all over your program you are building yourself a "bug-bomb" that is completely unmaintainable. (Just look at all the bugged games apprearing every month)
I say: Use Java for those parts and you get the best of both worlds.
So in conclusion I think it is just as stupid to build a program in pure C++ as it is to build it in pure you. So to all the C++ programmers out there: Grow up and and learn how to save time!
Jacob Marner
[java] I am sick and tired of prejudism!
Surely it''s ownly a matter of time until someone comes up with a much faster Java virtual machine though. I''m sure that the gap between Java and C++ will get smaller, and less significant when we have faster processors.
I prefer to use Java becuase it just feels "tidier" and more OO.
Neil
I prefer to use Java becuase it just feels "tidier" and more OO.
Neil
I am sure they will make faster java virtual machines but i dont think it will ever reach the speeds of c or c++.....why ?
because c++ generates machine code when run through the compiler that gives instructions to the cpu.....java produces a different kind of code when compiled......it produces code that is run through the virtual machine, translated into the machine code for that operating system, then that translated code gives instructions to the cpu.....or at least this is how I understand how java works (I am not too familiar with java, YET)....
so there is always that buffer layer there between a java produced executable (i dont think java calls there''s executables but since I dont remember what they call it this will suffice) and the cpu whereas c++ executable gives instructoins to the cpu without going through that buffered layer
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
because c++ generates machine code when run through the compiler that gives instructions to the cpu.....java produces a different kind of code when compiled......it produces code that is run through the virtual machine, translated into the machine code for that operating system, then that translated code gives instructions to the cpu.....or at least this is how I understand how java works (I am not too familiar with java, YET)....
so there is always that buffer layer there between a java produced executable (i dont think java calls there''s executables but since I dont remember what they call it this will suffice) and the cpu whereas c++ executable gives instructoins to the cpu without going through that buffered layer
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
But doesn''t virtual machine convert byte code machine code once, before everything else, not all the time, so it would make sense that once there could be VMs which could be able to create as fast as C++ code.
Aah Quest for the holy grail
"NI"
-A Knight who says NI
Aah Quest for the holy grail
"NI"
-A Knight who says NI
quote: Original post by ncsu121978
I am sure they will make faster java virtual machines but i dont think it will ever reach the speeds of c or c++.....why ?
because c++ generates machine code when run through the compiler that gives instructions to the cpu.....java produces a different kind of code when compiled......it produces code that is run through the virtual machine, translated into the machine code for that operating system, then that translated code gives instructions to the cpu.....or at least this is how I understand how java works (I am not too familiar with java, YET)....
Well, then you honestly shouldn''t say what you don''t know. Java does indeed have a native compiler. However, using it, like in C++ causes the distributed file to only be "runnable" on one platform (the compiled one). Thus, Java is portable because of the JVM, not limited by it.
"Five passengers set sail that day, for a three hour tour, a three hour tour...."
ncsu121978 - FYI, there are static native compilers that generate 100% machine code for a target machine at compile-time, JRE''s with JIT compilers that generate a good deal of local machine code at load-time, and Sun''s HotSpot which generates machine code dynamically in response to bytecode execution frequency during run-time.
This ain''t your pappy''s bytecode interpreted language anymore.
Personally, I think if your posting in the Java Development section you think one of three things:
A) Good games can be written in Java.
B) Statement A is impossible, so you''re just trolling. If reading this one pissed you off, why are you still here? Didn''t your momma tell you to stay away from those strange Java programmers? Get out of here before I open up a can of Shaq-Fu on your pesemistic rear-end.
C) Neither. I hope it''s because your really cautious about adopting new technologies and not because your emotionally disturbed and unable to commit. Maybe your really the guy from statement B, come back for another butt whoopin''. That''s fine, I got the rest of the Shaq-Fu six-pack right here.(click,pkkksssss....)
Seriously, Shouldn''t everyone here should agree with felonius on some level? It''s not about the language, it''s about the final product. I''ve coded games in ASM, C++, Java, COBOL, Pascal,Basic, and the only language I thought sucked for games was COBOL, but damn it, no language should be excluded without a personal attempt!
ManaSink
Check out what I found in the EULA for the platform SDK:
quote: 8. NOTE ON JAVA SUPPORT. THE SOFTWARE PRODUCT CONTAINS SUPPORT FOR PROGRAMS WRITTEN IN JAVA. JAVA TECHNOLOGY IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE OR RESALE AS ONLINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATIONS SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF JAVA TECHNOLOGY COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE. Sun Microsystems, Inc. has contractually obligated Microsoft to make this disclaimer.
Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat disgusting stuff, they are mentally unstable and are absolutely brilliant. (k10k)
Its agreement #12 in my EULA.
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
I found something like that in one example althought it said you can''t use it in navigation systems or nuclear power plant.
I knew that hippies weren''t useless. They created JAVA!
Time comes, time goes and I only am.
I knew that hippies weren''t useless. They created JAVA!
Time comes, time goes and I only am.
I got a kick out of that warning too. But come on, if your language is only 5 years old with updates coming all the time, it can''t be trusted with people''s lives. Obviously code that entrusts millions of peoples lives(like nukes) needs much more extenstsive testing then a game applet on the web.
Yeah felonius what''s with the resistance towards Java? I think C++ programmers would be happy that the progressive language would have C++ syntax. I sure was. For blue lightning''s pointer problem, I used to do freaky things like this in C++ too, but now in Java see no need to do this, and I am doing much crazier stuff. It''s just once you get used to the object oriented process of designing a java program and the useful features of the language you don''t need to get so complicated to do simple things. Anything''s possible with java. Higher level programming is where it''s at. In a couple of years when machines can handle anything who wants to be stuck coding low level stuff thats been done a million times before? And with so many OS''s and platforms you don''t want to limit yourself to just one OS. Think about this, in a couple years when the average computer can do millions of polys per sec in Java. C++ might do more but once you get to a certain point you have the power to do a awesome game if you have a good idea.
Personally I can''t wait since I hate optimization. I''d rather spend my time writing readable cross-platform code that has more features.
Yeah felonius what''s with the resistance towards Java? I think C++ programmers would be happy that the progressive language would have C++ syntax. I sure was. For blue lightning''s pointer problem, I used to do freaky things like this in C++ too, but now in Java see no need to do this, and I am doing much crazier stuff. It''s just once you get used to the object oriented process of designing a java program and the useful features of the language you don''t need to get so complicated to do simple things. Anything''s possible with java. Higher level programming is where it''s at. In a couple of years when machines can handle anything who wants to be stuck coding low level stuff thats been done a million times before? And with so many OS''s and platforms you don''t want to limit yourself to just one OS. Think about this, in a couple years when the average computer can do millions of polys per sec in Java. C++ might do more but once you get to a certain point you have the power to do a awesome game if you have a good idea.
Personally I can''t wait since I hate optimization. I''d rather spend my time writing readable cross-platform code that has more features.
author of the Helping Phriendly Book
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement