Jump to content
  • Advertisement
Sign in to follow this  
bilsa

why C# and not Java?

This topic is 4588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone! Lately I have seen a couple of threads about how c# is going to take over gamedev ? I'm not here to argue about that. What I wonder is why everyone is so "hyped" about c# taking over gamedev but why not Java? As far as I have seen some new benchmarks on the web, most of them actually say that Java currently is the faster one. Ok, so I know that c# has Visual studio, which I must say is my second favorite ide - seconds to eclipse. But other than that, it seems to me that java is more mature and I doubt that the .net framework will cach up to suns j2ee framework anytime soon. (j2ee or whatever it's called). C# has DirectX, but what's wrong with OpenGL with java? Ok, please don't start flaming that the benchmarks were wrong etc... lets just say that c# and java are equal in performance... C ya

Share this post


Link to post
Share on other sites
Advertisement
Good questions! If I had more time, I'd respond in more length -- so excuse my brevity!

C# is having a -lot- of money put into it as the 'premier' development language for Microsoft platforms in the future -- hence, MS is -very- keen to see it succeed and they're trying to make sure their C# solutions are top notch for Windows. Java itself has historically (and I'd argue still is) been very much business oriented -- that's not to say obviously that you can't use the OpenGL bindings...but that's what they are -- bindings to another language's functionality. The better option for Java -should- be Java3D, but Sun and the Java3D community have a hard time competing with MS and their MDX offerings -- especially when the majority of Windows dev appears to be DirectX based (sure, you get some awesome games in OpenGL too, and it is just as functional...but it just seems to be used less).

Either way, form your own opinions -- as far as functionality is concerned, I'd argue that C#/CLR is almost if not as mature as Java is right now -- I really like the Threading and RMI stuff from Java -- but I will admit that I prefer using Visual Studio to eclipse these days. (Not that it was always so -- Eclipse was soooo much better than VC++ 6), but despite it being good -- it can chug a bit unless you have lots of RAM :)

Anyway, these are just my opinions and as brief as I can make them. Form your own opinion based on the results people have had using the respective systems.

~Shiny

Share this post


Link to post
Share on other sites
Do you have links to the benchmarks? I don't think I've ever really seen a head-to-head comparison of the two languages.

Share this post


Link to post
Share on other sites
Thanks Shiny, thats the kind of discussion I was hoping for :)

nsto119 - I don't really remember where I found the benchmarks,
but after a quick look at google with "java vs c# performance 2006"
I found this amongst others:

http://blogs.sun.com/dagastine/entry/sun_java_is_faster_than1

Though my point was not to say Java was faster, I was just saying
that c# was not faster than java, and if it is it's just marginaly.

Share this post


Link to post
Share on other sites
And i never heard of a faster java program. even when the bigges crack make the java program and the biggest sucker the c++ one for a benchmark. But anyway - it could be that i just never heard about it.
My opinion is, that java is only good for internet applications or OS indipendend stuff (and that is slow because the real time comparser). If you
want to write games the java choice is the worst because of the missing DirectX and OpenGl.

Share this post


Link to post
Share on other sites
Bear in mind I've got no experience with C#, but nevertheless, is execution speed all that matters to you, or are memory usage, development time and other such factors important to you as well?

I'm sorry I can't contribute more to the discussion, but at least these things should provide some food for thought. :)

Share this post


Link to post
Share on other sites
Karadok, I'm guessing your point is that java is slow becaouse of JIT compiler?

But the same applies to C#.

And there ara jogl bindings to OpenGL for Java, so you do have OpenGL at least. Though I agree that it would be better to have
a built in 3D api with good performance.

Share this post


Link to post
Share on other sites
The main reason has relatively little to do with efficiency/"speed".

I know this is going to offend some people but the truth of the matter is that Java (and the platform) has many issues that just make it a pain in the ass and verbose, it's just an unpleasant experience. No I don't mean it's difficult I mean the language (and platform) is borked. Before anyone tells me otherwise I have 3-4 years past experience with Java so I know what I’m talking about.

C# (and the .NET platform/environment) does a whole lot of things right and/or much better.

Even though this is the case I am not as keen about the C# language itself (not .NET) as others are but this isn't even an issue since you have an array of languages which target .NET (and even the Java platform).

Share this post


Link to post
Share on other sites
Ok, got a bit more time to sit down this time (waiting for the new Apple developer tools to download (~980MB so I'll be waiting a bit).

Anyway: I think the OP is interested in just why everyone around here is so keen on .NET and C# in general as an alternative to 'the old favourites' (C++ etc). I'm sure everyone has their own reasons; but I'm betting that a major one is that Microsoft does provide great support for their developers -- their tools are top notch, their feedback systems are good and their documentation is easily as good as the Javadocs (often better in places -- I find it easier to search). They have the advantage of only really having to target one platform and to the user -- once .NET framework is installed, they never have to think about it again (A compiled .NET program is an executable and doesn't require you to fireup the CLR for it) -- No little teacup hanging around that people might feel like playing with. As far as the internet is concerned -- C# can do just about all the things Java can...but Java has far greater acceptance (because it's been around longer...) and it doesn't cost anywhere near as much as a good microsoft solution.

It's like the argument for and against using Windows 2003 Server -- it's great, does everything Linux can do -- has a new powershell coming out soon...but it costs many $$$ -- whereas even enterprise Linux systems like Redhat and SuSE are much cheaper to deploy, hence they get used as often or more often than the former.

Still, I suppose you could tie it all down to Microsoft themselves actually -wanting- people to use C# and .NET to make games -- check out this Wiki entry on Microsoft's XNA (Clicky) -- a streamlined system for game development on PC and XBox 360. Note that the Express version (free beta download right now, BTW) is based on the .NET framework and designed to work with Visual C# Express Edition! Sure, the pros will get a professional version with a real devkit to debug on, but this is a massive offering to anyone interested into getting into game dev.

This contrasts sharply with Sun: They know they have heaps of businesses invested in their enterprise solutions -- hence they get the community behind Java to look after things like Java3D. Note that Java3D stuff can be run right out of a browser! Pretty cool stuff that I've yet to see anyone do in C# ;). Check out their page (Sun's Java3D developer page...) right here.

Either way, use what you feel comfortable with -- or even better, the best tool for the job.

~Shiny


Share this post


Link to post
Share on other sites

This topic is 4588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!