Why not Java?

Started by
11 comments, last by NightCreature83 12 years, 4 months ago
I understand many people use Java and love it, so do I. I love eclipse and it's syntax. But I'm hearing c# is now better than Java in many ways. Many c# game devs use XNA, which I won't use because of its lack of cross platform support. What are my other c# options? Besides Unity, I don't know any. I also hear c++ is great for games, but advanced memory management scares me.
Advertisement
I understand many people use Java and love it, so do I. I love eclipse and it's syntax. But I'm hearing c# is now better than Java in many ways. Many c# game devs use XNA, which I won't use because of its lack of cross platform support. What are my other c# options? Besides Unity, I don't know any. I also hear c++ is great for games, but advanced memory management scares me.[/quote]
First, Java is quite nice. I wouldn't say it is perfect, but what is. Pound for pound, Java and C# are very similar (ignore the howls of the indignant) and are pretty interoperable as far as basic libraries and language structure go.

That said, Java's largest drawback is lack of gaming platform support (and libraries: there's no XNA for Java). While vanilla C# (pure .Net) is limited to Microsoft controlled devices, those devices (read: platforms) range from the PC to the XBox to the Windows Phone and, as of this month, to the Playstation. Java just doesn't have that. It does have a toehold in the mobile market via Android, but with Google and Oracle going at it (Android SDK support for 1.7 = ???) the future is somewhat dubious. Rumors abound of injecting a JVM on iOS but that's not been confirmed as practical (read: Apple hasn't said "No!" just yet). Oracle is pushing JavaFX as something that can be used for "gaming consoles" but it remains to be seen whether that will take off (or be practical).

If you were looking for "cross-PC C# platform" options then you might consider Mono. With careful structuring, you can pull off a Mono/C# compatible application reasonably well. There's supposedly an XNA library for Mono tho' I've not used it myself.

Other C# options include various engines and components, such as Axiom or OpenTK, to do the heavy lifting for you.

C++ is pretty stock as far as games go, but as the years wear on its acceptance wanes in favor of "safer" languages (such as C#), to the point where it is actively discouraged (and/or forbidden) on certain platforms. If you don't have a use for what C++ can offer you (such as memory management) then don't worry about it.

Also, minor nit-pick but Eclipse isn't a language. It is a reasonable IDE tho'.

Frankly, if you're not making anything "serious" I don't see a reason to fret. If you're just making PC/Android games then stick with Java. Switch when you run into a valid limitation.

I understand many people use Java and love it, so do I. I love eclipse and it's syntax. But I'm hearing c# is now better than Java in many ways. Many c# game devs use XNA, which I won't use because of its lack of cross platform support. What are my other c# options? Besides Unity, I don't know any. I also hear c++ is great for games, but advanced memory management scares me.

First, Java is quite nice. I wouldn't say it is perfect, but what is. Pound for pound, Java and C# are very similar (ignore the howls of the indignant) and are pretty interoperable as far as basic libraries and language structure go.

That said, Java's largest drawback is lack of gaming platform support (and libraries: there's no XNA for Java). While vanilla C# (pure .Net) is limited to Microsoft controlled devices, those devices (read: platforms) range from the PC to the XBox to the Windows Phone and, as of this month, to the Playstation. Java just doesn't have that. It does have a toehold in the mobile market via Android, but with Google and Oracle going at it (Android SDK support for 1.7 = ???) the future is somewhat dubious. Rumors abound of injecting a JVM on iOS but that's not been confirmed as practical (read: Apple hasn't said "No!" just yet). Oracle is pushing JavaFX as something that can be used for "gaming consoles" but it remains to be seen whether that will take off (or be practical).

If you were looking for "cross-PC C# platform" options then you might consider Mono. With careful structuring, you can pull off a Mono/C# compatible application reasonably well. There's supposedly an XNA library for Mono tho' I've not used it myself.

Other C# options include various engines and components, such as Axiom or OpenTK, to do the heavy lifting for you.

C++ is pretty stock as far as games go, but as the years wear on its acceptance wanes in favor of "safer" languages (such as C#), to the point where it is actively discouraged (and/or forbidden) on certain platforms. If you don't have a use for what C++ can offer you (such as memory management) then don't worry about it.

Also, minor nit-pick but Eclipse isn't a language. It is a reasonable IDE tho'.

Frankly, if you're not making anything "serious" I don't see a reason to fret. If you're just making PC/Android games then stick with Java. Switch when you run into a valid limitation.
[/quote]

When I said "eclipse and its syntax", I was still talking about Java. I was saying two things I love about Java is its syntax, and eclipse.
If you enjoy Java, and it is doing the things you need it to do, then run with it. I think C# is a better language, and I think you are best served by learning both C# and C++ eventually. But that comes second to getting things done and getting comfortable with one primary language, and it's not like Java's a dead or out of date language.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Thanks guys. I think I will stick with Java until I have a need for another language.

I think C# is a better language, and I think you are best served by learning both C# and C++ eventually.


When it comes to Java, this is the one thing that makes me hesitant to recommend it. I cannot think of a single regard in which Java ( the language ) is superior to C# the language. The JItters seem as fast or faster, the language is cleaner, the standard libraries are better, the tools are superior, the ecosystem less cluttered, the GUI aspects infinitely superior ( show me someone that prefers Swing or AWT to WinForms or WPF and I will show you a lunatic ), and when it comes to games, it has XNA and in the near future Sony Vita.

In any situation where you can choose one over the other, I simply can't think of a reason to choose Java. In some cases, like Android or some phones forcing it on your, or massive enterprise applications, I can see going with Java, but in a clean slate project, I just can't fathom the decision.




To the OP, I am not saying Java is a bad choice; nor that you shouldn't go with it. I am just putting forward my opinion that C# is superior in every measurable metric. :)
Why not Java? Because there are more expressive languages. By expressive I mean that you can more directly express your computational idea (rather than fit the idea into a language's possibly crufty and rigid syntax mold).
The way I see it, C# is an overall more elegant language albeit it has vast similarities with Java. I personally don't know C# which is the only thing that really keeps me from using C# over it. I have far more experience with Java than I do with C# and therefore I don't bother learning C# anytime soon, although eventually I will because it's making me curious. The way I see it, if you have resources to learn Java more comfortably, or if you're already somewhat familiar with it, continue with Java. If you're still deciding which way to go, I'd say go along with C#. If you know both languages, then you can probably decide on your own which one you prefer to use and for what reasons.

Yo dawg, don't even trip.

XNA is pretty cool, but I will not use it. I am a big supporter of cross platform. I like lwjgl and slick for Java. Can someone point me to some nice c# game libraries?
The only way to sample a new language or a new tech potential is to try it first hand. I started playing with C# while sitting in airports waiting for flights.. now I use it whenever I can.
There isn't one single thing that makes C# awesome.. there are thousands of them, ranging from tools quality (ie. Visual Studio), .NET interopability , library, language features and the fact that is a very "evolving" language.

The problem is when idealism and fixations that resembles religions more than technology start to cloud people's mind.. and the OP is a spot on example of this kind of damage done by close mindedness.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

This topic is closed to new replies.

Advertisement