Why C# teams try to port C++ engines to pure C# quite often(?), but Java dont?

Irrlicth 3D engine
http://irrlicht.sourceforge.net/links.html
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=8865&postdays=0&postorder=asc&start=90

Ogre 3D engine
http://www.ogre3d.org/
http://www.ogre4j.org/drupal/
http://axiomengine.sourceforge.net/wiki/index.php/Main_Page

Irrlictht and Ogre are very capable and feature rich cross-platform engines implemented in C++ language. Both have many physics plugins and so on…

Both have more or less successfull Java binding subprojects. Both have full-port-to-dotNet-c# spinoff projects underway. I was wondering why most such source ports from a native engines go to dotNet environment, but I have seen none trying same to do pure Java port.

Is it that copying implementation from C++ files is more natural, easier to create in c# language?

I know C# language has structs, a way to use pointers if one is absolutely required (using unmanaged flags), inout ref variables function params (allows swap(int, int) for example), etc…

It is not DirectX interface problem, because most engines support OpenGL rendering as well, those engines run in MacOSX and Linux. Meaning, no engines use directxAPI only helper methods and classes to minimize some of the engine work.

Is it just that trying to port such a gigantic c++ code like fullsized 3D engine is just too much to solve language problems?

I tend to believe it’s too big language differences between C++ and Java. Java code should think so much doing things differently it created a great problem. Doing things so much differently will create maintenance hell when should follow C++ development speed and implement new things or port bug fixes.

[quote=“whome,post:1,topic:26532”]
I don’t think that’s the case. I mean there is the JOODE project that is porting ODE to Java, besides going from one language to another always has issues, regarless of which two they are. There could never be a purely Java port of these engines because in order to talk to the hardware there needs to be at least a little native code. So a wrapper is really the only solution.

Well, I mean “pure java” engine where we can use OpenGL renderer api (lwjgl, jogl). DirectX renderer API is valid as well if one existed similar to Jogl library. Without this rule we did not have any hardware accelerated apps in Java.

Wrapper is not the only solution as Axiom/IrrlicthC# projects have shown it. I keep Java language wrapper just a B class citizen and always preffed a full port A class citizen. But such ports does not exist what I know of. Probably PHP/Ruby or similar must use binding wrappers, but Java is a full sized programming environment with all the gears.

Micrsoft is pushign the C developers hard to go to C#. And they tell them its not muc hwork since “its just another kind of C”.

The latter is true to some extent, C# certainly is closer to C++ then Java is.

I’d say C# may be in a C++ direction but it is a lot closer to Java when you’re actually working with it.

Well, it is when I’m working with it anyways, and that’s what counts.

[quote] I keep Java language wrapper just a B class citizen and always preffed a full port A class citizen. But such ports does not exist what I know of.
[/quote]
Why would there be any point in porting an existing C++ engine to Java? They are already written in C++. There are 3D engines (very full featured ones) written in Java. I’m not certain but I don’t believe that is true of C# - I haven’t really looked into writing games on .net because there doesn’t seem to be the degree of helpful and enthusiastic community support that I find here, although I narrowly prefer C# to Java as a language.

I can’t imagine someone using the C++ version of the engine saying “ooh, there is a java version, I guess I’ll use that instead” so I don’t see any real benefit apart perhaps from brand recognition and before either Ihrlicht or Ogre really has that they will need to have some good games created with them, which is another matter entirely. At the end of the day the engine is about 10% of the game, at most.

[quote]Probably PHP/Ruby or similar must use binding wrappers
[/quote]
Surely you mean Python, not PHP? PHP is convenient for hacking together web pages but it is not an application programming language (nor has it really pretended to be) and you would actually be insane to try and write a game with it. I believe Ruby has some openGL wrappers, but I can’t imagine using it for 3D programming for a while yet, brilliant as it is as a programming language in other respects. I can certainly imagine using it as a scripting language on top of a game engine, though.

