Hot to implement plugins?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Dareltibus
Posts: 115
Joined: Mon May 17, 2010 7:42 am

Hot to implement plugins?

Post by Dareltibus »

Wich is a good way for add a plugin to a videogame (I mean autodetection of .dlls files wich add new functionalities).

how can i design a game structure that will allow in future to add plugins?
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

From my experience there is no need to do anything special. I have already created a little program that suppots plugins (it's the "IrrOdeRePlayer" of my IrrOde project ... just very simple, but it works). In this case the plugins just register some scenenode factories and event handlers in ODE, so all I needed for that is an "install" and a "destall" method in the plugin dlls.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dareltibus
Posts: 115
Joined: Mon May 17, 2010 7:42 am

Post by Dareltibus »

yeha i looked your plugin manager. seems good but really don't know hot to use. So i need to know first about factories, than about plugins right?

thanks Brainsaw
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Factories are not really necessary for plugins, but it's a nice concept anyways, depending what you want to achieve with your plugins. Another idea would be to have an "update" function inside the plugins that gets called regularely and does anything you want it to do. In my plugin architecture there is not such method, if you want a method to be called regularely you have to register an EventListener that reacts to the "step" events.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply