Jump to content
  • Advertisement
Sign in to follow this  
Portella

Unity Java vs C# - Experts points of view

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

I know that this question has come up hundreds of times on forums, but it is really disappointing how one can read through dozens of threads (hundreds of posts) without getting an informed, unbiased view.

I'm a beginner programmer with very basic knowledge of C# and I see that thousands of others have the same doubt as me when trying to choose between those two languages. We receive answers like "language doesn't matter, learn algorithms, design principles, oop structure, etc", or "after learning java you'll jump to C# easily".

It's not that I disagree with the above, but apart from learning the principles, structure, logic, etc, one need to get a repertoire of tools and, in fact, the language chosen may not matter that much, but the framework linked to it can take much time to be mastered. I have read through discussions about whole teams of experienced programmers resisting the change to another framework, indicating that this is a real concern among seasoned programmers. It's not just a question of adapting to syntax.

Most discussions about both languages see the same repeated statements:
- if you take on C#, you marry Windows.
- No, you don't, you'll always have mono. (nothing is said about personal experience with mone though)
- Java is "more" cross-platform.
- C# is a better structured language. (this is the only point I see which seems to be uncontested in MOST debates, but again, it's not only about the languages, but about what its environment).
- C# has better performance. (I don't know if that is true, but the possibility of using development tools like XNA and UNITY seems to have no parallel in Java. At least, from what I was able to find, JMonkey seems to be one of the best graphical engines around for use with Java, and graphics seem rather primitive)
- Others just talk about very specific details, like GC efficiency, etc.

Synthesizing, much of what is said seem like myths, uninformed points of view, fanboy talk or biased propaganda. I've even read a recent article which presumed itself very scientifically focused stating that C# has already had it best moment, but would soon fall into oblivion.
To guide those that are beginning and that, differently from expert programmers, are concerned with what will continue to be available in 3 or 4 years from now, when they finally get productive, what do you consider to be the future of C# and Java? What is real about C# portability? What does Android java code translation, Mono, ISO standardization really mean in terms of tendencies? What about performance and graphics? Is there any engine like Unity for Java use? Will it ever be? What about future development? Some say that Java has been slower than C# in that aspect, others say that new languages based on the JVM make Java environment more worth learning.

I would like to listen to informed point of views. Analysis by those that really know about what they are talking about, not fanboy talks and propaganda. This would be very useful, not only for me, but for thousands of others that are reading through the multiple forum threads which only bring further confusion.

Share this post


Link to post
Share on other sites
Advertisement
Trying to be as un-flame-war like as possible:


Synthesizing, much of what is said seem like myths, uninformed points of view, fanboy talk or biased propaganda.


This is largely true, though your bullet points are largely correct.


what do you consider to be the future of C# and Java?


Java has been effectively abandoned, and is largely crippled by its lack of good generic and functional programming support.
C# is starting to show its age, where it's difficult to improve upon it more.
I suspect that both will remain the top two most used general purpose programming languages in 3-4 years, though their relative popularity will decrease; Java's faster than C#.


What is real about C# portability?


C# can be ported and it has gotten a lot better due to mobile platform motivations, but the cutting edge and best support will for the foreseeable future be on windows. That said, beginners care about portability WAY more than they should.


As for the other questions, they're vague or outside of what I can speak to. C# is fast enough, and generally, so is Java. Java has worse support for games in general, and I expect that trend to continue. Edited by Telastyn

Share this post


Link to post
Share on other sites
Ultimately, Java or C# or C++ do not matter. You really should consider programming languages as musical instruments, and you use them to play your music. Some instruments work better for certain types of music. But just like any other good musicians, a programmer must learn how to play not just one instrument, but several. Depending on what music he wants to play, what mood he wants to convey, he picks up the right instrument and play it like a maestro.

Since you are a beginner, pick one. Java or C# really does not matter. C# has XNA for games. Java, on the other hand, has plenty of 3rd party libraries, but also allows you to make games for Android. Pick your platform (XNA or mobile), then start learning.

Share this post


Link to post
Share on other sites

Ultimately, Java or C# or C++ do not matter. You really should consider programming languages as musical instruments, and you use them to play your music. Some instruments work better for certain types of music. But just like any other good musicians, a programmer must learn how to play not just one instrument, but several. Depending on what music he wants to play, what mood he wants to convey, he picks up the right instrument and play it like a maestro.


It seems like musicians have a speciality though like Yo-Yo Ma.


Since you are a beginner, pick one. Java or C# really does not matter. C# has XNA for games. Java, on the other hand, has plenty of 3rd party libraries, but also allows you to make games for Android. Pick your platform (XNA or mobile), then start learning.
[/quote]

