comparing java/lwjgl and c#/xna...

i took a peek at lwjgl, and i took a peek at xna, and i have some questions comparing them…

  1. which gives better performance, like better frame rates
  2. which one is easier, like in general?
  3. what are pros of lwjgl?
  4. what are pros of xna?
  5. what has a better user base?

thanks ;D

this is quite a complex thing to make comparison between a baby and an old man. Java is the very last language appeared in the last ten years where C# has more than 20 years of background with its C-base-architecture. When Java entered in the world of public development as well as commercial releases on various modern platforms, C codes have built the Windows and all of the top-level applications, which is now the problem for industrials to make the switch over Java2.
If I were able to get myself into one of those huge entertainment societies like Micros…t or So…y , I’d be proud to annouce my new XBOX or Playstation while the poor Java2 does manage to get with the brand new No…a cellphone. Whatever the question is, I woudn’t even try to make this comparison between 2 generations … By the way, I had the choice to study both of C and Java, but my choice was to have the more scalable one to my knowledge, that is, Java… :-X

[quote=“broumbroum,post:2,topic:30544”]
:o

C# =~= Java, nothing to do with C or C++ (at least not anymore than Java has to do with C and C++)

C# and Java are very similar as a language, C# is in fact much more like java than it is like C.
Both are OO languages, with single class inheritence/multiple inheritence through interfaces, both run on a VM, both have GC, etc.etc.
As for performance, C# and Java are comparable. As a language, while I see some advantages of C#, I still prefer Java as I feel it’s cleaner and simpler. C# seems to me less focused than Java, as if it can’t decide if it wants to please C++ developers, Java developers or VB developers.

I don’t know much about XNA, so I can’t really comment on that.

Pros of LWJGL I suppose it’s that it’s open source with a very liberal license, runs on Windows, Mac and Linux.
One big advantage of developing in java is that there are excellent free IDE’s like Eclipse and NetBeans which both are really much better than MS Visual Studio .NET Especially compared to C#, where you really have to buy some plugin (iirc called C sharper or something ReSharper).

A plus of C#/XNA might be that it has a big company behind it that really actively support games development. OTOH, the java games development community is quite active, and some great stuff has come from that, like LWJGL, jME, Xith3D, etc.

In the end, I suppose it depends on your goals:
If you’re a big company and want to target Windows, Windows, XBOX, and XBOX, C# might be your friend. I think targetting XBOX as a small independant developer is not so easy and it will cost, so you will probably target just Windows if you go indie.
With Java, at least you also get Linux and Mac as a bonus, and Mac is really a good market for indies! Java can even run on a PS3, but you won’t get hardware accellerated graphics, so fast 3D games are not really viable there. Who knows, that might change some time in the future…

Why don’t you speak about JOGL?? lwjgl is not the unique java binding of OpenGL, there are jGL, GL4java… and it is highly possible that JOGL will become integrated in Java 1.7.

probably because lwjgl compares more to xna than jogl, since jogl is gfx only. (you’d need jogl, joal and jinput to compare with xna).

Not according to Ken Russel - and I agree with him. It would limit JOGL a lot to be in the main distribution.

And besides all the cool kids use LWJGL 8)

Cas :slight_smile:

No, I’m not sure it would limit JOGL a lot and JOGL wouldn’t be a JSR if it has no chance to be in the main distribution. If JOGL was in the main distribution, it would be easier to use it, no need to download it separately, no need to download the librairies separately when you want only to play with a game using it, no need to handle this inside your jnlp file, quicker launch, no more long waiting time after the donwload to load the kernel modules from java web start…

It is a stupid remark! It doesn’t make me laugh! I don’t see the interest of saying it here! Each binding has its drawbacks and its advantages and I’m not a kid anymore, sorry.

You seem to forget the updates and patches that are released very frequently. Once you lock on to one version, you’re really stuck with it for at least a few months until the next JRE update, and oh…people don’t tend to update too much. Every JRE will have it’s own slightly different version of JOGL, a dev’s nightmare.

Heeee… made a joke? He is one of the main guys behind LWJGL

java.gouessej.SenseOfHumourFailureException
at tomb.TombGameState$1.flickSwitch(TombGameState.java:822)
at tomb.actions.SwitchAction.doAction(SwitchAction.java:54)
at tomb.TombGameState.doAction(TombGameState.java:783)
at tomb.entities.Player.actionCurrentItem(Player.java:957)
at tomb.entities.Player.onSteppedOnSwitch(Player.java:1136)

Cas :slight_smile:

One more thing to note: there are now quite a few games out there that have been successfully launched and released and sold using Java+LWJGL. To date I believe there’s only one that uses JOGL for some reason. Go figure, as the Yanks like to say :slight_smile:

Cas :slight_smile:

that and also because i am guessing that lwjgl is more commonly used than jogl. am i right?

well, that depends…
We dont have any numbers, but my gut feeling says that jogl is mainly used for … “business” applications, especially heavily integrated with swing. A typical lwjgl developer is probably more gaming related, using no swing stuff. That said, jogl is fine for games and lwjgl is fine for business applications too - it’s just two areas of focus I would guess.

With regards to the jogl in the jre, riven is totally spot on. it’s much much better for each developer to release a tried and tested version of jogl, instead of 342 different jre’s. IMO!

You are narrow-minded. The success of an API is not only limited to its commercial applications! You have a mercenary vision as a lot of people here.

Maybe I have no sense of humour but I prefer having 8 years of experience in video games programming ;D.

Really? Under some OS, only the loading of native librairies can take some minutes. Then, people prefer aborting the game. It is an other kind of nightmare.

At the moment XNA is only for people wanting to see their code on a 360, perhaps in the hope that it’ll appear on XBLA.

As it stands you can’t use it for PC games – there’s too many issues with all the different components your customer/player needs to install, and even then sometimes it doesn’t work. Then there’s the DX9 / Shader 2.0 requirement, which precludes a lot of Casual gamers.

Anyway, you certainly can’t use it for releasing commercial games - I know, I was the first person to do it - and we had to withdraw the XNA version of the game because of these issues.

Having said that though, long term, I think XNA is the better bet for making PC games, particularly 3D ones. Once MS get all those runtimes on people’s machines through Windows Update.

But that’s only PC games, sometime in the future. With Java/LWJGL you can target PC and Mac (who cares about Linux, really, commercially) now.

Depends what you want to do, really.

LWJGL is really small (much smaller than JOGL). Compared to the size of an actual game, LWJGL’s size is usually just noise level. If people are aborting because of loading times, it will be because the game is too large for them, not because LWJGL is too large.

edit: besides I totally agree with Riven that, especially for something as fragile as hardware accellerated 3D rendering, you need control over what version is being used. An OpenGL binding should stay being a library, and not become part of java.

[quote]Under some OS, only the loading of native librairies can take some minutes. Then, people prefer aborting the game. It is an other kind of nightmare.
[/quote]
So ehm… once JOGL would be embedded in the JRE, those native librairies wouldn’t need to get loaded?

Whatever.

The mechanism allowing to load the native librairies by using Java Webstart seems to be slower than when you launch directly my java archive. The loading time of the game and the librairies might be short but you have to wait for some minutes after the download only for the native librairies to be loaded. If you think I’m wrong, at first, take the source code of my game, compile all with the makefile, launch the java archive tuer.jar; then launch my game with Java Webstart from my link and you will see what I mean.

Curious. Try launching Treasure Tomb - do you get a delay there?

Cas :slight_smile:

The delay is shorter even after the download, I don’t know the reason.