Jump to content
  • Advertisement
Sign in to follow this  
Xer0botXer0

why are people using c# over java

This topic is 479 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

Hi guys,

 

So as the title asks, why are people using c# over java ? 

The last dozen posts are about c#, none on java. I was recommended to try gamedev.net in regards to learning java and participating in such a community but this seems more c# c++ side than java. 

Share this post


Link to post
Share on other sites
Advertisement
The above points aside, if you have Java questions or want to talk about Java I'd go ahead and ask here. Despite the apparent bias (which I suspect you'll find in any game development community unless it's specifically focused on Java) there are still at least a number of people here who actively work with Java, and many more who have worked with it previously or are otherwise familiar enough to participate in discussions.

Share this post


Link to post
Share on other sites

I dont mind biased opinions, I just like seeing the reasons people chose this or that.

Thanks for the responses, it kind of make sense regarding unity that uses c# causing a wider popularity for it.

I mainly want to learn java to create a server for my game project which is written in gml, from what people have told me it's a bad idea to create a gml server for a massively multiplayer game which is what I'm aiming for. If I really want to make this game on my mind, I have to be realistic, so Java seems like the way to go.

 

I think I'll stick around on gamedev.net, because there's a lot ofinteresting stuff going on, but I'll be using stack exchange concurrently so that I can solve problems sooner. And also the more responses the more sense something will make.

 

Thanks again

Share this post


Link to post
Share on other sites

I think it really is a case of the platform chooses the language. Depending what engine you choose, the language choice is made for you. I haven't come across anyone who puts the language choice before the engine choice.

Share this post


Link to post
Share on other sites

I just like seeing the reasons people chose this or that.
For beginners, the actual language isn't that relevant. C# being a native at a Windows machine, together with Windows being the dominant platform, and existence of Unity, makes it a logical choice. Java is just a little further away, and thus used less.

... create a gml server for a massively multiplayer game which is what I'm aiming for
Massive multi-player game is a bad idea in general for a beginner. Multi-player game is already very hard, networking is complicated, "massive" adds good scaling to that equation, which is a few order of magnitudes more difficult. I would suggest you start with some much much simpler.

... but I'll be using stack exchange concurrently so that I can solve problems sooner.
The sites are quite complementary. At stack exchange you have the short simple factual-ish very concrete questions, while here discussions are more general, where the answer isn't always clear.

Share this post


Link to post
Share on other sites

Going on, there is also the nature of the task.

C++ is the currently chosen language for systems-level work in big games. It used to be different languages.  C++ currently offers the most options for tight control of the hardware in systems where you need it.

Java is the currently chosen language for server-side work and big data backends. The business world adopted it fully in the late 1990s and it is by far the most popular language for tools and technology on servers. It is also the native language of Android, although many game developers bind the calls to C++ and do their heavy lifting outside of Java.

C# is a powerful language that is a good fit for a lot of things game do.  It works extremely well for gameplay scripting, and as mentioned, Unity uses it on the gameplay side. It has a wide range of libraries and is easy to interoperate with other languages. The .net framework makes it almost trivial to put together simple tools and data processors.

 

If the site were focused on a more business-oriented field, or if the site were more about backend programming for games, then Java would likely be the most discussed language.  Instead when talking about systems-level work people generally assume C++, and when discussing gameplay and tools work the discussions tend to ask if the language is C++ or C#.  The networking forum of the site tends to be language agnostic, but there are many topics that specifically use Java.

Share this post


Link to post
Share on other sites

I'm going to jump in and claim that C# is overall a better technical choice of language than Java. Yes, I went there.

Shots fired!  :wink:

Frankly I agree with all that. C# has value-types, unsafe regions for pointer access and pInvoke which are all super useful for low-level work and much more flexible than java's FloatBuffer.

Having said that, "maybe" some of this could change with Java10 (Project Valhalla) introducing value types and generic specialisations that are hopefully optimised to the level of FloatBuffer. Java's also gaining ahead-of-time compilation which could mean more in-java heavy lifting for cases where people might at present have moved that code out to C++.

 

Just to stand up for present-day Java a bit: I am actually a huge fan of LigGDX as a gamedev framework. Java8 is significantly better than previous versions of Java. In fact it is just about reaching the point now where there are little nuggets of the language that I do miss when coding in C# (e.g. the diamond operator, functional interfaces are possibly a nicer idea than C# delegates, default interface methods, class-like enums, maybe a few other things).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!