Picking one makes sense, but I think the decision matters and depending on the person could see them deciding to focus on C# or Java. If I were forced to pick between those two I think I'd pick C#. The performance of this compression library on different languages is kind of interesting. Edited by wood_brian

Share this post


Link to post
Share on other sites

[quote name='alnite' timestamp='1342634973' post='4960580']
Ultimately, Java or C# or C++ do not matter. You really should consider programming languages as musical instruments, and you use them to play your music. Some instruments work better for certain types of music. But just like any other good musicians, a programmer must learn how to play not just one instrument, but several. Depending on what music he wants to play, what mood he wants to convey, he picks up the right instrument and play it like a maestro.


It seems like musicians have a speciality though like Yo-Yo Ma.
[/quote]

Of course, just as there are programmers who only code in C++, ASM, Cobol, Java and nothing else. It's a matter of preference. But even Yo-Yo Ma, I'm pretty sure, has played other instruments before settling on the cello.




Since you are a beginner, pick one. Java or C# really does not matter. C# has XNA for games. Java, on the other hand, has plenty of 3rd party libraries, but also allows you to make games for Android. Pick your platform (XNA or mobile), then start learning.
[/quote]

Picking one makes sense, but I think the decision matters and depending on the person could see them deciding to focus on C# or Java. If I were forced to pick between those two I think I'd pick C#. The performance of this compression library on different languages is kind of interesting.
[/quote]

At this early stage, any performance benchmark doesn't matter. Why is he going to do now, write an algorithm computing 1 billion data points for secret military operations in Nevada? Think about it in utility sense. Java and C# are probably two languages that are the closest to one another in term of the syntax. The main differences between the two of them are the platforms they are typically used for. Now the question becomes which platform that the OP is most comfortable in. Choosing one does not mean that he's stuck at that for the rest of his life. Choosing C# does not mean "Oh no, Windows forever! Apple is getting popular! I can't switch anymore!" Choosing Java does not make you are a slave to JVMs. He can be learning C# now and switch to Java 2 years later, or vice versa. Can't you see how trivial choosing a language is, especially between C# and Java? Edited by alnite

Share this post


Link to post
Share on other sites

[quote name='alnite' timestamp='1342634973' post='4960580']
Ultimately, Java or C# or C++ do not matter. You really should consider programming languages as musical instruments, and you use them to play your music. Some instruments work better for certain types of music. But just like any other good musicians, a programmer must learn how to play not just one instrument, but several. Depending on what music he wants to play, what mood he wants to convey, he picks up the right instrument and play it like a maestro.


It seems like musicians have a speciality though like Yo-Yo Ma.
[/quote]

I think it was a bad analogy, I'd look at it more like tools in general, a carpenter won't use a hammer to divide a board in 2 parts, he'll use the saw (And if you see a carpenter trying to bang a nail in with a saw, well... either he is a programmer who thinks one tool is all you need or he is insane) Edited by SimonForsman

Share this post


Link to post
Share on other sites


I think it was a bad analogy, I'd look at it more like tools in general, a carpenter won't use a hammer to divide a board in 2 parts, he'll use the saw (And if you see a carpenter trying to bang a nail in with a saw, well... either he is a programmer who thinks one tool is all you need or he is insane)


I thought of using that analogy, but I think it's slightly inaccurate. You can't properly cut a board with a hammer, but any programming language can be used to make almost all sorts of applications. Both Java and C# can be used to make games. They both can accomplish the same thing. So I avoid using the tools analogy, as I don't want to imply that different languages are used for different things. Other programming languages might fall into that category, such as Ruby/PHP/Javascript for web development, but at least, not these two.

Share this post


Link to post
Share on other sites

We receive answers like "language doesn't matter, learn algorithms, design principles, oop structure, etc", or "after learning java you'll jump to C# easily".

Like others said before, spot on. The language difference of C# and Java is trivial.

My advise is: start with one and if you feel comfortable with it, go to the other. After that, make applications with both languages.

Looking at other "beginner" programmers, the jump from your first language to the second is never easy. I think it's actually very frustrating but it is an important step to make. You'll learn a new Framework with different tools and implementation for the same job. You will see first hand the difference between design principles and their pros and cons. You will make jumps to different languages, frameworks and toolsets in your life as a programmer. Don't choose between the two languages, chances are, with so popular languages like java and c#, that later on you'd have to make an application in the other language anyways. And if not, your third jump will be easier. My advice is that after C# and/or java you move on to C++. So you will learn what the JRE and the .Net Runtime Engine are hiding from you.


