DotNetTorque on the Home Stretch,
by Vince Gee · 08/14/2012 (4:41 pm) · 22 comments
Have you ever worked so hard on something that when you finally looked up you found yourself sitting there staring at something you never intended to build. About three years ago, all I wanted to build was a simple MMO for my friends and I to play on.
Like everyone else, I started with the base T3D (actually TGE). To that I added the SQLite resource, the MySql resource, this resource, that resource and a sprinkle of some home grown stuff. I even wrote some of the MMO logic in C++.
This trip down memory lane reminds me of a conversation I had with Josh Ritter about 6 or 7 years prior to this time period where he told me that the only way to really build a MMO inside of Torque was to leverage a different scripting language than TorqueScript, in his case he chose Python. I remember thinking, "Boy do I hate Python, Lua, or any other script language." I would dream of a day where I could write the entire game and logic in CSharp and never have to touch TorqueScript ever again.
Like all MMO initiatives, (Except Josh's) the one I was involved in failed. I learned a lot but in the end it just proved too difficult to write a MMO in TorqueScript and C++. Adding insult to injury, the team had no central leadership, we weren't organized, and we had no clear plan. We were doomed to fail before we started.
Fast forward till about 3 years ago. Having sworn off working on game development after the prior fiasco, I was contacted about "helping" on a MMO project. I wouldn't need to code, but just provide some "guidance" on the pitfalls I had encountered the first time. Of course, I jumped in with both feet and before I knew it I was "slamming out code like a monkey high on bananas". But quickly, I realized to make this happen I needed a way to leverage the Microsoft Dot Net Framework.
My first attempt to leverage the Microsoft Dot Net Framework was using a Com Interface to bridge the calling gap between C++ and CSharp. This worked great initially, but under load, the whole Com interface collapsed. Then, one day while I was licking my wounds, I read a very interesting blog by Frank Carney.
I remember this day in quite detail. He was rambling on in a blog posting about using some fandango'd tool call SWIG. He claimed it was the second Coming of Christ. It was able to scale 100 story buildings in a single bound, stop speeding bullets with its chest, etc, etc, etc. And I can honestly say if it hadn't been for this post I would not be where I am today. Frank gave me the key pieces I needed to unlock the necessary structure to make DotNetTorque possible. To this, I want to extend a very warm and grateful "Thank You!" to Frank.
I ended up not using SWIG, and instead writing my own system to structure the externs and handling callbacks and such between the C++, CSharp and TorqueScript. The guys (Rich and Paul) would give me grief weekly about deleting everything and starting over each month. Then, in late January I hit internal Alpha 1.
Internal Alpha 1 was not stable, had horrid memory leaks, and many other, well nasty bugs. I might not be the brightest guy, but when something really, really, challenges me, I have a bad habit of not stopping until I drive it into the ground or I drive myself into the ground. From January till August I went from about 205 pounds to a hefty 260. My shrubs were over grown, my yard was only mowed enough to keep the neighbors from reporting me to the police, and my wife almost left, (Several times to be truthful). From when I got home at 4pm till sometime 2 or 3 in the morning I would go over my code, fix bugs, improve it, write samples, etc.
Finally, at the end of last month I finally hit Release Candidate 1. No known memory leaks, no known bugs, the samples worked without a hitch, the directions were good enough for someone with no knowledge of the product to roll it into the engine. I was done.... it wasn't the MMO, but it was the first major project in the game industry I had ever done from start to finish and refined it to a commercial level.
So, without much more rambling from me, I would like to invite you to download our CSharp enhanced T3D client, follow these simple directions:
Note: Norton Antivirus does not like T3D and because of this, your antivirus program may delete the game exe. You have my word as a long standing member of the GarageGames Community, as well as a founder of Winterleaf Entertainment that our programs are 100 percent virus free.
The world you will be thrown into has about 80 AI in it which are split into two teams and are constantly killing each other and YOU! So, be prepared to die....
On a final note, I plan to get the software into GG's hands by the end of the month so let us all hope and prey that I can get them to put it on the market by sometime next month!
Best Wishes to All,
Vince
Like everyone else, I started with the base T3D (actually TGE). To that I added the SQLite resource, the MySql resource, this resource, that resource and a sprinkle of some home grown stuff. I even wrote some of the MMO logic in C++.
This trip down memory lane reminds me of a conversation I had with Josh Ritter about 6 or 7 years prior to this time period where he told me that the only way to really build a MMO inside of Torque was to leverage a different scripting language than TorqueScript, in his case he chose Python. I remember thinking, "Boy do I hate Python, Lua, or any other script language." I would dream of a day where I could write the entire game and logic in CSharp and never have to touch TorqueScript ever again.
Like all MMO initiatives, (Except Josh's) the one I was involved in failed. I learned a lot but in the end it just proved too difficult to write a MMO in TorqueScript and C++. Adding insult to injury, the team had no central leadership, we weren't organized, and we had no clear plan. We were doomed to fail before we started.
Fast forward till about 3 years ago. Having sworn off working on game development after the prior fiasco, I was contacted about "helping" on a MMO project. I wouldn't need to code, but just provide some "guidance" on the pitfalls I had encountered the first time. Of course, I jumped in with both feet and before I knew it I was "slamming out code like a monkey high on bananas". But quickly, I realized to make this happen I needed a way to leverage the Microsoft Dot Net Framework.
My first attempt to leverage the Microsoft Dot Net Framework was using a Com Interface to bridge the calling gap between C++ and CSharp. This worked great initially, but under load, the whole Com interface collapsed. Then, one day while I was licking my wounds, I read a very interesting blog by Frank Carney.
I remember this day in quite detail. He was rambling on in a blog posting about using some fandango'd tool call SWIG. He claimed it was the second Coming of Christ. It was able to scale 100 story buildings in a single bound, stop speeding bullets with its chest, etc, etc, etc. And I can honestly say if it hadn't been for this post I would not be where I am today. Frank gave me the key pieces I needed to unlock the necessary structure to make DotNetTorque possible. To this, I want to extend a very warm and grateful "Thank You!" to Frank.
I ended up not using SWIG, and instead writing my own system to structure the externs and handling callbacks and such between the C++, CSharp and TorqueScript. The guys (Rich and Paul) would give me grief weekly about deleting everything and starting over each month. Then, in late January I hit internal Alpha 1.
Internal Alpha 1 was not stable, had horrid memory leaks, and many other, well nasty bugs. I might not be the brightest guy, but when something really, really, challenges me, I have a bad habit of not stopping until I drive it into the ground or I drive myself into the ground. From January till August I went from about 205 pounds to a hefty 260. My shrubs were over grown, my yard was only mowed enough to keep the neighbors from reporting me to the police, and my wife almost left, (Several times to be truthful). From when I got home at 4pm till sometime 2 or 3 in the morning I would go over my code, fix bugs, improve it, write samples, etc.
Finally, at the end of last month I finally hit Release Candidate 1. No known memory leaks, no known bugs, the samples worked without a hitch, the directions were good enough for someone with no knowledge of the product to roll it into the engine. I was done.... it wasn't the MMO, but it was the first major project in the game industry I had ever done from start to finish and refined it to a commercial level.
So, without much more rambling from me, I would like to invite you to download our CSharp enhanced T3D client, follow these simple directions:
- To grab the client, go to WWW.WinterleafEntertainment.Com
- Register as a user of the site and log in.
- Click "Products" and select "Dot Net Torque"
- On the right of the screen you will see a download icon labeled "Demo".
- Run the demo and it will install our Patcher.
- Start the patcher and download our game.
- Run the game!
Note: Norton Antivirus does not like T3D and because of this, your antivirus program may delete the game exe. You have my word as a long standing member of the GarageGames Community, as well as a founder of Winterleaf Entertainment that our programs are 100 percent virus free.
The world you will be thrown into has about 80 AI in it which are split into two teams and are constantly killing each other and YOU! So, be prepared to die....
On a final note, I plan to get the software into GG's hands by the end of the month so let us all hope and prey that I can get them to put it on the market by sometime next month!
Best Wishes to All,
Vince
About the author
www.winterleafentertainment.com
#2
08/15/2012 (5:38 am)
Great blog, Vince, and congrats!
#4
Something that has been nagging me tho, I do intend to do a lot of changes to the engine. How will the binary version of DNT work with that?
If I remove a function in GameBase will the binary version of DNT then freak out?
If I work alot in the source would I have to buy the source version of DNT? :)
08/15/2012 (12:07 pm)
As always a great blog! Very interesting to read ;) Congrats!Something that has been nagging me tho, I do intend to do a lot of changes to the engine. How will the binary version of DNT work with that?
If I remove a function in GameBase will the binary version of DNT then freak out?
If I work alot in the source would I have to buy the source version of DNT? :)
#5
08/15/2012 (2:20 pm)
*cheer!*
#6
Not really Lukas, the only time you would want to buy the source version is if you wanted to change the way DNT worked, or add your own externs.
You get the C++ extern code which you can modify with the exe build. So if you changed or removed console functions you would need to update the C++ added for DNT.
Even for a heavily modified version of T3D, you really wouldn't need to buy the source unless your trying to squeeze every last ounce of performance out of T3D.
08/15/2012 (9:10 pm)
@LukasNot really Lukas, the only time you would want to buy the source version is if you wanted to change the way DNT worked, or add your own externs.
You get the C++ extern code which you can modify with the exe build. So if you changed or removed console functions you would need to update the C++ added for DNT.
Even for a heavily modified version of T3D, you really wouldn't need to buy the source unless your trying to squeeze every last ounce of performance out of T3D.
#7
Definetly going on my wish list.
Good luck with the DNT! :)
08/16/2012 (3:57 am)
Now ain't that something!Definetly going on my wish list.
Good luck with the DNT! :)
#8
@Frank Carney: One thing you might appreciate about this is that using DotNet languages with Torque (Correct me if i am wrong here Vince) means you can use IronPython wich is Python for DotNet, right from the confort of your VS IDE
08/16/2012 (8:40 am)
@Vince Gee: great to hear things are getting on track with this@Frank Carney: One thing you might appreciate about this is that using DotNet languages with Torque (Correct me if i am wrong here Vince) means you can use IronPython wich is Python for DotNet, right from the confort of your VS IDE
#9
08/16/2012 (10:24 am)
Actually that is quite true.
#10
08/16/2012 (4:26 pm)
Congrats Vince, and good job pushing it all the way through! Definitely feeling your pain. Any idea yet of the price range your source license is going to fall into?
#11
OS Win7 64b.
For the rest it seems ok, Currently in downloading ;)
I have lot of work where i added various console methodes in the engine in C++ and exposed to the Tscript, Do i need of the source of DNT for ensure a full compatibility?
The Download finished
I can not start the game. I have a black screen.
Below the relevant parts of the log:
It seems the exe don't know the correct path for all the starter scripts.
08/17/2012 (1:57 am)
I have follow the procedure, the auto patcher has been installed correctly, but the first launch has freezed and given me an error, the second launch is successfull but with a little lag(10sec) before the update. OS Win7 64b.
For the rest it seems ok, Currently in downloading ;)
I have lot of work where i added various console methodes in the engine in C++ and exposed to the Tscript, Do i need of the source of DNT for ensure a full compatibility?
The Download finished
I can not start the game. I have a black screen.
Below the relevant parts of the log:
-------------------------------->Loading Directory 'scripts;art;levels'--------------------------- Missing file: scripts/main.cs! Error: Unable to find specified directory: scripts --------- Parsing Arguments ---------
--------- Initializing FPS Example: Client Scripts --------- Missing file: core/art/gui/customProfiles.cs!
BanList::export - wrong number of arguments. usage: Dump the banlist to a file. @param filename Path of the file to write the list to. @tsexample BanList::Export("./server/banlist.cs"); @endtsexample
It seems the exe don't know the correct path for all the starter scripts.
#12
Could you send me a DXDiag, my email is in my profile. I will look into this tonight when I get home.
08/17/2012 (3:58 am)
@Jean-louis:Could you send me a DXDiag, my email is in my profile. I will look into this tonight when I get home.
#13
It all matters, you do NOT need the source code to call your own console methods. You can call your own console methods via DNT and they will work like normal as if you called them through TorqueScript.
BUT,
If you are like me and want to squeeze every ounce of performance out of the engine, then yeah, you need the source code.
Calling a console method via the "Console.Call" functionality goes through the trampoline inside of Torque, so it is a ms or so slower than if it is defined as a extern.
In my opinion, if the custom console function is called often, i.e. every tick or more, than it should be rolled into an extern and you should extend DNT via the source code.
It all comes down to performance and how far you are willing to go to get the max performance.
08/17/2012 (4:01 am)
@Jean-Louis,It all matters, you do NOT need the source code to call your own console methods. You can call your own console methods via DNT and they will work like normal as if you called them through TorqueScript.
BUT,
If you are like me and want to squeeze every ounce of performance out of the engine, then yeah, you need the source code.
Calling a console method via the "Console.Call" functionality goes through the trampoline inside of Torque, so it is a ms or so slower than if it is defined as a extern.
In my opinion, if the custom console function is called often, i.e. every tick or more, than it should be rolled into an extern and you should extend DNT via the source code.
It all comes down to performance and how far you are willing to go to get the max performance.
#14
I like to squeeze out that extra performance, and it is also nicer to look at calling an extern than a Console.Call.
But I can imagine that you could buy the binary version first and if you found any issues, upgrade to the source version.
I would only upgrade to source in the final stages of development as it isn't crucial.
08/17/2012 (4:06 am)
My thoughts:I like to squeeze out that extra performance, and it is also nicer to look at calling an extern than a Console.Call.
But I can imagine that you could buy the binary version first and if you found any issues, upgrade to the source version.
I would only upgrade to source in the final stages of development as it isn't crucial.
#15
Let me put this disclaimer in first, we have not started negotiating with Garagegames yet on what there fees will be. We have a base price that we need to meet to keep our doors open, so if GG's percentage is high we might have to adjust the price so that we can keep our doors open.
After a long discussion among the owners of Winterleaf we have decided that we are best served charging:
75(this is not a firm price) dollars for the binary license. This will include the base license plus one year of support on the Winterleaf website forum.
Also, please take note that the binary release is not a binary release of T3D, but just the linkage routines between T3D and CSharp. With the binary release you can still modify the T3D source and the CSharp Game logic till your blue in the face.
After the initial purchase year, there will be a 25 dollar subscription fee annually. The idea behind this is so that we can pay our developers so that they remain enticed to improve DNT :)
This fee will include
[lo]
Minimum 4 major updates a year Access to support forums Bug support [/lo]
Currently, we are still discussing the Source Code license. Unfortunately we haven't firmed up pricing on it yet but we do know that there will be a clear upgrade path from binary to source and the upgrade path will be the same price as if you bought the source license directly.
We are aiming at around twice the cost of the binary license, but this licensing is really to undetermined to put a price out.
Vince
08/17/2012 (5:12 am)
@Chris,Let me put this disclaimer in first, we have not started negotiating with Garagegames yet on what there fees will be. We have a base price that we need to meet to keep our doors open, so if GG's percentage is high we might have to adjust the price so that we can keep our doors open.
After a long discussion among the owners of Winterleaf we have decided that we are best served charging:
75(this is not a firm price) dollars for the binary license. This will include the base license plus one year of support on the Winterleaf website forum.
Also, please take note that the binary release is not a binary release of T3D, but just the linkage routines between T3D and CSharp. With the binary release you can still modify the T3D source and the CSharp Game logic till your blue in the face.
After the initial purchase year, there will be a 25 dollar subscription fee annually. The idea behind this is so that we can pay our developers so that they remain enticed to improve DNT :)
This fee will include
[lo]
Currently, we are still discussing the Source Code license. Unfortunately we haven't firmed up pricing on it yet but we do know that there will be a clear upgrade path from binary to source and the upgrade path will be the same price as if you bought the source license directly.
We are aiming at around twice the cost of the binary license, but this licensing is really to undetermined to put a price out.
Vince
#16
I just did some reading on the IronPython, and I just realized that with DNT you could write your game logic in:
VB.Net C# IronPython - Python NetCOBOL - COBOL (wow you would really need to be sick to use this...) J# - Java Visual RPG - RPG for Dot Net Ruby.Net - Ruby Scala luabind - Lua
So basically, you could build your project in whatever language you felt most comfortable in.
I haven't checked yet to see if DNT is compatible with Mono, mainly because I don't have a linux guy to test it with. Hopefully as this progresses we will have a Mono build so that the Linux and Mac guys can use this as well.
08/17/2012 (5:22 am)
@Luis,I just did some reading on the IronPython, and I just realized that with DNT you could write your game logic in:
So basically, you could build your project in whatever language you felt most comfortable in.
I haven't checked yet to see if DNT is compatible with Mono, mainly because I don't have a linux guy to test it with. Hopefully as this progresses we will have a Mono build so that the Linux and Mac guys can use this as well.
#17
Shouldn't F# also be added to it?
08/17/2012 (9:38 am)
@Vince: Cool list of languages. Didn't know about some of themShouldn't F# also be added to it?
Quote:F# (pronounced F Sharp) is a multi-paradigm programming language, targeting the .NET Framework, that encompasses functional programming as well as imperative and object-oriented programming disciplines. It is a variant of ML and is largely compatible with the OCaml implementation. F# was initially developed by Don Syme at Microsoft Research but is now being developed at Microsoft Developer Division and is being distributed as a fully supported language in the .NET Framework and Visual Studio.
#18
Quite a large pool to pick from
08/17/2012 (9:48 am)
Just found this HUGE List of DotNet related LanguagesQuite a large pool to pick from
#19
08/18/2012 (9:07 pm)
@Vince: Sounds great! Looking forward to checking it out!
#20
09/11/2012 (8:06 am)
Do we have to buy a license for every developer in the team? Or is it enough that just one member have a license? Or is it enough to have one license for every coder (and not scripters)? 
Torque Owner Demolishun
DemolishunConsulting Rocks!
LOL!!!
The second coming, hahahahahaha!
If I helped you out it was my pleasure. Just don't blame me for the shrubs...or you could borrow my goat. Of course you won't have ANY shrubs left if you let a goat at them.
Yes, it was the Python interface to T3D. I kind of understand your feelings on that. I also understand the starting over part. I started with the existing Python interface by Prairie Games and once I got it working I decided it needed to be redone with SWIG. I even had an itch to revisit the whole interface with the experience I got, but decided I actually wanted to make a game and keep my sanity.
Good work making it to RC1!!!