Game Development Community

Porting Torque to C#?

by jesusphreak · in General Discussion · 03/14/2005 (4:45 pm) · 13 replies

Just read some of the C# thread.

I am very familiar with the power of C# as I've seen a small UO emulator go to a full blown server system that can support 3200 people on a single machine in about 2 years.

I'm just wondering the uses and downfalls of porting Torque over to C#. You could do some interesting things with that, such as making the TorqueScript pure C#. For the time being, however, it'd lose portability. That should change pretty soon, though.

Anyway, thoughts on this?

#1
03/14/2005 (6:24 pm)
You've already given one good reason not to switch to C#. Portability (especially to macs) is a huge selling point for Torque. Why would Garage Games put lots of effort into porting, knowing that they are guaranteed to lose that market?

Also, what is the argument in favor of the switch? The example you speak of could just as easily be the result of 2 years of development rather than the result of using a better language. Is there reason to believe that C# made a difference in this UO emulator's progress?

If what you are looking for is an alternative to Torque Script, have you looked at Pytorque? Python is a very easy to use language. It is portable across many platforms. It interfaces fairly easily with C++ code. Does it have the features you are looking for?
#2
03/14/2005 (6:39 pm)
A complete reimplementation of a 500,000+ line codebase to C# would be a complete and total code management nightmare. I'd really hate to debug the resulting creature. You'd need developers that with extremely intimate knowledge of C++, C#, and the Torque Game Engine...and the target platforms and the caveats of developing towards an incomplete project.

That project being Mono. The developers are doing an excellent job, but it's still in its infancy with multiple platforms and fragmented support at best for a variety of essential technologies. It's not a lost cause or a poor project by any means, but .NET is **HUGE** and Mono still has a lot of ground to cover. I wish that the entire specification for the .NET platform was open.
#3
03/14/2005 (10:11 pm)
I respect where C# is going; however, Torque being of C++ is one of the main reasons I use it
#4
03/14/2005 (11:03 pm)
I'm in no way suggesting that the GarageGames guys or anyone should do this, I'm just interested in discussion.
#5
03/15/2005 (10:31 pm)
There isn't any compelling advantage in porting C++ code to C#; it would be a waste of time. A C++ project can be compiled into Managed C++, which works in the dotnet environment, just like C#.
#6
03/16/2005 (7:20 am)
My experience with C# is that it tends to cause alot of bloat in any apps I have ported with it. That said, apps writen natively in Mono or C# don't suffer as much bloat and do run at a speed comparable to a native C++ app.
#7
03/17/2005 (7:25 pm)
There is absolutely no reason to try to port torque to C#. It is simply a pure waste of time. Now C# is pretty close to C++/Java and such but still, it is a different language and the design of the torque codebase would simply not fit with C#.

Now if all you wanted was to change torquescript, then do so but don't try to port a HUGE application to another language which will cause major headaches.

I think C# is a great language and I have used it to make some small tool-like applications. Some large-scale applications have been made with it, but I strongly believe that how the torque codebase is would not fit for the C# way of programming.

Anybody, who has programmed in python and C++ know that there are things that are efficient in C++ that are just downright slow to do in python unless you submit yourself to actually coding in the python way and not in the C++ way of programming. This is the same thing here.
#8
03/17/2005 (8:57 pm)
Would C# be a fan of the inline assembly in the terrain engine? I'm guessing no...
#9
03/17/2005 (9:41 pm)
@Jesusphreak: I wonder why people always ask that very question...

Lets say you own a Jeep 4x4 and a VW bug. Each one was created to excel in certain areas. If you love to go offroading and own both vehicles the question is why would you spend thousands of hours and dollars to convert to VW bug to offroad when you have a 4x4 in the garage?

There is not doubt that you could convert the bug, it just makes me wonder why you would want to. On the other hand if you have a great deal of knowledge working on VW's and know nothing about Jeeps then perhaps that would be a reason for considering conversion... Why not just learn how to work on Jeeps though?

B--
#10
03/17/2005 (11:58 pm)
@Brandon: I can't just ask the question? I honestly just like asking questions, saying things, so I can get responses and learn more. Try it. You'll learn a lot more than you ever could instead of just saying, "Yeah, that's probably is possible", or "No, that's a bad idea" based on your limited knowledge (my limited knowledge in this case).
#11
03/18/2005 (10:24 am)
@Jesusphreak: I didn't mean you shouldn't ask the question... After I re-read that first line, it did sound that way... I was making a point about the huge effort required to port vs the simpler task of learning c++

So I'm sorry for the misunderstanding. Also here is a good place for programming a 3d dll from C# , and best of all it is free to try out. (watermark I think) http://www.truevision3d.com/home.php

B--
#12
03/18/2005 (10:30 am)
Speaking of PyTorque,
actionrpg seems to've been captured by an Evil Domain Speculator.

Anyone know where it lives now-a-days ?

www.actionrpg.com/PyTorqueBuildDemo.zip=20
#13
03/18/2005 (2:32 pm)
Thanks, Brandon.