Java's faster than C#.

Nope.
In Windows, the .Net Framework is closer tied to the Operating System. A Windows Computer should generally execute a C# Program faster than a Java Program. Especially Window programming has less overhead for its operations in C#.
Now to make things more complex, Java has a badass runtime optimisation. Compare the calculation times of a simple algorithm like Selection sort, after the third run or so your algorithm will run at least *2 faster.
I saw benchmarks on Linux machines, Java was there a bit faster than C# Mono. On a Windows computer, my money would be on C# for most applications.


...

can only subscribe to what you said, very good posting

Final note on C# VS Java...
if your task is to create a Window in a Microsoft enviroment, take C#. There is the greatest strength of .Net / the biggest weakness of the Java Framework.
For any other task your choice depends on the job and the enviroment.

Share this post


Link to post
Share on other sites

Telastyn, on 18 July 2012 - 11:03 AM, said:

Java's faster than C#.


This is taken out of context. If you re-read, you'll see that I said that Java's relative popularity will decrease faster than C#'s.


Nope.
In Windows, the .Net Framework is closer tied to the Operating System. A Windows Computer should generally execute a C# Program faster than a Java Program. Especially Window programming has less overhead for its operations in C#.
[/quote]


This is entirely incorrect. The .NET windowing API is closer to windows, meaning less adaptation overhead (maybe). That's the standard library, not the runtime. Java could've made (essentially) the same windowing API to get the same level of overhead.


Now to make things more complex, Java has a badass runtime optimisation. Compare the calculation times of a simple algorithm like Selection sort, after the third run or so your algorithm will run at least *2 faster.
I saw benchmarks on Linux machines, Java was there a bit faster than C# Mono. On a Windows computer, my money would be on C# for most applications.
[/quote]

