🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

C# Wrapper?

Started by
3 comments, last by Calefaction 18 years, 8 months ago
Any C#/Net wrappers for AngelCode about?
Advertisement
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 - Tower - free puzzle game

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
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 - Tower - free puzzle game

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

This topic is closed to new replies.

Advertisement