embedding scripting into a program:a few questions

  • From: Tyler Littlefield <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sun, 7 Mar 2010 17:12:21 -0700

Hello all,
As some of you may know, I'm working on a custom mud base that I will be 
releasing to the public and probably using for my own mud in the near future.
I've got most of the stuff I want handled, except scripting; I was told to use 
Angelscript and was taking a look at it, but it seems to not be to well 
documented, so maybe someone has another idea.

What I want, is to be able to make the world class (which stores a list of 
players, rooms, mobs, etc) accessible to the scripting language I use.
Secondly, I want to expose events so that the language can attach it's own 
functions to them.
Third and possibly more dificult, I want to expose my component system, which I 
will explain.

Rather than using a is-a setup (through inheritance), I decided to go with a 
has-a setup. This provides some really cool ideas for design, such as being 
able to let clothing use containers if you decide that your shorts need 
pockets, without either moving container functionality up the inheritance, or 
using a multiple-inheritance setup, which can become messy. So, the components 
get loaded with the object from a list. I can easily use an AddComponent 
function to add the component to the list, but I'd like to allow builders and 
coders that I don't want using shell or that have an idea for a component to be 
able to build one in the language of choice, then register it with the 
dictionary that is used for holding components and allowing other objects to 
use this setup. So, in short I need a sort of transparent way to communicate 
back and forth, and not for the scripting language of choice to just control 
the driver, etc.
Tyler Littlefield
        Twitter: sorressean

View the list's information and change your settings at

Other related posts: