Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  Java vs. C#  (Read 9117 times)
0 Members and 1 Guest are viewing this topic.
Offline CodeBunny

Senior Devvie


Medals: 4
Projects: 3



« Posted 2011-09-25 12:06:14 »

So for a college class I'm doing my first coding in C#. It's a strange language, and I'm not quite sure what I think... there are aspects I both do and don't like. On the whole, I don't think it's as good as Java, but I'm still not 100% decided on my stance.

For all of you who've done some work in C#, what's your opinion? How does it stack up against Java?
Offline Cero
« Reply #1 - Posted 2011-09-25 12:11:32 »

It's a copy of microsoft, as they copy everything successful.
Also windows only. Of course it is possible somehow to program for other OS's, but obviously MS wouldn't want that.

I just laugh at it.

Unless I'm gonna port a game to XNA / XBLA, not going to use it   D:

Offline CodeBunny

Senior Devvie


Medals: 4
Projects: 3



« Reply #2 - Posted 2011-09-25 12:15:08 »

I agree, it's Microsoftyness and single-platformness are definite downsides. My question was more to ask "What features of C#, if any, would you like added to Java?"

Also, "Are there any aspects of the syntax of C# that you prefer to those of Java?"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JL235

JGO Coder


Medals: 10



« Reply #3 - Posted 2011-09-25 13:14:11 »

It's a copy of microsoft, as they copy everything successful.
It's such a childish thing to claim. C# is packed with features that Java doesn't have, such as LINQ, (proper) unsafe code and asynchronous methods. C# also got WPF, whilst Java is still waiting on a half-decent version of JavaFX. Lets not forget that Java is getting lambdas after C#, and is copying the syntax.

But does anyone really care?

Also windows only. Of course it is possible somehow to program for other OS's, but obviously MS wouldn't want that.
Again, if you just did research you'd know this isn't true.

Mono is pretty stable on Linux, and has never been threatened by MS, ever. Microsoft have even standardized C# and parts of .NET as ECMA standards, released under licenses which make it perfectly legal to implement them, which in turn helps Mono development. They did not have to do these things. MS even helped to implement Moonlight.

Personally, if your building for Windows, then use C#, especially if your building an application because WPF is truly brilliant. If you building for non-Windows, then use Java. With XNA you can also target Silverlight, as well as XBox and PC. This will mean you could also build your game as a Metro app, and release it in the Windows store.

One of the main issues with Java is around the game libraries. Only a couple (LWJGL and JMonkey) are actively developed, the rest either get occasional updates (like JOGL) or are simply old and left to die (Java 3D). On the flip side, game development with C# is far more active, and has far bigger ecosystems. For example there are more books on using XNA, then there are game development books on Java. You'll find more tutorials, frameworks, communities, libraries and games relating to C# then Java.

But ultimately my advice would be to 1) work out what exactly it is you want to build, and 2) try them both out for yourself.

Offline Spasi
« Reply #4 - Posted 2011-09-25 13:49:38 »

the rest either get occasional updates (like JOGL)

Sorry for the OT, but I keep seeing this lately. It's not true and I wonder why it's been repeated so much. JOGL and the other JogAmp projects are updated much more frequently than LWJGL, on a daily basis even. Sven and Michael have put so much work in it and it's unfair to keep reading things like JOGL's been abandoned and stuff.
Offline JL235

JGO Coder


Medals: 10



« Reply #5 - Posted 2011-09-25 14:17:49 »

the rest either get occasional updates (like JOGL)

Sorry for the OT, but I keep seeing this lately. It's not true and I wonder why it's been repeated so much. JOGL and the other JogAmp projects are updated much more frequently than LWJGL, on a daily basis even. Sven and Michael have put so much work in it and it's unfair to keep reading things like JOGL's been abandoned and stuff.
Ok, then I stand corrected.

But even on that point alone, there are still more DirectX bindings for C#, then there are OpenGL bindings for Java. That doesn't include the OpenGL alternatives for C#, and you can even use DirectX and OpenGL directly, which you cannot do with Java. This shows how C# game development is much more active.

Offline princec

« JGO Spiffy Duke »


Medals: 423
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2011-09-25 16:24:06 »

C# got XNA. And Mono. So C# is all the places Java simply can't be. Sucks.

Cas Smiley

Offline pjt33
« Reply #7 - Posted 2011-09-25 16:28:29 »

