Jump to content
  • Advertisement
  • entries
    437
  • comments
    1000
  • views
    337512

Plugins

Sign in to follow this  
evolutional

106 views

I've been experimenting with plugins for use in my game library. What I have so far is a pretty simple system in which the game can scan for dlls in the game directory and then load them if they have a certain function signature. What happens then is that the DLL will expose new types and bound functions to the game engine itself, meaning the scripting component can access them seamlessly.

It seems to work pretty nicely and will allow me to do some cool things, such as adding game or engine behaviours to new games beyond what is capable from the scripting engine (think of StarFox for the SNES which had the 'first' graphics chip included). Provided I can link this to the engine itself (eg: allow people to hook into the right places), I could potentially release graphics, sound, or whatever updates by just shipping a new DLL and leaving the 'core' intact. A pretty nice prospect...

One thing I'd like to do (and am working on) is giving the plugin some ability to be queried by the engine; so registering types and functions is done via a standard interface, which stores the information for later retreival by the user.

I've also been thinking about the current API for GMGX (name will change soon, I hope). I'm not sure I 'like' the function prefixes I've been using and am now tempted to move away and throw related functions into namespace-like tables. So anything involving texturing would go into a "texture", same with triggers, entities and so forth.

So instead of code like:


trg = trg_create( );
ent = ent_create( );



We'd have:


trg = trigger.create();
ent = entity.create();



I'll have to assess whether it'd be worth it and whether it'd actually affect how usable the engine is now. Anyone have any commments on this?
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!