DNT released. (Replacing TorqueScript with CSharp)
by Vince Gee · in Torque 3D Professional · 10/26/2012 (6:29 pm) · 18 replies
Hey all,
Just in case you missed my blog, I've finally released DotNetTorque which allows you to use CSharp, VB.Net, etc instead of TorqueScript inside your T3D engine (MIT or 1.2).
My website is at www.WinterleafEntertainment.com
Have a great weekend,
Vince
Just in case you missed my blog, I've finally released DotNetTorque which allows you to use CSharp, VB.Net, etc instead of TorqueScript inside your T3D engine (MIT or 1.2).
My website is at www.WinterleafEntertainment.com
Have a great weekend,
Vince
About the author
www.winterleafentertainment.com
#2
So most of the time you are bypassing the TorqueScript engine completely and calling C++ directly.
So, for all intensive purposes you are not calling Torque Script, you are actually pin-invoking the T3D DLL.
Vince
10/26/2012 (7:17 pm)
Actually it reads the c++ code for the console methods etc, and converts them to externs. Creates mappings for the externs to c++ and provide a simple framework to develop in.So most of the time you are bypassing the TorqueScript engine completely and calling C++ directly.
So, for all intensive purposes you are not calling Torque Script, you are actually pin-invoking the T3D DLL.
Vince
#3
You can view it at Debugging DNT.
Vince
10/26/2012 (8:18 pm)
If you are curious how debugging works, I've thrown together a movie and put it up for download.You can view it at Debugging DNT.
Vince
#4
What I'm really interested in is the metrics comparing Torque script to C# and especially the speed difference and overhead difference between the two.
10/27/2012 (3:27 pm)
Very Nice !!! I'm interested in this but for the moment it would have to wait. What I'm really interested in is the metrics comparing Torque script to C# and especially the speed difference and overhead difference between the two.
#5
10/28/2012 (6:44 am)
How much would this speed up a full scene like the south pacific demo with AI?
#6
The one thing we noticed is that if all u want to do is run 1AI in a small area, it doesnt seem to make a huge difference. The framerate will stay reliably at a higher number as more things happen but that ABOUT it. there is nothing really there to "speed up".
Now.... we did have a FPS test server up and running. 100AI, 2 teams of 50 each... constantly killing each other... in a very small area on an unoptimized terrain. Players could log in and kill mobs - life expectancy was about 5 seconds. We experience no lag for the 3 months that we kept the server up and running.
What we did see by using DNT was that it was able to handle a heavier load more reliably where stock Torque would either lag or not be able to perform at all.
10/28/2012 (1:20 pm)
@KoryThe one thing we noticed is that if all u want to do is run 1AI in a small area, it doesnt seem to make a huge difference. The framerate will stay reliably at a higher number as more things happen but that ABOUT it. there is nothing really there to "speed up".
Now.... we did have a FPS test server up and running. 100AI, 2 teams of 50 each... constantly killing each other... in a very small area on an unoptimized terrain. Players could log in and kill mobs - life expectancy was about 5 seconds. We experience no lag for the 3 months that we kept the server up and running.
What we did see by using DNT was that it was able to handle a heavier load more reliably where stock Torque would either lag or not be able to perform at all.
#7
Vince
11/01/2012 (3:32 am)
Sorry for the downtime over the last 2 days, Sandy took out our datacenter. But everything is back online as of last night.Vince
#8
is it possible somehow to have a look at the documentation and/or the converted starter.fps Projects? I am very interested, but still somehow the product page does not provide enough info to make me buy it (yet).
11/08/2012 (2:28 pm)
Vince,is it possible somehow to have a look at the documentation and/or the converted starter.fps Projects? I am very interested, but still somehow the product page does not provide enough info to make me buy it (yet).
#9
the documentation... what would be of more interest to see - a few pages of the ~100 page installation manual or the ~4000 page SDK manual?
I dont see the FULL converted project listing happening, but a few code blocks.... Ill chat with Vince about.
If there is a bit of information that you would like, Id be more than happy to help you out. You can ask me here or email me at pyoskowitz@winterleafentertainment.com
11/08/2012 (2:42 pm)
well, whats it missing besides the two things you mentioned? the documentation... what would be of more interest to see - a few pages of the ~100 page installation manual or the ~4000 page SDK manual?
I dont see the FULL converted project listing happening, but a few code blocks.... Ill chat with Vince about.
If there is a bit of information that you would like, Id be more than happy to help you out. You can ask me here or email me at pyoskowitz@winterleafentertainment.com
#10
Agreed, a few code blocks would be enough...just to get a feel how it Looks. Possibly with some datablock examples. Maybe parts of the Player.cs and its datablock.
Also, are there some tutorials included? I mean tutorials that explain the code and why it works?
11/09/2012 (12:09 pm)
I think a few pages of the Installation Manual would be very nice along with some pages of the SDK Manual.Agreed, a few code blocks would be enough...just to get a feel how it Looks. Possibly with some datablock examples. Maybe parts of the Player.cs and its datablock.
Also, are there some tutorials included? I mean tutorials that explain the code and why it works?
#11
As far as tutorials..... maybe we need to specify it better. The Starter.FPS Full *IS* the tutorial. That project is a line by line conversion of the TorqueScript. All you would have to do is put up a function (like the player.cs) and compare the two.
Now the other projects, THEY are fully optimized and correctly written C# code.
As far as to *why* it works.... that would be several high level C++ classes to explain Marshalling and the other techniques that Vince used. If you are wanting a more layman explanation, I can talk to Vince about that too.
11/09/2012 (1:02 pm)
I spoke with Vince and Luis today on this. We agreed on putting the 2 manuals up on the website. We were discussing what code to put up just before I read this post. If its the player.cs you would like,we can do that!As far as tutorials..... maybe we need to specify it better. The Starter.FPS Full *IS* the tutorial. That project is a line by line conversion of the TorqueScript. All you would have to do is put up a function (like the player.cs) and compare the two.
Now the other projects, THEY are fully optimized and correctly written C# code.
As far as to *why* it works.... that would be several high level C++ classes to explain Marshalling and the other techniques that Vince used. If you are wanting a more layman explanation, I can talk to Vince about that too.
#12
Again, thanks a lot...most probably I'll buy soon ;-).
11/10/2012 (5:02 am)
Paul, thanks a lot for the effort! I will look into the docs in the next few days.Again, thanks a lot...most probably I'll buy soon ;-).
#13
the original code is done in C#, so it I wanted to get this working using the C# code how much coding would be involved if I wanted to use DNT?
11/11/2012 (6:08 am)
I came across this www.youtube.com/watch?v=p49vOX-_LyUthe original code is done in C#, so it I wanted to get this working using the C# code how much coding would be involved if I wanted to use DNT?
#14
The T3D engine is still c++, I just enabled it to use C# for running logic. So, really DNT would offer no real benefit in getting that working since the rendering code is still in c++
11/11/2012 (2:41 pm)
@Kory,The T3D engine is still c++, I just enabled it to use C# for running logic. So, really DNT would offer no real benefit in getting that working since the rendering code is still in c++
#15
I saw that the docs are on your wiki. But is it intentional that most of the pages are empty?
11/13/2012 (1:12 pm)
Paul or Vince,I saw that the docs are on your wiki. But is it intentional that most of the pages are empty?
#16
This was just being put up today. The manuals are still be converted over to a Wiki format so yes, there will be blanks until its completed.
11/13/2012 (1:36 pm)
DNT Product PageThis was just being put up today. The manuals are still be converted over to a Wiki format so yes, there will be blanks until its completed.
#17
11/13/2012 (2:10 pm)
OK Paul. thanks for the fast follow up. Will go trough the docs as soon as they are there, and then decide.
#18
Paul and I are learning as we go, some of this stuff is all new to us. So any feedback is appreciated and evaluated.
Vince
11/13/2012 (7:40 pm)
Andy,Paul and I are learning as we go, some of this stuff is all new to us. So any feedback is appreciated and evaluated.
Vince
Jimmy R Armes
Your solution as I understand it don't replace the scripting engine as it still call functions form it ?