Irrlicht.NET

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Caecus
Posts: 36
Joined: Fri Aug 22, 2003 6:33 am
Location: California, USA

Irrlicht.NET

Post by Caecus »

Since the release of 0.8 heralded better .NET support I decide to play around with Irrlicht and C#.

I looked around for a while and found a suitably advanced game written in c++ using Irrlicht and attempted to port it. I chose IrrTetris which can be found in the links section on the main site. I spent the day Saturday porting all of the code over to the structure and syntax of C#, which took considerably more changes then I originally expected. Not that this is a bad thing, I think Irrlicht.NET's difference fit in perfectly with typical .NET coding conventions.

I encountered numerous issues porting the code, some of which I was able to work around (methods in the wrapper not be declared abstract, etc). However there were numerous things I simply couldn't work around. For example I could not find a way to get the root scene node, nor is there ANY GUI control support in the .NET Irrlicht wrapper. The PreRender event simply doesn’t exist, and numerous other issues arose. Many of these issues make it impossible to make CustomSceneNode’s of any kind.

I will try and document as many of these as possible, although I'm sure Niko is already quite aware. That said I'd like to propose an idea. I understand Niko wanting to keep the engine under his control until 1.0, however, the .NET wrapper is for the most part, grunt work. Niko's time is far too valuable for him to replicate work he has already done once. I'd like to suggest that he would allow those of us as in community with significant .NET experience to complete the .NET wrapper and keep it up to date with changes to the C++ engine.

Obviously Niko would still have the final say, but at least the wrapper would be complete and he could tweak or instruct us on what needs to be changed.

These are just some ideas I've been toying around with since I've become a big fan of C# lately and would love to be able to use Irrlicht along with it, however, as of now it simply isn't if it can't even be used to create Tetris.

-Charles Morton
iNvERTIgO
Posts: 1
Joined: Fri Aug 22, 2003 6:42 am

Post by iNvERTIgO »

I too would be interested to see some more work go into Irrlicht.NET. Hopefully Niko will take this suggestion into consideration.
Don't you just wish you were the 5th registered user?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: Irrlicht.NET

Post by niko »

Caecus wrote:I will try and document as many of these as possible, although I'm sure Niko is already quite aware.
Yes, I am, and sorry that the .NET part is not very functional as you described above. It just started as toy project and I simply wanted to try if it was possible to use Irrlicht from C#. There are really a lot of things missing and you're right: I really don't think I will find time to wrap every single small piece of the original Irrlicht manually.
The option you've mentioned sounds cool, if anybody would like to do that, why not. But it is really a lot of work. In addition, I've not tried it out, but somebody told me that if you simply recompile the original Irrlicht as .NET project with VS 2005 it will become a .NET assembly usable from .NET programs. If this assembly then is easy usable, it looks like there will be no work remaining but pressing on the 'compile' button. Sounds too good to be true.
itguru80
Posts: 12
Joined: Fri Feb 18, 2005 9:13 am
Contact:

Post by itguru80 »

Hi Niko,
that sounds amazing! Almost too good to be true!

I am also interested in this for a .NET project but so far I have run into the same problems as everyone else. If I can get my hands on .NET 2005 I will let you know if this works!

The thing is then, that won't it be Managed C++ instead of C++ with a .NET wrapper so it might not run as fast?

Peter
Pete
Life is wonderful
Xposure

c+= to c#

Post by Xposure »

http://www.swig.org/

that can convert c++ to c# code, but there is a lot more to it then that, and i don't have time to mess with it, maybe someone else perhaps wants to dive in?


-Xposure
Xposure

Post by Xposure »

eh did i say convert, i meant wrappers using pinvoke


i believe it can be tweaked out a lot more then that

-Xposure
savage
Posts: 5
Joined: Sat Apr 02, 2005 11:14 am
Location: UK
Contact:

Post by savage »

To give the C# and C++ code base the best chance of remaining in sync as closesly as possble, I would suggest investing some time and effort into writing a code wrapper generator. Basically a command line tool that grabs the C++ code and automagically generates the C# Interop code. Sure it will take a few iterations to get it working perfectly, but the time invested in creating such a tool, will save you hours or porting work later on.

Just my 2 kubits worth.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

savage wrote:I would suggest investing some time and effort into writing a code wrapper generator.
Hm, I don't think that this would be necessary. Why reinventing the wheel. There are already lots of generators (even for .NET/C#, I think) available.
savage
Posts: 5
Joined: Sat Apr 02, 2005 11:14 am
Location: UK
Contact:

Post by savage »

Why reinventing the wheel. There are already lots of generators (even for .NET/C#, I think) available.
Sure if you already have access to one that generates the interface you would like to make public, that would be great.

How syncronized are the C++ and C# APIs?
I was trying to load up a Quake 3 map using C# and Delphi.NET ( based on the C++ tutorial #2 ) and could not find any methods that would allow me to do that.
Can anyone point me in the right direction?

Btw, Is this the best thread/forum to ask questions like this, or is there a specific Irrlicht.NET forum?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

There is no specific forum yet, but maybe I should create one when Irrlicht.NET will get a little bit more functional. For the next version, I'm planning to do some research and maybe to create a .NET version which will be in sync and has most of the features of the C++ version (which the current .NET version doesn't have). But I cannot promise success. :)
Post Reply