Skip to main content
gamedev.net
🔒 Locked

C# Wrapper?

Started by ScopeDynamo Oct 18, 2005 at 1:49 PM 3 replies 2.3k views
Original Post
ScopeDynamo
ScopeDynamo
Any C#/Net wrappers for AngelCode about?
WitchLord
WitchLord
Do you mean using AngelScript from C#? I haven't heard of any.

It would be interesting to see if AngelScript could be used with C#. But I don't know enough about the inner workings of C# (practically nothing) to even begin such an attempt.

If you or someone else are willing to give such a task a try, I'll help out anyway I can.

Regards,
Andreas


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
Vexorian
Vexorian
In theory you could compile angelscript's source as a .net DLL, but I highly doubt that cause I assume .net doesn't allow assembly code.

Now if there was a non-.net C# it could work with the c interface (people were able to make a delphi header with a C interfaced DLL)
------ XYE - A new edition of the classic Kye
WitchLord
WitchLord
Yes, in that regard C# should be able to use AngelScript. However, allowing C# to register functions and methods with AngelScript is another matter altogether.

Delphi works because it is compatible with ANSI C.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
Calefaction
Calefaction
You would need to write a Managed C++ wrapper around AngelScript to even be able to use the classes. That being said, it would be very difficult to wrap a managed type so that it was registerable in AngelScript. I've played with it a little, and it would require some work. It could be done, but it would require an extra layer of wrapper and translation, probably hurting the performance of AS overall quite a bit.

For that matter, to be able to register .NET delegates as native function pointers to Angel, you need to write a special __cdecl caller stub (see LuaInterface to see how this is done), or use .NET 2.0 which allows you to set the calling convention of a delegate to __cdecl.
Matt Holmes[ aka Calefaction ]Wildfire Games - General Programmerhttp://www.wildfiregames.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.