Advertisement Jump to content
Sign in to follow this  
rvoith

Evaluating AngelScript ... can AS use COM?

This topic is 1785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In previous projects I have used VBScript as scripting language, but are now searching for alternatives. AngelScript seems very powerful. One of the extreme powers in VBScript is the abilities to use COM, which makes it easy to let the scripts access other systems, like databases etc. Is that possible in a similiar fasion with AngelScript?

Share this post


Link to post
Share on other sites
Advertisement

In short, no.

 

I think the only way for AngelScript to be able to use COM would be for your application to have a series of wrapper classes around COM objects.  I have toyed with adding some sort of #import directive to my application's preprocessor to dynamically build COM wrapper classes.  If I can get all of that worked out then, one day, there could be a COM add on for AngelScript.

 

I should also add that the application to which I contribute recently made the switch from Microsoft's VBScript/JScript engine to AngelScript, and we are very pleased.  The integration of our applications objects with the scripting language is much, much easier and maintainable.  We had some scripts which used COM objects, primarily Excel, but we are writing wrappers specifically for Excel automation.  I think this will be adequate until we write a more general COM solution.

Edited by Jason Goepel

Share this post


Link to post
Share on other sites

AngelScript doesn't come with any pre-integration for COM objects, but there is no reason why you shouldn't be able to use COM objects in AngelScript.

 

The fact that COM objects are reference counted and rely on factory functions for instantiation is a perfect match with AngelScript, so the memory management should be easy enough. You'll likely need to use wrappers in some cases where the primitives defined by COM doesn't match what AngelScript has, but otherwise it should be as easy to use COM as any other C++ classes.

Share this post


Link to post
Share on other sites

Thanks Jason and Andreas for your answers! I will do a test-round with AngelScript. The more I read, the more I like it!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!