C# has basic coroutine support, which is quite nice (provided you understand the caveats); and I'm a fan of extension methods (although I find that I need to use them more than I should because of some obvious errors in the library design). The using keyword is a nice piece of syntax sugar, and so is event (although it could be done better).

My projects use .Net 3.5, so I'm not familiar with the changes to the type system in 4. In 3.5 the type system is behind Java's when it comes to generics. And the biggest gripe I tend to have is bizarre choices in the library design. I'm not at all convinced by the merging of input and output streams into a single Stream, and the design of System.Security.Cryptography with the same object serving as key and cipher object is baffling. (Mind you, I'm moving towards using BouncyCastle, which has been ported from Java, for preference). And if you look at the collections, why is AddRange declared in List rather than ICollection?
Offline Chromanoid

Junior Devvie


Medals: 3



« Reply #8 - Posted 2011-09-25 16:51:37 »

WPF is very nice. It can get complex with proper use of the MVVM pattern and IoC...
I think Java is simpler and easier to understand when it comes to big projects.
Offline sproingie

JGO Kernel


Medals: 202



« Reply #9 - Posted 2011-09-25 19:07:16 »

Between Java and C#, I give Java the edge for libraries, and C# gets the point for the language features.

Neither of them hold a candle to Scala though.  You want well-designed type system and collections, you just can't do better, and it has enough syntax sugar to give you diabetes.  There's a .NET target for scala, but it's always lagging behind.


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #10 - Posted 2011-09-25 21:30:42 »

C# is fine, but it's a closed platform. I'm not interested in learning any language which doesn't work across different operating systems and architectures. Life is too short for that crap.

Mono is lagging behind and far from being complete.

弾幕 ☆ @mahonnaiseblog
Offline ReBirth
« Reply #11 - Posted 2011-09-26 03:48:12 »

Java is free, C# not. That's answer everything.

Offline Roquen
« Reply #12 - Posted 2011-09-26 05:54:03 »

Dirt is free and food is not...that kind of thing?
Offline Scarzzurs
« Reply #13 - Posted 2011-09-26 06:46:47 »

I've been using C# for a few Unity3d projects so far and the more I use it and learn about it, the more I think it is bloated.
It has some nice features here and there, but there's so many and a lot of overlap.
Reading through C# libraries seems quite hard as well, as everything is done in unique ways.
Also, I find myself writing worse code in C#. My choices seems to be based on how short I can write things, rather than readability.

If Unity3d supported Java, there would be no reason for me to use C#...

That being said, you should probably ask the question in a more neutral forum, if you want fair answers. Or perhaps ask in both camps for fairness :-)

- Scarzzurs

My games and Projects:
BlastingPixels.com,
Old website
Offline pitbuller
« Reply #14 - Posted 2011-09-26 06:50:19 »

Dirt is free and food is not...that kind of thing?

But fair comparison would be Pepsi vs Coke. If another is free and you can drink it every country and other cost money to drink and do not open on some side of worlds. There might be some flavor difference but those who want free drinks don't care flavor that much.
Offline JL235

JGO Coder


Medals: 10



« Reply #15 - Posted 2011-09-26 07:41:54 »

Dirt is free and food is not...that kind of thing?

But fair comparison would be Pepsi vs Coke. If another is free and you can drink it every country and other cost money to drink and do not open on some side of worlds. There might be some flavor difference but those who want free drinks don't care flavor that much.
But flavor IS how people decide what to drink. Also if I never go to the other side of the world, then does it really matter if it is/isn't available there?

Either way, C# is free in the sense that you don't pay any money to use it, which is most people's definition of 'free'. It's not free in the sense that you cannot alter it's insides, and hit compile. But how often has anyone wanted to do that with Java? and is that a requirement when building a game?

Offline gouessej
« Reply #16 - Posted 2011-09-26 07:56:45 »

Mono is pretty stable on Linux, and has never been threatened by MS, ever. Microsoft have even standardized C# and parts of .NET as ECMA standards, released under licenses which make it perfectly legal to implement them, which in turn helps Mono development. They did not have to do these things. MS even helped to implement Moonlight.
Mono is not really stable on Linux. Moonlight is even worse. I don't like to watch TV, my girlfriend wanted to use Moonlight to watch a tennis match and this thing froze my browser several times. I mentioned an excellent diagram which shows the numerous differences between Microsoft .NET and Mono implementation, it cannot be compared to Java, even OpenJDK and Oracle JVM are closer than Mono & Microsoft .NET.