.NET has the same sort of runtime optimizations (except on system types, which are pre-compiled in Microsoft's implementation).


Quit spreading misinformation. Edited by Telastyn

Share this post


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

  • Advertisement
  • Advertisement
  • Popular Tags

  • Similar Content

    • By D34DPOOL
      Edit Your Profile D34DPOOL 0 Threads 0 Updates 0 Messages Network Mod DB GameFront Sign Out Add jobEdit jobDeleteC# Programmer for a Unity FPS at Anywhere   Programmers located Anywhere.
      Posted by D34DPOOL on May 20th, 2018
      Hello, my name is Mason, and I've been working on a Quake style arena shooter about destroying boxes on and off for about a year now. I have a proof of concept with all of the basic features, but as an artist with little programming skill I've reached the end of my abilities as a programmer haha. I need someone to help fix bugs, optomize code, and to implent new features into the game. As a programmer you will have creative freedom to suggest new features and modes to add into the game if you choose to, I'm usually very open to suggestions :).
      What is required:
      Skill using C#
      Experience with Unity
      Experience using UNET (since it is a multiplayer game), or the effort and ability to learn it
      Compensation:
      Since the game currently has no funding, we can split whatever revenue the game makes in the future. However if you would perfer I can create 2D and/or 3D assets for whatever you need in return for your time and work.
      It's a very open and chill enviornment, where you'll have relative creative freedom. I hope you are interested in joining the team, and have a good day!
       
      To apply email me at mangemason@yahoo.com
    • By davejones
      Is there a way to automatically change the start position of an animation? I have a bunch of animations set up on 3D models in unity. The issue is that I need to move the 3D models, however when I do so the animation start positions are not updated and I have to do it manually.

      Changing the transform of key frames is time consuming with the amount of animations I have, so I was wondering if there was a way to do it automatically?
    • By MoreLion
      hey all! We are looking for members for our Unity horror game! 
      Here’s the story:
      After a deadly virus plunges the world into chaos killing 85% of the human population there are now what they call “zones” these zones are watched very closely by the surviving government, people are checked every day for the virus, even if you touch the spit or any human waste or fluids of the victim who is infected, you will die. But one day, people in the west zone start to go missing, 1 woman goes outside the walls to uncover the mystery, is there more to the virus than meets the eye?, That is where your story starts.
      This game is not a long development game, I have loads other game ideas,
      I will also allow you to have a bit of creative freedom if you wish to add or share a idea!
      And no, it’s not a zombie game lol I feel like zombie games are too generic, in this game you will encounter terrifying beasts!
      There is some concept art one of our concept artists have made
      If interested email liondude12@gmail.com
    • By Canadian Map Makers
      GOVERNOR is a modernized version of the highly popular series of “Caesar” games. Our small team has already developed maps, written specifications, acquired music and performed the historical research needed to create a good base for the programming part of the project.

      Our ultimate goal is to create a world class multi-level strategic city building game, but to start with we would like to create some of the simpler modules to demonstrate proof of concept and graphical elegance.

       

      We would like programmers and graphical artists to come onboard to (initially) create:

      A module where Province wide infrastructure can be built on an interactive 3D map of one of the ancient Roman Provinces.
      A module where city infrastructure can be built on a real 3D interactive landscape.
      For both parts, geographically and historically accurate base maps will be prepared by our team cartographer. Graphics development will be using Blender. The game engine will be Unity.

       

      More information, and examples of the work carried out so far can be found at http://playgovernor.com/ (most of the interesting content is under the Encyclopedia tab).

       

      This project represents a good opportunity for upcoming programmers and 3D modeling artists to develop something for their portfolios in a relatively short time span, working closely with one of Canada’s leading cartographers. There is also the possibility of being involved in this project to the point of a finished game and commercial success! Above all, this is a fun project to work on.

       

      Best regards,

      Steve Chapman (Canadian Map Makers)

       
    • By Scouting Ninja
      So I have hundreds of moving objects that need to check there speed. One of the reasons they need to check there speed is so they don't accelerate into oblivion, as more and more force is added to each object.
      At first I was just using the Unity vector3.magnitude. However this is actually very slow; when used hundreds of times.
      Next I tried the dot-product check:  vector3.dot(this.transform.foward, ShipBody.velocity) The performance boost was fantastic. However this only measures speed in the forward direction. Resulting in bouncing objects accelerating way past the allowed limit.
       
      I am hoping someone else knows a good way for me to check the speed with accuracy, that is fast on the CPU. Or just any magnitude calculations that I can test when I get home later.
       
      What if I used  vector3.dot(ShipBody.velocity.normalized, ShipBody.velocity)?
      How slow is it to normalize a vector, compared to asking it's magnitude?
    • By Ds ds
      Hi, my name is Andres, I'm a programmer with a technician degree and a Diploma in C#, looking for a project in Unity to start my career in game development. I don't do it for a paid but a recognition and start a portfolio, preferably a 2D game. Thanks for read, have a nice day. 
       
    • By Victor Rodriguez
      Hi there! Is the first time that I'm posting here so I'm sorry if I'm doing it wrong ha. 
      So here it comes, my doubt is, I'm doing a game with different levels, each of these levels in one different scene. Each scene contains to cameras that you can change pressing a button. Everything works fine. 
      The only problem is that I would like it to look a bit more professional, and I would like that if you finish the level with camera2, the next level start the same way. I've been thinking about using dontdestroyonloadon both cameras, but obviously this cameras need to be attached to the player to make the movement work, what do you recommend? Sorry If I've explained it in a messy way, and feel free to dm me for anything. Thanks in advance! 
    • By Ike aka Dk
      Hello everyone 
      I am a programmer from Baku.
      I need a 3D Modeller for my shooter project in unity.I have 2 years Unity exp.
      Project will paid when we finish the work 
      If you interested write me on email:
      mr.danilo911@gmail.com
    • By markoal
      Hi,
      I'm Unity developer from Croatia and I'm looking to work on the paid project in my spare time.
      I have 5+ years of experience in Unity and I'm familiar with almost anything, including all platforms (also Switch, PS4 and Xbox).
      Feel free to contact me.
    • By bartekm777
      Hello
      About me
      Lvl 28   Programmer (day job: non-gamedev-programmer, making games as a hobby for about 2 years) Some vector art experience - tried to make some assets on my own using vector software and scripts   Some design experience (designing my own games ) About game
      Turn-based fantasy rpg inspired by games like Heroes 3 (also WoG mod), NEO Scavenger, Battle Brothers I would like to create easy to use editor for creating custom scenarios (similar to the one from Heroes 3) World and story are clean slate, I did some drafts but I'm not good at it so it's possibly subject to change I decided to create graphics using vector software + scripts to make it faster (rpg's tend to have lots of assets), also it's more precise and easier to create tileable graphics (for example: rivers, paths) No sound/music work has been done yet Who do I look for?
      Definitely someone with 2d art skills  I would like to focus more on programming 2D animator (skletal animations are preferred) Additional programmer could make development faster Someone for creating sounds/music/both It's a hobby project, I work on it in my free time. In case the project make it to the finish line and get shipped  - I can offer rev-share  
      Below should be few screens of what I already did (about 2 months of work) - some graphics, editor prototype screenshot and game prototype screenshot




  • Advertisement
  • Popular Now

  • Forum Statistics

    • Total Topics
      631359
    • Total Posts
      2999545
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!