Engine now toolkitable

To extend the engine’s content, now I just have to specify an assembly in the App.config of my engine and it will load the dll on the fly.
What does it mean so far ?
– I can create a new “toolkit” project with a reference to the engine core dll ;
– Then I add a simple class which inherits from my AI base class “AI_Script” ;
– I may override interesting methods (update, draw, and so on), use core functions;
– Add some fields with some attributes from the engine to make my AI class editable from the editor:
For example in a class using lights :


– Then I add the path of the new assembly to the config of the editor. Finally I launch it and I’m now able to instantiate the class through the editor, use it in levels and so on.

To make a parameter visible in the grid but not editable I could add the attribute [Editable(false)] to a field (the cell would be red instead of green).
The attribute [Description(“”)] is to display a tooltip which explains what the parameter is.

I forgot I added dynamic lights in the engine… It’s a cool stuff. I wish I could to do something nice with that.
Anyway, even if I don’t manage to complete a game with this project, it’s still interesting to work on it, so let’s continue.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s