C++ and C# scripts... I don't get it

Discussions on various DOL development features

Moderator: Support Team

C++ and C# scripts... I don't get it

Postby dVizard » Sun Jul 27, 2003 12:01 pm

Well, I am writing a small game in C++, and I will need scripting support in future, but the last thing I want to do is to port the whole thing to C#, because, uhm, C# sucks. BUT C# has CodeDom. Now I have seen your emu uses C# for scripts but is written in C++ and I have looked at the code a bit, but I don't understand how it's done. Could you please explain this to me?
Apparently the scripts seem to be able to use the commands specified in ScriptInterface.h/cpp (or am I completely wrong? ) but neither do I see any reference to this in ScriptMgr nor do I understand how a (compiled) script dll included in the c++ project can access functions from this project...
dVizard
DOL Visitor
 
Posts: 8
Joined: Sun Jul 27, 2003 11:06 am

Postby Corillian » Sun Jul 27, 2003 5:31 pm

The reason the scripts have access to classes and data within the emulator is because all classes that are exposed to the scripts are written in managed C++ inside of gameserver.dll. When the scripts get compiled they use gameserver.dll as a reference assembly. .NET takes care of the rest =)
-Corillian, Former DOL Project Lead
Corillian
Inactive Staff Member
 
Posts: 459
Joined: Sat Jun 21, 2003 1:32 am
ICQ: 35175939
Website: http://dolserver.sf.net

Postby dVizard » Mon Jul 28, 2003 8:23 am

Does this already work in C++6 or do I need C++ .NET to do this?
dVizard
DOL Visitor
 
Posts: 8
Joined: Sun Jul 27, 2003 11:06 am

Postby Smallhorse » Mon Jul 28, 2003 2:25 pm

You need VS.NET ... because only VS.NET supports managed extensions to C++.
SmallHorse
Project Ex-Administrator with too little time to be of much use currently :)
Smallhorse
Inactive Staff Member
 
Posts: 2919
Joined: Sun Jun 22, 2003 5:54 pm
ICQ: 11718314


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 0 guests