[quote=“Breakfast,post:5,topic:26532”]
Really? One of the main reason developing in java again, after a 2 year excurse on C# was the language, not being platform independent or what ever…

Well, comments here seem to be right. C# is becoming very popular in gamedev. IMHO porting a C/C++ to both java or c# is nonsense, I still hope that Java is becoming popular for developing tools. Actually, that’s the way Microsofts promotes C#. Another example is this book Game Engine Toolset Development.

It’s becoming popular in gamedev because surprise surprise it’s soon going to be in a console and all over the new release of Windows and the IDE is a very familiar one to C++ hacks…

Cas :slight_smile:

Sad but true, Java may miss the gamedev wagon. Sure it has a strong position in mobile gaming, but “serious gamedevs” use another tools. It is quite easy to estimate we see sooner a fullsized blockbuster game developed in C# than similar happen in Java (you may disagree). And it gives more credits to C# if you think how young language it is compared to Java. We had our headstart but are soon second runners.

And porting well featured and layered opnesource C++ engine to opensource C# engine seems a good idea. Why invent all from scratch. Porting engine to C# is a lot easier than to Java.

I am perfectly happy with doing my stuff in java and others probably, too. If there will be a blockbuster game in C# I don’t think this will change. And since the gamers are unaware of the used programming-language, it will not have a big impact either. Seen from the game developer perspective it seems a good thing to be able to use a more robust language than C++ to use a game engine. It really doesn’t matter if it is Java or C#, cosmetic and religous aspects aside ;-).

And to forestall a C++ vs. Java flamewar: Yes, C++ is sh**t (I know it, I’ve used it. There is rarely anything other to produce than segmentation fault)
* cylab runs for cover :stuck_out_tongue:

[quote]And it gives more credits to C# if you think how young language it is compared to Java.
[/quote]
Certainly is, but developed by a lot of Java engineers who were very conscious of the problems they had run into first time round…

Well, so I think we should all give up Java and go C#, close this forum and say shit to Sun
Well we just begin having great libraries in Java and then people says “Oh C# seems more interesting”.
Pah, grr.

On the contrary, I’m sticking with Java. But I’m doing it for religious rather than practical reasons (and cos I like that the jvm is less likely to take windows with it when it dies) and because the community here is really good, which may sound like an odd reason to stick with a platform, but is certainly the case.

If I ever get any middleware written that is worth selling on you can bet the first thing I’ll do is port it to C#. Very easy to do from Java and the hard reality of it is that if you want to make profit you need to be ready to go where the money is…

Say that to Oddlabs or Three Rings 8)

BTW I doubt e will see a blockbuster in C# for awhile because, from all I’ve seen, C# VM speed still sucks and the VM seems pretty unstable.

When C# is as fast as Java, maybe we’ll see such a thing…

(Anyone else see the irony of that? 8) )

Why porting instead of writing a decent one in Java taking advantage of the platform’s features!? I understand that the size of the problem (writing an engine from scratch) will be similar, so I can’t just believe why would anyone want to “port” something instead of writing a Java one.

Java has several advantages over statically compiled code that could be used in software like games. It’s beyond comprehension why to throw it all away.

Certainly is, but developed by a lot of Java engineers who were very conscious of the problems they had run into first time round…
[/quote]
Um… no offense B but I smell the smell of FUD here…

Can you actually name the “lot of Java engineers” who desigend on and/or worked on C#?

?? A good idea ??

Not quite sure if two use cases (no matter how cool) is going to be enough to convince the game development masses. Though I don’t see many C# use cases yet either.

Kev

Except that public/developer opinion thinks that C# is nearly as fast as C++, and Java is miles behind (regardless of what the actual facts may or may not be).

Although it’s not a good example, head over to gamedev.net and view some of the opinions towards C# - lots of people proclaiming that VMs are great, that GC isn’t an issue, but only when it’s C# they’re talking about.

Any benchmarks that I have seen puts the C# VM at par with or better than Sun’s client VM. It’s only the server VM that seems to have a clear advantage, and it isn’t even installed with the standard JRE.