9 Replies - 421 Views - Last Post: 28 February 2018 - 07:03 PM

#1 Lyzone   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-January 18

Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 08:42 AM

Hi. I'm new to programming and was recently told that C# is a good starting place if I want to start learning how to develop games in a few months, rather than java. What are some advantages java has over c# in this category, vice versa?
Is This A Good Question/Topic? 0
  • +

Replies To: Java's advantages over C#? (Vice Versa)

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14097
  • View blog
  • Posts: 56,497
  • Joined: 12-June 08

Re: Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 08:59 AM

C# is super similar to Java in syntax so that's a plus.
C# works well with the major game engines like Unity, Unreal, and CryEngine.
C# can also be used in making websites with ASP.NET/Core2.
C# can also be used to make desktop applications.
C# can be used with Xamarin to make mobile apps.


You can also read things like this:
https://en.wikipedia..._Sharp_and_Java
https://msdn.microso...y/ms836794.aspx
https://blog.takipi....o-have-in-java/
http://lmgtfy.com/?q=c%23+vs+java
Was This Post Helpful? 1
  • +
  • -

#3 Lyzone   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-January 18

Re: Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 09:05 AM

Can you recommend some good C# tutorials?
In Java I had finished caveofprogramming's tutorials up to "the toString method", but I have also done functions, and when told how something works and given a few hours, can figure it out. Not really that big of an accomplishment considering a lot of people have, just stating my experience.
I don't want to completely start over but I don't want to not know the syntax.
Also, what's a good IDE for C#?
Thanks! :)/>

This post has been edited by Skydiver: 26 February 2018 - 06:41 PM
Reason for edit:: Removed unnecessary quote. No need to quote the post above yours.

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14097
  • View blog
  • Posts: 56,497
  • Joined: 12-June 08

Re: Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 09:09 AM

C# tutorials can be found above. They can also be found on Microsoft's doc site MSDN. There is also a wealth of books on the topic.
Typically the IDE of choice is Visual Studios.
Was This Post Helpful? 0
  • +
  • -

#5 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1281
  • View blog
  • Posts: 4,090
  • Joined: 12-May 09

Re: Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 09:45 AM

C# is definitely more entrenched in games. I actually can't think of any advantages Java (or any JVM language today) has in this category. It can be done with Java but a lot of the professional engines are going to be C# (or maybe C++).
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6221
  • View blog
  • Posts: 21,473
  • Joined: 05-May 12

Re: Java's advantages over C#? (Vice Versa)

Posted 25 February 2018 - 09:34 PM

If you are targeting specifically Android games, then Java may have a slight advantage simply because Java is the preferred language for Android. Using C# with Xamarin will have some inherent overhead, but depending on the type of game, probably not noticeable (unless you are to the level of counting CPU cycles and battery usage).
Was This Post Helpful? 0
  • +
  • -

#7 Lyzone   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-January 18

Re: Java's advantages over C#? (Vice Versa)

Posted 26 February 2018 - 03:12 PM

Do you have any videos on CPU usage differences between languages?
Also, videos on battery usage and counting cpu cycles would be nice.
I've always been a "computer hardware" guy who can put computers together and can take them apart, but I've never really tried to understand how they actually work.

This post has been edited by Skydiver: 26 February 2018 - 06:39 PM
Reason for edit:: Removed unnecessary quote. No need to quote the post above yours.

Was This Post Helpful? 0
  • +
  • -

#8 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12318
  • View blog
  • Posts: 45,417
  • Joined: 27-December 08

Re: Java's advantages over C#? (Vice Versa)

Posted 26 February 2018 - 04:56 PM

Quote

Do you have any videos on CPU usage differences between languages?


These are not worthwhile metrics to compare. Computers are powerful enough, where this metric amounts to splitting hairs. If it gets to a point where you are pushing the hardware's limits (in either language), then you need a more efficient algorithm or more/better hardware.

This post has been edited by macosxnerd101: 26 February 2018 - 04:57 PM

Was This Post Helpful? 0
  • +
  • -

#9 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6221
  • View blog
  • Posts: 21,473
  • Joined: 05-May 12

Re: Java's advantages over C#? (Vice Versa)

Posted 26 February 2018 - 06:38 PM

If I recall the numbers correctly, C# code typically claims a 5-15% slower (read more overhead) compared to equivalent C++, but there are some cases where the JIT compiler in combination with the CLR can actually be 100-200% times faster than C++. This survey was done by Microsoft Research around the .NET Framework 2.0 days over a large variety of code bases with different problem spaces.

I've not heard any numbers bandied around regarding Java vs. C++ -- probably because I don't haunt the Java circles enough as opposed to nobody publishing the research.

If you can get the Java vs C++ numbers, and then compare with C# vs. C++ numbers, then you'll have a rough estimate of Java vs. C#.
Was This Post Helpful? 0
  • +
  • -

#10 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6221
  • View blog
  • Posts: 21,473
  • Joined: 05-May 12

Re: Java's advantages over C#? (Vice Versa)

Posted 28 February 2018 - 07:03 PM

Yikes! I read from Wikipedia that Java can be up to 10 times slower that C++ according to Google's research in 2011, while another study claims about 1.09 to 1.91 times slower. (Be aware that the latter study was using the server version of the JVM which has more aggressive compilation optimizations and consequently even slower startup time as compared to the desktop JVM.)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1