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?
Hot to implement plugins?
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
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
-
- Posts: 115
- Joined: Mon May 17, 2010 7:42 am
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
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames