tackman
JGO n00b  Posts: 14
|
 |
«
on:
2012-01-11 13:32:21 » |
|
Hello citizens of JGO!
I know it might be a rather odd question on a Java Gaming Forum, but please bear with me.
I'm in the process of trying to decide which language to use to create games. The candidates are Java, C++ and C#. Why these? Well...
To me, Java is an all-rounder, a WORA (Write Once Run Anywhere) type of language, which makes you, the programmer, able to write a single source code and just take it to windows, linux, osx, android, iphone, and so on.
To me, C++ is the standard when it comes to programming. Even though my knowledge in C++ is the worst of the three mentioned.
To me, C# is a mix of Java and C++, bringing best of both worlds together. However, you can only write code on Windows, which is kind of a let down.
What pros / cons can you list to these? Why would you use them or not use them? Bear in mind, my goal is to build a game (finally start to build one, at least), and more often than not do that on a linux. (I know, this sort of rules out C#, but I would use windows only for that..)
Comments?
|
|
|
|
|
pitbuller
Sr. Member   Posts: 340 Medals: 9
|
 |
«
Reply #1 on:
2012-01-11 13:49:07 » |
|
C++ is most demanding and you have least knowledge of it. So that rule it out.
Many have said that C# bindings to openGL is 20% slower than Java have(lwjgl/jogl) but maybe that does not matter much.
So it's about flawor more than anything else. If you want use Unity then C# have some edge but otherwise I would prefer Java becouse of tools.
|
|
|
|
theagentd
JGO Wizard     Posts: 1392 Medals: 88
|
 |
«
Reply #2 on:
2012-01-11 13:51:01 » |
|
- Performance doesn't matter. If anything, the (marginally?) better performance of C++ just allows you to get away with worse code and algorithms. I once had a C++ teacher who told me that a slow O(n^2) sorting algorithm was okay in C++ because the language was so fast. He was an idiot. - In my opinion C++ is too low-level for games. Any decently programmed (advanced 3D) game should be GPU-limited anyway, and you can use the exact same graphics library from all 3 languages (OpenGL). In C++ you end up doing lots of non-gamey stuff like memory management, e.t.c and have a harder time debugging pointers e.t.c. Also, C++ coders all have broken Caps Lock buttons. - Can't say much about C# other than that it only runs on Windows. There's no argument for it, but also not much argument against it. Well, XNA is having development problems if I remember correctly, but I don't follow those news very closely...
In the end, I'd say Java. I wouldn't be on this forum if I didn't say Java, but in the end the language you choose matters very little to how you improve as a programmer (assuming that is your goal).
|
There is no god.
|
|
|
Games published by our own members! Go get 'em!
|
|
R.D.
Full Member   Posts: 122 Medals: 2
"For the last time, Hats ARE Awesome"
|
 |
«
Reply #3 on:
2012-01-11 13:54:06 » |
|
I go with theagentd xD I mean... Of course most of us will say Java. Go to a C++ Forum and most people will say c++ of course (can't understand those people, but whatever [even a friend which is highly skilled in c++, says that he hates the language xD])
|
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #4 on:
2012-01-11 13:57:33 » |
|
Java doesn't go to the iPhone, infact it doesn't go anywhere apart from the desktop without issues - and even there it can be a bit irritating. C++ isn't really the standard. C is the standard. If you check out the programming language statistics ( http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html) you'll see Java is actually the most used and most "standard". C# goes to XBox which is a big win. With Mono it goes to Linux, OSX and iPhone. It's a good language but will always be trying to be Java. Which it's not. On this forum you're generally get told to use Java. However, there isn't really a massive difference between them all. Pick one you like and focus on writing the games. Cheers, Kev
|
|
|
|
Cero
JGO Neuromancer     Posts: 1050 Medals: 18
|
 |
«
Reply #5 on:
2012-01-11 14:23:13 » |
|
I can only tell you my reasons for choosing Java.
I have the most skills and experience in java - biggest factor C++ is quite old, full of shit and convoluted to say the least C# is a microsoft standard - I might as well program games that only work on microsoft silverlight
also java games work without as much effort on at least 3 platforms
and performance, well, Server JVM is, once started, in many cases faster than C++
XNA is interesting, because its the easiest way of getting your game to a console - but I would only go so far as to port it, not write it exclusively for it
the only reason C++ is still so big, is that old established standards die slowly, just like Windows
|
|
|
|
tackman
JGO n00b  Posts: 14
|
 |
«
Reply #6 on:
2012-01-11 14:57:29 » |
|
Thanks for all of your views! Don't get me wrong, I knew that many (if not all) of you will reccommend java, but you took the time and explained your thoughts on all the three languages I asked you about, which is a great help in itself. It helps me, someone who doesn't fully understand either of them to get some info from experienced programmers and root out the misinformations I might have about them. I think I will stay with java. The amount of (unreadable) code it takes to just create a window with C++ is making me want to never sit in front of a computer ever again, and C# is too constricted (to Windows, xbox and windows phone) for my taste. This goes out to all of you. 
|
|
|
|
|
delt0r
Sr. Member   Posts: 412 Medals: 12
Computers can do that?
|
 |
«
Reply #7 on:
2012-01-11 17:15:11 » |
|
At the start, for your first game. I would stick with what you know best. You will get more done faster and not be bogged down with learning new details. Your biggest enemy is not finishing anyway.
|
I have no special talents. I am only passionately curious.--Albert Einstein
|
|
|
ra4king
JGO Kernel      Posts: 3160 Medals: 196
I'm the King!
|
 |
«
Reply #8 on:
2012-01-11 17:55:46 » |
|
Awww my hand was bigger than that hand!  Java all the way. I'm using C# at school and it sucks. The API is pathetic and XNA sucks. The only good thing about it is the "properties" syntax and the option to pass by reference.
|
|
|
|
PaulCunningham
JGO n00b  Posts: 6
|
 |
«
Reply #9 on:
2012-01-12 04:42:59 » |
|
The tools are free for them all so download them and have a play with each one. Don't get caught in the trap of being a one language guy / language evangelist. There's good and bad in all of them no matter what anybody tells you.
As per Kev's reply, the days of C# being Windows only are long gone. And XNA, most definitely, doesn't suck.
There's also game maker applications / frameworks (GameMaker, Unity, etc) that may be a better option if you just want to get games finished.
What sort of stuff do you want to write and what devices do you want to target? Answering that may help you decide which option to go for - at least initially anyway.
Oh, and Hi - first post :-)
|
|
|
|
|
Games published by our own members! Go get 'em!
|
|
princec
« League of Dukes » JGO Kernel      Posts: 8089 Medals: 96
Eh? Who? What? ... Me?
|
 |
«
Reply #10 on:
2012-01-12 04:45:42 » |
|
Hi Paul  I wondered when you were going to turn up! Paul is being assimilated into Puppygames, though he doesn't realise it yet. Resistance is futile! Cas 
|
|
|
|
PaulCunningham
JGO n00b  Posts: 6
|
 |
«
Reply #11 on:
2012-01-12 05:01:16 » |
|
 I'm not resisting very hard though am I!
|
|
|
|
|
gouessej
JGO Kernel      Posts: 3560 Medals: 30
TUER
|
 |
«
Reply #12 on:
2012-01-12 05:15:56 » |
|
C# goes to XBox which is a big win. With Mono it goes to Linux, OSX and iPhone. It's a good language but will always be trying to be Java. Which it's not.
Mono .NET implementation differs from Microsoft .NET implementation. Mono is reliable but don't expect something comparable with Java, look at this: http://codebetter.com/patricksmacchia/2009/01/19/mono-vs-net-framework-public-api-compatibility/@pitbuller you're too kind with OpenTk and Tao Framework, their performances are even worse than that  The best compromise is Java except if you really want to use ios. Has someone tested in-the-box and ispectrum open?
|
Julien Gouesse
|
|
|
PaulCunningham
JGO n00b  Posts: 6
|
 |
«
Reply #13 on:
2012-01-12 05:29:42 » |
|
"Posted by Patrick Smacchia on January 19, 2009". Used an older version of Mono too. There's also the MoMA tool: http://www.mono-project.com/MomaIn Java land, I've had a few folks recommend Slick as a decent framework.
|
|
|
|
|
princec
« League of Dukes » JGO Kernel      Posts: 8089 Medals: 96
Eh? Who? What? ... Me?
|
 |
«
Reply #14 on:
2012-01-12 05:33:40 » |
|
C# is also the basic language for Unity is it not? My 2p on the whole matter: Java: great - really great - for desktop development, and Android development too. There's precious little money in Android though, and desktop money is extraordinarily hard to come by. Android performance lame. C#: great for XBox tinkering (only tinkering though - XBLIG is basically a cesspit of dross and zero marketing effort, and your chances or making money here are next-to-zero). XNA was good once upon a time but according to various sources is now not-so-good and anyway really only achieves what various other frameworks achieve, no great shakes. Performance often severely lacking compared to Java. C# on Mono stretches deployment to various other targets but again performance is lame. C++: run anywhere at high speed, with a reasonable amount of hair loss. Rest assured you can do it, but it takes a fair bit longer to get stuff working. Cas 
|
|
|
|
PaulCunningham
JGO n00b  Posts: 6
|
 |
«
Reply #15 on:
2012-01-12 06:15:09 » |
|
C# is also the basic language for Unity is it not?
C#, Boo, Javascript - core engine is C++ I believe. Java: great - really great - for desktop development, and Android development too. There's precious little money in Android though, and desktop money is extraordinarily hard to come by. Android performance lame.
Well, you've constantly proved that you can write great games using Java :-) C#: great for XBox tinkering (only tinkering though - XBLIG is basically a cesspit of dross and zero marketing effort, and your chances or making money here are next-to-zero). XNA was good once upon a time but according to various sources is now not-so-good and anyway really only achieves what various other frameworks achieve, no great shakes.
Agree 100% - Microsoft really, really dropped the ball with Xbox Live Indie Games. Use for fun / hobby projects. Still, it's awesome to see your games running on your Xbox. Big smiles there. And you never know, you could get lucky (Fortress Craft or the Dishwasher guy). Only way for most devs to write code for it though unless you miraculously manage to get on XBLA (although would you really want to do XBLA certification *shudder*) XNA 4.0 is brill - they did a great job of tidying up all the crud. Not sure why people think they broke it - Well, actually I do. Most folks don't realise there are 2 profiles in XNA; Reach and HiDef. And as Reach is the default they assume all the fancy shadery goodness has been nerfed so they could target the Phone. They didn't. They made the reach profile robust enough to hit a wide range of hardware and fix up all various driver problems. Desktop deployment is sucky though. Performance often severely lacking compared to Java. C# on Mono stretches deployment to various other targets but again performance is lame.
But Java isn't available on the Xbox so no worthwhile comparison can be made. It's the cheap ass Compact Framework they used that is the reason for 95% of the performance problems. If they have built a framework specifically for the console it would fly. And the in order CPUs don't like the branch heavy code the CF jitter produces. C++: run anywhere at high speed, with a reasonable amount of hair loss. Rest assured you can do it, but it takes a fair bit longer to get stuff working.
C++11 may take away a lot of the 'pain' of traditional C++ but having not used I couldn't really comment.
|
|
|
|
|
princec
« League of Dukes » JGO Kernel      Posts: 8089 Medals: 96
Eh? Who? What? ... Me?
|
 |
«
Reply #16 on:
2012-01-12 06:44:50 » |
|
I am watching C++11 with great interest. Could it really be the case they've made C++.... good? Cas 
|
|
|
|
thaaks
JGO n00b  Posts: 46 Medals: 1
|
 |
«
Reply #17 on:
2012-01-12 07:19:02 » |
|
Could it really be the case they've made C++.... good?
As long as source code is separated in header and source files it simply can't be good 
|
|
|
|
Orangy Tang
JGO Kernel      Posts: 2960 Medals: 37
Monkey for a head
|
 |
«
Reply #18 on:
2012-01-12 07:26:19 » |
|
I am watching C++11 with great interest. Could it really be the case they've made C++.... good? Cas  No, they've made a kracken by nailing legs to an octopus. More seriously, no because they've failed to address any of the core problems that make it such a pain to work with. Largely because they're sticking with being backwards compatible so they've *still* got a very hairy and hard to parse syntax that's ambiguous unless you take the *whole* program into account. And then they've bolted on a bunch of extra syntax and overloaded existing keywords so they do completely different things based on new context. The compile model will still be the same, so compile times will still suck. Unless you're really careful with how you structure *all* of your code, your compile times will still really suck. The additions to the standard library are much better, but then that's because they're all really basic things that either should have been in in the first place (smart pointers) or should have been added ages ago (threading). And by now everyone has already rolled their own or uses Boost. Oh, and it'll take a couple of years before gcc and MS have actually implemented it properly, and a few years after that that we can actually call it widespread enough to be actually used and drop support for pre-C++0x compilers. So frankly I don't think it's going to set the world on fire.
|
|
|
|
tackman
JGO n00b  Posts: 14
|
 |
«
Reply #19 on:
2012-01-12 07:40:09 » |
|
Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;
Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?
edit: or avoid completely?
|
|
|
|
|
Mickelukas
JGO Ninja    Posts: 731 Medals: 25
Java guru wanabee
|
 |
«
Reply #20 on:
2012-01-12 07:52:03 » |
|
Make sure you learn how to create applets as you will get a ton more feedback from the community if you provide your game like that.
|
|
|
|
delt0r
Sr. Member   Posts: 412 Medals: 12
Computers can do that?
|
 |
«
Reply #21 on:
2012-01-12 07:56:25 » |
|
And i would say, forget getting applets to work... they sux! 
|
I have no special talents. I am only passionately curious.--Albert Einstein
|
|
|
Riven
« League of Dukes » JGO Kernel      Posts: 5870 Medals: 255
Hand over your head.
|
 |
«
Reply #22 on:
2012-01-12 08:18:07 » |
|
Applets are great to share your works with developers.
Applets are horrible to commercially depend upon => ship your own JRE as part of your standalone application.
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings
|
|
|
Grunnt
Jr. Member   Posts: 50 Medals: 3
|
 |
«
Reply #23 on:
2012-01-12 08:26:43 » |
|
Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;
Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?
edit: or avoid completely?
Classpaths can be a real pain with Java... So figuring out how classpaths exactly work will prove extremely useful in the long term. On the topic of choosing a programming language: I can program in assembly, C, C++, functional languages, C#, Python, Java, and some other languages that I forgot, and I tried to make games in some of these (most notably C, C# and Java), but Java is the first language I actually finished programming a game in. I think that's by far the most important selection criterium when you're starting out: choose a language that you will actually finish a game in. That rules out C/C++ as far as I'm concerned, since it simply takes much, much longer to get things done (unless you're a real pro at the language I guess, but even then). C# is quite possible, but you must like Microsoft / .NET and their approach to doing things. Also, once you have experience in game development I guess it's not that hard to switch to a different language..
|
|
|
|
Mickelukas
JGO Ninja    Posts: 731 Medals: 25
Java guru wanabee
|
 |
«
Reply #24 on:
2012-01-12 08:50:33 » |
|
Applets are great to share your works with developers.
Applets are horrible to commercially depend upon => ship your own JRE as part of your standalone application.
This. Applets are causing lots of issues if you are going to try to make money on the project, but you get at least ten times as much comments if you put an applet up for us (or any other forum) to test instead of giving a download link.
|
|
|
|
gouessej
JGO Kernel      Posts: 3560 Medals: 30
TUER
|
 |
«
Reply #25 on:
2012-01-12 09:04:36 » |
|
There is no need of an equivalent of MoMa with Java, do you see the difference?
|
Julien Gouesse
|
|
|
gouessej
JGO Kernel      Posts: 3560 Medals: 30
TUER
|
 |
«
Reply #26 on:
2012-01-12 09:12:23 » |
|
Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;
Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?
edit: or avoid completely?
I advise you to avoid autoboxing because it is quite easy to create very buggy things with them, particularily when you use them with ternary operators. Use applets with care as some browsers have a real poor support of them.
|
Julien Gouesse
|
|
|
sproingie
JGO Strike Force    Posts: 899 Medals: 55
|
 |
«
Reply #27 on:
2012-01-12 10:37:14 » |
|
Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?
Oh how I could go on, but I think my primary gripe is an overall lack of expressiveness combined with a marketing effort that successfully convinced the larger community that this was a great feature and how none of us were worthy of wielding actual power in our language constructs. Java as a platform, I love. Java the language is the C of the JVM. Ok, as for features you should avoid? downcasting, unless it's absolutely positively necessary. That goes double for instanceof. Reflection, if it's used to "get around" static typing when a better design would suffice. Manual use of threads and locks (use java.util.concurrent and concurrent collections instead). RMI. Use of serialization as a wire protocol or storage format (except for caches). Using inheritance when composition will do. Array covariance.
|
|
|
|
|
Cero
JGO Neuromancer     Posts: 1050 Medals: 18
|
 |
«
Reply #28 on:
2012-01-12 10:49:01 » |
|
Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?
actually you know what I like more in C++. You can say: ok this is a pointer String* you are always sure in C++ what is a pointer and what not, while in java technically everything is a pointer and it can get hard to keep up in situations - of course this only depends on how you implements stuff java puzzlers is a nice showcase of what to avoid
|
|
|
|
sproingie
JGO Strike Force    Posts: 899 Medals: 55
|
 |
«
Reply #29 on:
2012-01-12 10:55:59 » |
|
you are always sure in C++ what is a pointer and what not,
The proliferation of "smart pointer" classes in C++ has led me to the complete opposite conclusion. To say nothing of references, which have pointer semantics sometimes, value semantics other times, and act like plain old aliased names yet other times.
|
|
|
|
|
|