[C#] IrrlichtFramework

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
noone88
Posts: 49
Joined: Sat May 27, 2006 3:28 pm

[C#] IrrlichtFramework

Post by noone88 »

I just finished the alpha version of the IrrlichtFramework. Its a single library using Irrlicht, Newton and OpenAL written in pure C#. The IrrlichtFramework provides a set of classes to connect this librarys and make life a lot easier.
It's crossplatfrom!

The framework

It's basically a lot like the XNA framework. Containing a base 'Game' class with which every application has to derive from. The Game class manages classes derived from the base class 'Entity'. It also provides device initialization routines and some other helpfull functions.

Irrlicht

An wrapper of Irrlicht. It's not the managed c++ wrapper included in the official SDK - this is a pure C# wrapper. This wrapper was not written by me. See http://irrlichtnetcp.sourceforge.net for more information. Thanks goes to DeusXL.

Newton

An object orientated wrapper very closely written to the original Newton library. Of course it's all more 'dotNet-Style'. You don't have to handle float arrays when you don't want to. Example of the Transform callback of Newton:

Code: Select all

        public virtual void Transform(RigidBody body, Matrix4 matrix)
        {
            m_node.Position = matrix.Translation;
            m_node.Rotation = matrix.RotationDegrees;
        }
As you can see, you don't need to convert any newton matrices to irrlicht. That is all internally done by the framework. (m_node is an irrlicht scenenode)

OpenAL

With OpenAL you can add full 3D Sound Support to your application in a very easy way. Just look into the samples.
Also a wrapper which is closely written to the original. Of course this wrapper is also object orientated.


Basic sample
Open a new project, add the IrrlichtFramework.dll into your project and with this few lines of code you have all devices initialized and the game loop running:

Code: Select all

using System;
using System.Collections.Generic;
using System.Text;

using Framework;

namespace EmptyProject
{
    class GameSample : Game
    {

        public GameSample()
        {
            IrrlichtDevice.WindowCaption = "Empty Project";
            Run();
        }

    }
}
Note that we inherit from 'Game'!

---------
Download link: http://www.file-upload.net/download-243 ... k.zip.html

YouTube Video: http://youtube.com/watch?v=zz64NMIW32E
---------
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

I tried to run your example, it segfaults on NewtonWorld.Update(20.0f) everytime. When I tried to disable it, everything works fine excluding the simulation. I'm not sure it is a wrapper related problem since I've downloaded the newtonSDK pretty long ago
noone88
Posts: 49
Joined: Sat May 27, 2006 3:28 pm

Post by noone88 »

mhhh... there is no "NewtonWorld.Update(20.0f)" in my code. Only

Code: Select all

        protected virtual void Update(float time)
        {
            m_newtonWorld.Update(time);

            foreach (Entity entity in m_entities)
                entity.Update(time);
        }
I tried it on different pcs and it always worked. I always used the same newton.dll inlcuded in this download! So there should be no problem with your pc :)


Does anyone else has the same problem?
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

It's not in IrrlichtFramework but in FrameworkTest.

Code: Select all

                    IrrDevice.SceneManager.DrawAll();
                    NewtonWorld.Update(20.0f);
                    if (m_debugDraw) DebugPhysics();
Im using a newton sdk version 1.53 under linux. Well since your wrapper uses a shared library, and there is noone in the sdk, I had to link it for myself by extracting and linking the *.o files from the static *.a archive :) Sounds compeletely weird, but there is definitly some library at the output with all the symbols included. Anyway if someone would provide me with a precompiled shared lib, I would really apreciate this.
Post Reply