java versus c++ for a 3d game
hello, this professor at a college near me said to learn java for my game program even though i've read that C++ is the standard for games. anyone know if there's any reason to learn java? or if 3d games are going to be programmed in java? he said that c++ is not necessarily faster than java.
Personally, I have little experience with programming in Java. From what I hear from other, more experienced members of GD, Java might be a little slower because it runs on a virual machine, but in the end, the limiting factor will be the way you program it, and any slow-down from the java virtual machine won't matter.
I haven't heard of a game being programmed in java, but, again, I have little experience with these things.
I did I search of devmaster.net's database of engines. I searched for 'Java' as the programming language and came up with 14 engines. On the other hand, I then searched for 'C/C++' as the language and came up with 205 engines.
I haven't heard of a game being programmed in java, but, again, I have little experience with these things.
I did I search of devmaster.net's database of engines. I searched for 'Java' as the programming language and came up with 14 engines. On the other hand, I then searched for 'C/C++' as the language and came up with 205 engines.
Uhhg. I hate professors like that.
And lets not get into the realm of performance discussion; I think its irrelevent.
While yes, you can program games in Java, since most development is in C++ there are many more resources (documentation, libraries, etc) which deal specifically with C++ rather than Java. I'd personally recommend using C++, simply because programming in Java makes me want to drink a bottle of lye while committing seppuku as I'm being drawn and quartered after having been set on fire while being stretched on the rack with bamboo up my nails and pinecones up my butt.
If you do go the Java route, you'll probably want to take a look at JOGL (Java bindings for OpenGL). AFAIK, its the best Java graphical API that I've seen so far. There's SDL bindings somewhere too, but I've heard they're pretty crap.
But yeah. Yuck, Java.
And lets not get into the realm of performance discussion; I think its irrelevent.
While yes, you can program games in Java, since most development is in C++ there are many more resources (documentation, libraries, etc) which deal specifically with C++ rather than Java. I'd personally recommend using C++, simply because programming in Java makes me want to drink a bottle of lye while committing seppuku as I'm being drawn and quartered after having been set on fire while being stretched on the rack with bamboo up my nails and pinecones up my butt.
If you do go the Java route, you'll probably want to take a look at JOGL (Java bindings for OpenGL). AFAIK, its the best Java graphical API that I've seen so far. There's SDL bindings somewhere too, but I've heard they're pretty crap.
But yeah. Yuck, Java.
You can make a 3D game in almost any language. C++, Java, VB, Python, etc are all perfctly valid. However, all of these languages will have advantages and disadvantages. C++ has been around a while and most commercial games are programmed in C++. That being said, java is still an excellent choice. Java is slightly slower than C++, but is also easier to use. There are tons of libraries, engines, and resources availablke for both languages.
Which language do you have more experience with? Programming a 3D game is going to require a strong knowledge of your language, so I would pick the one you are most familiar with.
Which language do you have more experience with? Programming a 3D game is going to require a strong knowledge of your language, so I would pick the one you are most familiar with.
i have experience with C++, i have never programmed in java before. maybe he said java because id be more marketable? who knows, im not sure why he said java, but he said that the students basically all learn java.
Well, I can't speak for anyone in particular, but at my uni they teach all of the introduction to programming courses in Java for some reason. I guess Java has become the "introductory" language, probably because its "safe". Meh.
What I've seen happen to a lot of people is they become over pragmatic about the language and try to force its use in every situation. Need to write toaster firmware? WHY NOT USE JAVA!
The fact of the matter is, though, that most of the infrastructure for game development is in the realm of C/C++. This is due to the history of games - for the past decade most of the development has been in C/C++, so that's where all the resources are.
I'd recommend to just stick to whatever language you're most comfortable with. One problem with game development is that it takes a massive knowledge base - not only how to program, but many other techniques (engine design, graphics, blah) which can be difficult to master if you're still just learning the in's and out's of a language.
But yeah, follow your heart? Something like that. I need to stop watching Disney movies...
What I've seen happen to a lot of people is they become over pragmatic about the language and try to force its use in every situation. Need to write toaster firmware? WHY NOT USE JAVA!
The fact of the matter is, though, that most of the infrastructure for game development is in the realm of C/C++. This is due to the history of games - for the past decade most of the development has been in C/C++, so that's where all the resources are.
I'd recommend to just stick to whatever language you're most comfortable with. One problem with game development is that it takes a massive knowledge base - not only how to program, but many other techniques (engine design, graphics, blah) which can be difficult to master if you're still just learning the in's and out's of a language.
But yeah, follow your heart? Something like that. I need to stop watching Disney movies...
Quote:Original post by MushuWhat I've seen happen to a lot of people is they become over pragmatic about the language and try to force its use in every situation. Need to write toaster firmware? WHY NOT USE JAVA!
Actually, that's exactly the sort of thing Java was originally developed for.
I might just be a weird person(probably) but I find C++ easier than Java. I've used both quite a bit also.
Quote:Original post by Surg
I might just be a weird person(probably) but I find C++ easier than Java. I've used both quite a bit also.
Obviously, if you have more experience with C++, then that is what you will be more comfortable with. With my day job, I have focused on being a Java developer for the past 6 years, so I happen to like Java more. (Although, I did create a simple 2D asteroids game using directx and MS Visual C++ six years ago - but I would never by choice program in C++ again. Although using the new APIs like the SDL library seems like it would make things easier than they were then.) For Java developers who are interested in 3D programming, I would recommend going to www.jmonkeyengine.com. It is one of the best Java 3D scene graph engines available. It is easy to learn and use. I think most people would be surprised what Java can do (compared to C++ or other languages). What matters to me is how fast I can prototype something, and develop it. So far, I am happy with the Java Monkey Engine. It seems to be just the right tool/engine to do this. ( In the same way, I also like Wings 3D, compared to other 3d modelers - seems to be very easy to learn and efficient as a modeling tool - but that is off topic)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement