Proposal: Make irrlicht extendable w/o recompiling lib

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
WhiteNoise

Proposal: Make irrlicht extendable w/o recompiling lib

Post by WhiteNoise »

There are a few places where it would be nice if you could extend the irrlicht engine without having to touch the base source code. One common example might be with adding a new model format. Right now you'd have to recompile the engine if you want it to work automatically like the other model readers. Another example would be with adding a new UI component - right now the GUI messages are hard coded and you'd also have to add your own helper function to the GUIEnvironment to create the model (if you want). In both cases it should be possible to generalize things. There should be some design patterns to put to use here.

Then you could do something like:
device->addModelFormat((IModelFormat *)mymodelformat);

// myguifactory extends the base guifactory
device->setGUIFactory((IGUIFactory *)myguifactory);

IGUIElement *e = guienvironment->createGUIElement("slider", <some param info>...);

Anyway, I think these would help keep the engine de-coupled from game or programmer specific modifications that tend to crop up. Also it should make it easier to add new formats to the engine. I think Ogre3d already supports this in some fashion. There are other areas this would be useful for too.
hybrid

Post by hybrid »

I don't know the GUI part that well, but for mesh loaders and image loaders this is already possible. As well as for scene nodes. The loaders just have to be registered with the scene manager and from that point on will work like all others.
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

maybe a plugin interface... either with scripting or run time Dynamic link.
So a user could write a "Network" or "AI" plugin and link it to a scene node ect...
pushpork
hybrid

Post by hybrid »

Irrlicht is no game engine, so chances are quite low that some plugin mechanism for such techniques will be integrated. And I think that you'd need some integration of the basic semantics of AI or Network to make it useful. Any other generalisation would require a rewrite of large parts of Irrlicht, e.g. to include an extensible event handler system for all kinds of events, callback routines etc. But if you manage to build something like this it would be pretty useful for many things.
On the other hand many extensions can be implemented by just adding a custom scene node and rearrange the world for this new node (e.g. by making related nodes children of the new node, or let the child affect its parent). And adding scene node implementations is also possible without recompilation.
Post Reply