Of course, ClickOnce only works on Microsoft .NET which is less interesting than our (buggy) Java Web Start, IzPack and GetDown.

One of the main issues with Java is around the game libraries. Only a couple (LWJGL and JMonkey) are actively developed, the rest either get occasional updates (like JOGL) or are simply old and left to die (Java 3D). On the flip side, game development with C# is far more active, and has far bigger ecosystems. For example there are more books on using XNA, then there are game development books on Java. You'll find more tutorials, frameworks, communities, libraries and games relating to C# then Java.
This is simply disgusting. Ardor3D is actively developed like JGame, Slick, Libgdx, etc... Java3D has had only a few maintenance loads and is dying but JogAmp is actively maintained (LWJGL too). Maybe there are more books but I disagree with you about tutorials, there are far more resources in Java than in C# and not only about gaming. The real lack is in WYSIWYG editors, only MMF2 partially supports applets, JMonkeyEngine 3 has a GDE (integrated Game Development Environment).

C# cannot be compared with Java in terms of licenses. OpenJDK works better than a few years ago, I use it daily whereas I didn't dare to do it in 2009. I like free open source softwares Smiley

I would prefer C# to give some of its features, I still don't like lambdas, closures and their friends. Yes, both languages have diverged but C# was mainly a clone of Java created after the death of Visual J++. Don't forget that Java itself has its bytecode inspired of Microsoft P code... Microsoft and Sun Microsystems copy  Smiley

Edit.: The main C# binding of OpenGL (contained in OpenTk) is 70% slower than JOGL  Cool

Offline Roquen
« Reply #17 - Posted 2011-09-26 08:18:22 »

Dirt is free and food is not...that kind of thing?

But fair comparison would be Pepsi vs Coke. If another is free and you can drink it every country and other cost money to drink and do not open on some side of worlds. There might be some flavor difference but those who want free drinks don't care flavor that much.

A cola analogy is not bad.  A small number of people prefer one over the other based on taste and the rest have an irrational preference.

Like it or not, the last time I looked windows had around 91% of the market.  So for 91% of users, C#/.NET is effectively free.  So the whole "free" argument is pretty weak.  From a technical standpoint C# and .NET are superior to Java/JVM.  Note that I'm not talking about any specific implementation but the design.

For most beginning to intermediate programmers the choice really doesn't matter.  Once you learn one picking up the other will be pretty easy.
Offline nsigma
« Reply #18 - Posted 2011-09-26 08:48:39 »

But fair comparison would be Pepsi vs Coke.

I'm an ubuntu man myself.  Grin

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline pitbuller
« Reply #19 - Posted 2011-09-26 09:55:18 »

I don't like Java that much but I do like Eclipse. Good IDE can raise my productivity by big margin and that is all what matters.
Offline CodeBunny

Senior Devvie


Medals: 4
Projects: 3



« Reply #20 - Posted 2011-09-26 10:58:12 »

Quote
Reading through C# libraries seems quite hard as well, as everything is done in unique ways.
Also, I find myself writing worse code in C#. My choices seems to be based on how short I can write things, rather than readability.

This is essentially my experience so far, as well.

Quote
I don't like Java that much but I do like Eclipse. Good IDE can raise my productivity by big margin and that is all what matters.
There are plugins that let you work with other languages, you know.
Offline OverKill

Junior Devvie




Java games rock!


« Reply #21 - Posted 2011-09-26 12:22:13 »

I've been using C# for a few Unity3d projects so far and the more I use it and learn about it, the more I think it is bloated.
It has some nice features here and there, but there's so many and a lot of overlap.
Reading through C# libraries seems quite hard as well, as everything is done in unique ways.
Also, I find myself writing worse code in C#. My choices seems to be based on how short I can write things, rather than readability.
This is exactly the thing wrong with C#, they took Java and tried to throw in all kinds of features.
Now that C# is going down, they want to do the same with features for Java because, wait for it ... C# has them as well. /facepalm

Now besides that, people should take the tool best suited for their needs. If you need gui stuff, take what works best.
It makes no sense to take Java for a GUI just because your server code is based on Java! Same vice versa.
Offline Cero
« Reply #22 - Posted 2011-09-26 13:31:23 »


I would buy that.

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #23 - Posted 2011-09-26 16:12:47 »

But flavor IS how people decide what to drink. Also if I never go to the other side of the world, then does it really matter if it is/isn't available there?

Kinda agree.

Either way, C# is free in the sense that you don't pay any money to use it [...]

Except that you do have to pay money for it.

Windows on your desktop, Windows on your server, Visual Studio, ReSharper...

Want to use more cores or more RAM? Gotta pay some more.

Another server? Pay again.

End users who already bought Windows don't need to pay extra to run C# programs of course. That's vendor lock-in magic.

弾幕 ☆ @mahonnaiseblog
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #24 - Posted 2011-09-26 17:09:12 »

Mostly the same. You can jump in and out of each with a minimum of fuss. It really all depends on where you're trying to deploy. But C# being developed by a company that has its own console and actively pushes games is a big thing for us game devs. XNA and the like only get more mature, whereas Oracle/Sun have been shying away from games for years and years. It is only through the heroic efforts of individual people developing open source libraries (LWJGL, JOGL, jME) that Java can even compete.

But they're pretty much the same at this point, for all purposes 99% of the people on this forum will care about.

See my work:
OTC Software
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #25 - Posted 2011-09-26 18:33:50 »

XNA and the like only get more mature, whereas Oracle/Sun have been shying away from games for years and years.
Have you seen XNA recently? MS screwed it over because they decided that XNA would be the preferred platform for writing Windows Mobile apps. That means it suddenly lost a bunch of functionality because of it's lowest-common-denominator approach.

Combine that with it's ridiculous straight-jacketed resource pipeline that couples with Visual Studio in all the wrong ways, so you end up having to use the regular file io operations to write something sane to use instead. Which then means you can't run on 360 or Windows Mobile, and you've forfeited one of the main reasons for using it in the first place.

Not to say it's still not usable, but it's not shiny happy wonderful gamedev land over there either.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #26 - Posted 2011-09-26 18:36:42 »

XNA and the like only get more mature, whereas Oracle/Sun have been shying away from games for years and years.
Have you seen XNA recently? MS screwed it over because they decided that XNA would be the preferred platform for writing Windows Mobile apps. That means it suddenly lost a bunch of functionality because of it's lowest-common-denominator approach.

Combine that with it's ridiculous straight-jacketed resource pipeline that couples with Visual Studio in all the wrong ways, so you end up having to use the regular file io operations to write something sane to use instead. Which then means you can't run on 360 or Windows Mobile, and you've forfeited one of the main reasons for using it in the first place.

Not to say it's still not usable, but it's not shiny happy wonderful gamedev land over there either.
I haven't seen it lately, no. That's lame to hear. I knew it was basically just a bunch of frameworks for making games, not some magic happy place, but still...

See my work:
OTC Software
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #27 - Posted 2011-09-26 18:39:32 »

Oh, and I forgot the final kick in the teeth - MS don't support old versions of XNA and don't want you using them, so the SDK installs auto-destruct after certain dates to force you into using the latest and greatest. So you can't even install the pre-windows-mobile version of XNA because it doesn't work any more. Shocked

This is not widely publicised.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline gouessej
« Reply #28 - Posted 2011-09-26 19:14:03 »

From a technical standpoint C# and .NET are superior to Java/JVM.  Note that I'm not talking about any specific implementation but the design.
Why? C# is slower, .NET is less cross-platform, why would we consider it is technically superior? The languages which have the most features are not necessarily the best languages in my humble opinion. Look at C++, it has become too complicated, who really knows how to use all kind of pointers? How is able to read any C++ code?

Offline sproingie

JGO Kernel


Medals: 202



« Reply #29 - Posted 2011-09-26 22:26:15 »

These arguments against the "complexity" of language features were made long and loud about:

  • Type systems
  • Garbage collection
  • Objects


Pages: [1] 2 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (71 views)
2014-11-26 15:22:04

toopeicgaming1999 (60 views)
2014-11-26 15:20:36

toopeicgaming1999 (14 views)
2014-11-26 15:20:08

SHC (27 views)
2014-11-25 12:00:59

SHC (25 views)
2014-11-25 11:53:45

Norakomi (31 views)
2014-11-25 11:26:43

Gibbo3771 (25 views)
2014-11-24 19:59:16

trollwarrior1 (38 views)
2014-11-22 12:13:56

xFryIx (77 views)
2014-11-13 12:34:49

digdugdiggy (55 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!