GameMonkey Script

GameMonkey Script Forums
It is currently Tue Mar 19, 2019 6:52 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: GM in C#
PostPosted: Mon Sep 07, 2009 4:25 pm 
Offline

Joined: Mon Sep 07, 2009 4:13 pm
Posts: 1
Can I use GameMonkey scripting with my C# application?


Top
 Profile  
Reply with quote  
 Post subject: Re: GM in C#
PostPosted: Mon Sep 07, 2009 11:59 pm 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
Welcome to the forum ddboarm :)

I believe downgraded made a C# wrapper or such some time back. It is mentioned in this thread:

GM 'C' API Anti-wrapper
viewtopic.php?f=5&t=211

I do not know the current status.

Another though: If you are developing on Windows and want to wrap legacy code of any description, GM included. Compile the C++ code with the CLI compiler, then lightly wrap the interfaces you need with C++/CLI. Your C# program can then easily link with and access the managed classes and the whole program will be managed code if you desire it so. The main benefit of doing this is that you don't need to write complex interops, the CLI compiler does it all for you.


Top
 Profile  
Reply with quote  
 Post subject: Re: GM in C#
PostPosted: Sun Nov 08, 2009 8:31 pm 
Offline

Joined: Thu Jan 01, 2004 4:31 pm
Posts: 307
The "antiwrapper" was cancelled as I ran out of enthusiasm for it. It seemed a bit backwards exposing the whole API as CDECL and then writing an OO wrapper in C# for it. A better idea would be to code it up in C++/CLI

I did start a full C# port of GM and got about 65% of the VM done. There's no compiler. The VM code is about 1.5x-3x slower than the native C++ code. I keep meaning to go back to it but don't have time at the moment.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group