Game Development Community

Tge And C

by Ron Lindsey · in Technical Issues · 08/07/2008 (1:17 pm) · 6 replies

I have scanned the forums and have not found a clear answer to these questions:

1. Can I use C# with TGE instead of C++? In my day job I program in C#. I have no C++ experience.
2. If so, once I code the class, how would i access the functons in that class? Is there a dll i could add to my resources?

I am not looking to rewrite the current C++, just write any new code in C#.

Torque Script is nice but... i REALLY miss the great intellisense i get in .Net. The coding/debugging goes so much faster also.

Thanks!

Ron Lindsey

#1
08/07/2008 (1:24 pm)
TGE is a C++ engine. TX is a C# engine built on top of the XNA platform.

It would be very nice to have scripting language access for languages like C# or LUA or Python (well, Josh has implemented Python in Minions of Mirth), though.
#2
08/07/2008 (1:33 pm)
If i understand your email correctly, if i wrote a C# dll (etc...) there is currently no way to access it from Torque Script?

I do understand that TGE is a C++ engine. Just wondering about custom functions etc in C#.
#3
08/07/2008 (1:53 pm)
You could probably do it if you tried hard enough. However, it would have to be unmanaged C# code, meaning you'd have to deal with pointers anyway - it'd be best to just learn C++ if you need to add something to the engine, and save yourself the hassle. It shouldn't be too hard, if you already know C#.

There's also this, but it appears to be dead.

If you're madly in love with C# to the extent that you refuse to anything else, though, your best best would be to use TorqueX rather than TGE.
#4
08/07/2008 (2:33 pm)
Just to reaffirm what others have said if you're a C# programmer already you're most likely best to stick with TorqueX and work with that to begin with.... if you get along well and want more of the features (i.e. networking) that TGE and TGEA provide then you'd have to learn C++
#5
08/07/2008 (2:54 pm)
To access your DLL, you would have to write the hooks into the engine in C++.
#6
08/08/2008 (6:48 am)
@David: That is the way to go!

Thanks to all for their input!

Ron