Visit the DotNetTorque Wiki
Visit the DNT GitHub Repository
DotNetTorque (DNT) is a C# enhancement written by WinterLeaf Entertainment, L.L.C. for the sole purpose of replacing the TorqueScript console inside of the T3D Game Engine from GarageGames.com. It provides the ability to manipulate the engine from C# instead of using the native TorqueScript script language. The goal was to simplify game creation by allowing game developers to be able to leverage the plethora of C# libraries available on the market today inside the T3D engine.
DotNetTorque is designed in CSharp and C++ to provide a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods calls between T3D and CSharp.
DotNetTorque Customizer ("DNTC") is an application which scans your entire C++ looking for:
When DNTC finds one of the above definitions, it parses the information about it and generates a C++ Extern and a CSharp stub so the method can be called from a Dot.Net compatible language.
When one of the external functions is called from C#, DNT listens for events from the T3D library via an exposed External C# Delegate. A reference pointer is passed to the T3D DLL on start up. When DNT detects that T3D has raised an event via that delegate to call a C# function, DNT looks up the C# function pointer and passes the parameters to the function pointer via Reflections, executes it, and returns the result.
At this point, it goes from having to learn a new IDE and scripting language, to being nothing more than a new API inside of Visual Studio. This will increase productivity, faster “ramp up” times, better debugging – the list goes on. By using DotNetTorque, it also allows people to look outside the Torque community for programming assistance. It also allows your programmers to use their favorite DLLs in their code.
That’s not the only benefit of using .NetTorque. The Torque DLL has also been modified to handle rendering and network loads better. We have modified the ViewDistance so that it effects Player/AI, TStatics and the terrain with 3 separate settings. This will have an effect on network ghosting and rendering. We have also started removing the hash and linked lists and replacing them with binary trees. We have found that this allows for an overall heavier workload to be maintained with less load on the server.
DotNet Torque Will be the backbone of all of WLE’s software.
You can find the DotNetTorque Online Manuals at the DotNetTorque Wiki.