benc1213
Senior Newbie 
|
 |
«
Posted
2011-04-05 23:04:30 » |
|
I know it is kind of stupid to ask this on a java gaming forum but is java a good language to learn to make games? Is it the best way to go? Or at least to most supported? I ask this because I have noticed a lot of the popular game engines such as the source engine and the unreal engine are written in c++.
|
|
|
|
|
princec
|
 |
«
Reply #1 - Posted
2011-04-05 23:27:55 » |
|
Works for me. Cas 
|
|
|
|
pitbuller
|
 |
«
Reply #2 - Posted
2011-04-06 00:07:37 » |
|
Java is very easy to learn but there is allways that performance handicap. If you want to do next big game engine pick c++. But be realistic, what is your goal? If you wanna just do small game to web then java is way to go. If you wanna do something bigger java is still good choise.
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Sinuath
|
 |
«
Reply #3 - Posted
2011-04-06 00:23:40 » |
|
See i have a question about that, eh sick and it's hard to keep my thoughts straight so please bare(?) with me..
i was hoping to make small java games in the future, in the form of applets and maybe expand to phones after that or something :/ well i have a rough idea, but are applets really the way to go? I keep hearing about something called webstart? if i got that right. I'd imagine people would like applets more since it doesn't involve downloading something.
|
|
|
|
lhkbob
|
 |
«
Reply #4 - Posted
2011-04-06 00:37:33 » |
|
Java is very easy to learn but there is allways that performance handicap. If you want to do next big game engine pick c++. But be realistic, what is your goal? If you wanna just do small game to web then java is way to go. If you wanna do something bigger java is still good choise.
Aaggh, people keep saying these things but it's just old information. My port of the bullet physics engine is faster than Bullet and mine is in Java while Bullet is in C++. The algorithms and structures makes so much more difference on performance than language. Sure there's a bit of extra JNI overhead when doing OpenGL work in Java, but the graphics card is already doing 90% of the work anyway so language choice won't make any noticeable difference, especially when it comes down to getting 60fps. With Java's emphasis on multi-threading (even though it's not perfect and hard to do in an OO language), it is much nicer than what you get in C and C++, and the JVM helps you optimize at runtime. With multiple processors being a big deal, even in desktop systems, Java is going to get better and better for game development.
|
|
|
|
swpalmer
|
 |
«
Reply #5 - Posted
2011-04-06 01:32:07 » |
|
Java is very easy to learn but there is allways that performance handicap.
What performance Handicap? Okay, there is an issue for cases when optimized MMX/SSE/SSE2 etc. is the right thing to do. Like with many signal processing algorithms. But for general code there is usually no performance issue. At my company we are moving more and more towards Java code for as much as we can - and we are in the (video) signal processing business ;-) We just use native code where it matters. For games the core performance areas are usually handled by hardware via OpenGL, so native code isn't needed *at all*, or such native code is already in a library like LWJGL. Coding the bulk of your stuff in Java will just be easier for other reasons (much better support in tools, better standard libraries, etc.) The Java language may not always be the way to go... Scala or something may be better depending on the application, but running on the JVM, using the Java Platform is still a reasonable choice.
|
|
|
|
benc1213
Senior Newbie 
|
 |
«
Reply #6 - Posted
2011-04-06 01:46:17 » |
|
Well I see your guy's points and I have been thinking about this and if I start learning now I should be pretty good in the future when java is using in even more things than they are now such as games because computers will get better.
|
|
|
|
|
JL235
|
 |
«
Reply #7 - Posted
2011-04-06 05:31:21 » |
|
Bear in mind that the Unreal engine and similar engines are for triple-A games. Part of the reason they use C++ is because Java is only very fast in recent years. Back when Unreal Engine 1 was created C++ was clearly the best choice. If you have a very large set of libraries and ecosystem built around one language in mind, then it makes no sense at all to switch to Java. For example John Carmack was once asked about the idea of building Quake 3 in Java and he said it would be perfectly possible, but what would be the point?
Secondly if you want to build your own low-level locking systems (which the Source engine does) then again C or C++ is the best option. The Linux kernel still advocates using C over C++ because of the extra cruft C++ compilers generate. C gives them ultimate control. So if you want to be a part of building the very extreme and low-level parts of a game engine, such as writing lock-free algorithms and advanced smoke systems using the lattest in DX11 tesselation, then yes Java is a bad choice. Otherwise it's fine and for the web Java applets are still FAAAAAAR faster then anything else.
The main issue I have with Java is that when you compare it to Silverlight, Flash, JavaScript or XNA then there is more you need to do. The ecosystem is much smaller (less forums to join and less tutorials for you to follow). Secondly you also have to write more of the cruft yourself. An example I often give is if your user doesn't have the runtimes you use, with Flash this is already solved for you (they are provided with an update or told that they need Flash). With Java there are solutions (Oracle provides a JavaScript script to help) but you have to research and bind this together yourself.
But ultimately it's all about the game. An amazing game is amazing, a bad game is bad. That has nothing to do with the language.
|
|
|
|
benc1213
Senior Newbie 
|
 |
