Game Development Community

Can I Use C# Easily?

by Ryan Smyth · in General Discussion · 01/20/2011 (8:16 pm) · 7 replies

Can I use C# easily with Torque 2D?

I can't seem to find any information on this. The site search doesn't return anything.

Is there a C# wrapper? Or would I have to write my own?

About the author

Recent Threads


#1
01/20/2011 (8:34 pm)
Yes, you'd have to write your own script bridge to implement it.
#2
01/20/2011 (8:54 pm)
Script bridge? Sorry. I'm not familiar with the term.

Do you mean I'd have to wrap everything like in P/Invoke?

e.g.:

http://pinvoke.net/default.aspx/shell32.ShellExecute

[DllImport("shell32.dll")]
static extern IntPtr ShellExecute(
IntPtr hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
ShowCommands nShowCmd);

Like that?

Are you saying that there is no existing wrapper for .NET?
#3
01/20/2011 (9:18 pm)

Sounds to me that you might be better off with Torque X. It's based on XNA, is already written in C#, has a 2D editor, and 2D rendering features.

Creating a C# integration for TGB would be a bit of work. It has been done for various Torques in various ways.
#4
01/20/2011 (9:25 pm)
I mean you would need to rewrite the existing files involving script loading and functions. Or hook in another language somehow, if you want to keep the basic TS around.
#5
01/20/2011 (9:35 pm)
This is scary:

http://static.garagegames.com/static/pg/productpages/torque-x/torquex-notice.png

Does anyone have any sort of inkling about the likelihood of it making it to 4.0? Just roughly -- like snowball's hope in hell, or it's a good bet?
#6
01/20/2011 (9:44 pm)

I wouldn't expect it from GG as they are moonlighting the project. Not sure where the community efforts are on that. Also not quite sure on the amount of work involved--never worked with XNA 3.5 and don't know how big a delta that is.
#7
01/20/2011 (10:15 pm)
Here:

http://www.garagegames.com/community/blogs/view/20774

Looks like it's game over. :) or rather :(

Thanks for the responses.