«
Reply #8 - Posted
2011-04-06 06:15:27 » |
|
Yeah you are right I would rather learn java because my friend knows java and we want to make a game together and minecraft inspired me which was made in java. I also think down the road that java will have an even bigger role in the gaming community.
|
|
|
|
|
princec
|
 |
«
Reply #9 - Posted
2011-04-06 13:55:15 » |
|
Also, Java will earn you a mint in the general programming industry  Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
namrog84
|
 |
«
Reply #10 - Posted
2011-04-06 15:10:37 » |
|
What does the "mint" mean in this context? like a gold star? recognition? or non positive like a "haha!"
|
"Experience is what you get when you did not get what you wanted"
|
|
|
steveyO
|
 |
«
Reply #11 - Posted
2011-04-06 15:28:41 » |
|
Mint = Shedloads of dosh!
|
|
|
|
princec
|
 |
«
Reply #12 - Posted
2011-04-06 15:30:29 » |
|
On account of everyone's impeccable English on this board I often forget not everyone is from England and aware of the many subtleties of our various dialects  Cas 
|
|
|
|
delt0r
|
 |
«
Reply #13 - Posted
2011-04-06 17:41:35 » |
|
As a New Zealander, I am surprised by how much we copy of the English rather than the Americans when it comes to slang.
The slang "make a mint" comes from the fact that we call the place that prints money (or stamps too) the mint. ie the Royal Mint.
|
I have no special talents. I am only passionately curious.--Albert Einstein
|
|
|
lhkbob
|
 |
«
Reply #14 - Posted
2011-04-06 17:46:52 » |
|
We should all speak American. We won our independence from you for a reason 
|
|
|
|
gouessej
|
 |
«
Reply #15 - Posted
2011-04-11 10:53:04 » |
|
Java is very easy to learn but there is allways that performance handicap. If you want to do next big game engine pick c++.
Use Java, always. It can be even 15% faster than C++  Update your knowledge, forget your prejudices about Java, there are enough Java haters in this world.
|
|
|
|
pitbuller
|
 |
«
Reply #16 - Posted
2011-04-11 13:56:46 » |
|
Java is very easy to learn but there is allways that performance handicap. If you want to do next big game engine pick c++.
Use Java, always. It can be even 15% faster than C++  Update your knowledge, forget your prejudices about Java, there are enough Java haters in this world. I don't have any prejudices towards Java. I know Java is a hammer but still every problem isn't a nail. Everything have pros and cons.
|
|
|
|
|
gouessej
|
 |
«
Reply #17 - Posted
2011-04-11 14:11:53 » |
|
I don't have any prejudices towards Java. I know Java is a hammer but still every problem isn't a nail. Everything have pros and cons.
Java performance handicap is essentially a prejudice like C++ superiority in term of performance. Memory allocation and method calls are faster in Java than in C++ (according to Brian Goetz, author of "Java Concurrency in Practice") and dynamic optimizations allow optimizations at runtime not possible in compiled languages (according to IBM researchers on the HPC project). If you really want to do the next big game, Java can do the job, look at Poisonville.
|
|
|
|
kappa
|
 |
«
Reply #18 - Posted
2011-04-11 14:17:24 » |
|
If you really want to do the next big game, Java can do the job, look at Poisonville.
Please don't look at Poisonville  Poisonville is known as one of the biggest browser gaming cockups ever, it was cancelled after 2 million euro's were spent on it and it being in development for over 4 years. The developers couldn't deliver the game and it was way to buggy. Not really a Java issue just bad project management.
|
|
|
|
|
gouessej
|
 |
«
Reply #19 - Posted
2011-04-11 14:19:32 » |
|
If you really want to do the next big game, Java can do the job, look at Poisonville.
Please don't look at Poisonville  Poisonville is known as one of the biggest browser gaming cockups ever, it was cancelled after 2 million euro's were spent on it and it being in development for over 4 years. The developers couldn't deliver the game and it was way to buggy. Not really a Java issue just bad project management. I didn't know that, it is a very bad piece of news 
|
|
|
|
pitbuller
|
 |
«
Reply #20 - Posted
2011-04-11 16:40:16 » |
|
I don't have any prejudices towards Java. I know Java is a hammer but still every problem isn't a nail. Everything have pros and cons.
Java performance handicap is essentially a prejudice like C++ superiority in term of performance. Memory allocation and method calls are faster in Java than in C++ (according to Brian Goetz, author of "Java Concurrency in Practice") and dynamic optimizations allow optimizations at runtime not possible in compiled languages (according to IBM researchers on the HPC project). If you really want to do the next big game, Java can do the job, look at Poisonville. I am not saying c++ is better I am saying that it have some pros that java don't have. It's also have much bigger cons than Java. http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B#PerformanceIn my university we only code with c++ but still I only use Java at my free time. My honest opinion is Java is much better and should use much more but it's still not only tool in the world.
|
|
|
|
|
|
|
kappa
|
 |
«
Reply #22 - Posted
2011-04-11 18:53:05 » |
|
did you read the post above regarding Poisonville? even that video shows some of the in-game problems and glitches it suffered from.
|
|
|
|
|
Gudradain
|
 |
«
Reply #23 - Posted
2011-04-11 20:38:55 » |
|
Yeah I read it... It was kinda funny when the person testing the game was not able to enter in the police car. Seriously, I don't know why they feel it was necessary to tell everyone it was made in Java. I have no idea in what language the other game I play are made and it is never mentionned built with c++ in the review I read.
Well you are probably right kappa that the game was just bad managed. They failed to do a ''simple'' fps (so many glitch, gameplay buggy) but they tried to make a MMOFPS. It's really stupid. It was more to show that that I post the video. The game seems not bad overall and if it was made by a couple of indie it would be great but spending 2 million on that...
|
|
|
|
|
kaffiene
|
 |
«
Reply #24 - Posted
2011-04-12 03:40:55 » |
|
We should all speak American. We won our independence from you for a reason :)
Yeah, to save businesses from tax. :o)
|
|
|
|
|
JL235
|
 |
«
Reply #25 - Posted
2011-04-12 04:56:46 » |
|
I don't have any prejudices towards Java. I know Java is a hammer but still every problem isn't a nail. Everything have pros and cons.
Java performance handicap is essentially a prejudice like C++ superiority in term of performance. Memory allocation and method calls are faster in Java than in C++ (according to Brian Goetz, author of "Java Concurrency in Practice") and dynamic optimizations allow optimizations at runtime not possible in compiled languages (according to IBM researchers on the HPC project). If you really want to do the next big game, Java can do the job, look at Poisonville. All that theory and research is nice but then you go and open NetBeans, JEdit, or one of the other many Java built applications and you find quite a different reality.
|
|
|
|
gouessej
|
 |
«
Reply #26 - Posted
2011-04-12 13:34:11 » |
|
We should all speak American. We won our independence from you for a reason  You won your independence with the help of France and Spain. However, I don't advise people to learn my mother tongue. All that theory and research is nice but then you go and open NetBeans, JEdit, or one of the other many Java built applications and you find quite a different reality.
It does not prove anything. These programs are sometimes not responsive enough, maybe they have too big a memory footprint, it does not mean that Java itself is slow. When I use Jake 2, I find what I expect from a Java application. I have used Java since 2002 and I have worked on some professionnal polished applications, this is the subset of the reality that I see. You can write bad programs with any language. The main issue I have with Java is that when you compare it to Silverlight, Flash, JavaScript or XNA then there is more you need to do. The ecosystem is much smaller (less forums to join and less tutorials for you to follow). Secondly you also have to write more of the cruft yourself. An example I often give is if your user doesn't have the runtimes you use, with Flash this is already solved for you (they are provided with an update or told that they need Flash). With Java there are solutions (Oracle provides a JavaScript script to help) but you have to research and bind this together yourself. I agree with you about this aspect. I would like to have a tool like Shiva or FPSCreator for Java.
|
|
|
|
JL235
|
 |
«
Reply #27 - Posted
2011-04-12 14:19:56 » |
|
All that theory and research is nice but then you go and open NetBeans, JEdit, or one of the other many Java built applications and you find quite a different reality.
It does not prove anything. These programs are sometimes not responsive enough, maybe they have too big a memory footprint, it does not mean that Java itself is slow. When I use Jake 2, I find what I expect from a Java application. I have used Java since 2002 and I have worked on some professionnal polished applications, this is the subset of the reality that I see. You can write bad programs with any language. When you look at the non-Java versions of those applications (such as Visual Studio instead of NetBeans and Eclipse, and Notepad++ instead of JEdit) then you find them more responsive and use less memory. The same is also for plenty of other Java apps I've used over the years.
|
|
|
|
kevglass
|
 |
«
Reply #28 - Posted
2011-04-12 14:23:55 » |
|
Not that I particularly disagree but visual studio doesn't do anywhere close to what eclipse does and its much much slower on the same system here.
Kev
|
|
|
|
gouessej
|
 |
«
Reply #29 - Posted
2011-04-12 15:11:31 » |
|
When you look at the non-Java versions of those applications (such as Visual Studio instead of NetBeans and Eclipse, and Notepad++ instead of JEdit) then you find them more responsive and use less memory. The same is also for plenty of other Java apps I've used over the years.
It does not prove that Java is slow. Anyone can find some counter-examples. I disagree with you about Visual Studio, I used it only a few weeks, it doesn't have as much features as Eclipse and I found VS less stable.
|
|
|
|
|