TNL (or TGE) inside TGB
by Daniel Balmert · in Torque Game Builder · 08/18/2007 (9:37 am) · 3 replies
* I looked around, and although this thread topic SOUNDS familiar, it has a slight twist. Please read entirely before saying "yes it's possible to do." If you simply must skip, please read my list of questions.*
TNL, as I understand it, is a library of functions, methods, calls, whathaveyou that you can use once you purchase and install it and simply include for any .cs file that uses one of it's calls. (Again, someone stop me when I'm wrong.)
Now, my question I guess is "is it better to buy tge or tnl to integrate real time networking into a tgb project?"
The way I see it, tge has a lot of what I need and so does tnl. HOWEVER, the difference between the two products is only about $40-$50 (last I checked if I recall correctly). That margin of price is not enough to make me make a purchase based on price alone.
Also, from what I read, tnl is the same code from tge only it's been extracted and does not require the tge engine to work. If I have to pay $40-$50 to have the garage games employees take the time to completely strip all of the useful code and also put in some more networking goodies, I would much rather pay the extra and have piece of mind that I didn't screw up some "major surgery."
On the flip side, I'm interested in TGE. I'm graduating from an art college in a year, and I've concentrated my classes in both 2d AND 3d art. Eventually, We'll probably buy tge with the profits from our first small product. My second question is, "will this render the purchase of TNL practically obsolete?" I mean, like I said, I know they put in a few extras for tnl, but rumor has it they may find themselves back into tge in the near future.
On my team there's me (artist) and 2 main programmers and a few younger programmers. The main programmers are well versed in C++ and SQL. In that sense, I know going through networking code will be hard, but not impossible for us to do. We enjoy the thrill of doing things the right way even if it's hard (as opposed to hacking a solution). This is why I said we should consider purchasing a library of code rather than write it ourselves.
Also, I'll take any recommendations for books on the subject of networking. I mean, we know all about SQL, but that's probably not what we'd use for all the networking. It's only used for databases i think.
Thank you for sticking through this post. I know I have a lot of questions but really ANY opinions and answers would be helpful. I want to get some good info before I drop $250+ on a product that I'm not sure we'll use in the future.
Here's a restatement of my questions (For those who skipped to the bottom)
1) Should I buy TNL or TGE for the source code for real time networking?
2) If I buy TNL, will it be wasted money once I buy TGE?
3) Are there any tomes or complete resources for setting up real time networking?
4) If Yes, what language is recommended? Do we stay in C++ or venture to some other great language for networking?
TNL, as I understand it, is a library of functions, methods, calls, whathaveyou that you can use once you purchase and install it and simply include for any .cs file that uses one of it's calls. (Again, someone stop me when I'm wrong.)
Now, my question I guess is "is it better to buy tge or tnl to integrate real time networking into a tgb project?"
The way I see it, tge has a lot of what I need and so does tnl. HOWEVER, the difference between the two products is only about $40-$50 (last I checked if I recall correctly). That margin of price is not enough to make me make a purchase based on price alone.
Also, from what I read, tnl is the same code from tge only it's been extracted and does not require the tge engine to work. If I have to pay $40-$50 to have the garage games employees take the time to completely strip all of the useful code and also put in some more networking goodies, I would much rather pay the extra and have piece of mind that I didn't screw up some "major surgery."
On the flip side, I'm interested in TGE. I'm graduating from an art college in a year, and I've concentrated my classes in both 2d AND 3d art. Eventually, We'll probably buy tge with the profits from our first small product. My second question is, "will this render the purchase of TNL practically obsolete?" I mean, like I said, I know they put in a few extras for tnl, but rumor has it they may find themselves back into tge in the near future.
On my team there's me (artist) and 2 main programmers and a few younger programmers. The main programmers are well versed in C++ and SQL. In that sense, I know going through networking code will be hard, but not impossible for us to do. We enjoy the thrill of doing things the right way even if it's hard (as opposed to hacking a solution). This is why I said we should consider purchasing a library of code rather than write it ourselves.
Also, I'll take any recommendations for books on the subject of networking. I mean, we know all about SQL, but that's probably not what we'd use for all the networking. It's only used for databases i think.
Thank you for sticking through this post. I know I have a lot of questions but really ANY opinions and answers would be helpful. I want to get some good info before I drop $250+ on a product that I'm not sure we'll use in the future.
Here's a restatement of my questions (For those who skipped to the bottom)
1) Should I buy TNL or TGE for the source code for real time networking?
2) If I buy TNL, will it be wasted money once I buy TGE?
3) Are there any tomes or complete resources for setting up real time networking?
4) If Yes, what language is recommended? Do we stay in C++ or venture to some other great language for networking?
#2
2. No. There are features in TNL that are not included in TGE. There is a nice little Master Server example. As to when it will roll back into TGE is anyone's guess. Plus, you can use TNL with other engines that have no or limited network support.
3. Not that I know of. There are a million networking books, from the TCP/IP bibles on, but nothing that I can think of that is geared directly to real-time networking. Most books on game development will devote a chapter or two to it, but with only the specifics that are directly testable with the example software they are creating in the books.
4. There are networking libraries in many, many languages. Since Torque is a C++ engine, I would recommend sticking with C/C++ rather than using a glue language.
08/21/2007 (12:59 pm)
1. Well, if you can deal with the namespace nightmares (which I believe was what stopped Tom from implementing RT networking in TGB, but may be wrong) then you can download the GPL'd version and see if you can get it working. If you can, then pick up a license to use it in your game without releasing the source code.2. No. There are features in TNL that are not included in TGE. There is a nice little Master Server example. As to when it will roll back into TGE is anyone's guess. Plus, you can use TNL with other engines that have no or limited network support.
3. Not that I know of. There are a million networking books, from the TCP/IP bibles on, but nothing that I can think of that is geared directly to real-time networking. Most books on game development will devote a chapter or two to it, but with only the specifics that are directly testable with the example software they are creating in the books.
4. There are networking libraries in many, many languages. Since Torque is a C++ engine, I would recommend sticking with C/C++ rather than using a glue language.
#3
The only downside to TGB networking is that you have to subclass a type if you want to make clean networking.
All that is required is that you modify the GameConnection class and change t2dSceneObject to be derived from NetObject instead of SimObject. (Then you just subclass the type you're using and add mNetFlags.set(Ghostable); in the construction.)
I suggest that you at least try your hand with using the existing code, as its considerably cheaper and not too hard to get started. (A lot easier than implementing TNL!)
The link above states that TGE is required to get TGB to network correctly, this is simply not true. They have done extremely over the top networking, that is hacky at best. If you have the datablocks both clientside and serverside, then creating TGB networking isn't hard to set up at all.
If you're interested, I can send you some of my modified TGB. Though I'm not sure how much of it is still compatible, I've changed a lot. I've created a way of information being sent back to the server for TGB as it was missing, and stuff like that.
-- Ricky
09/06/2007 (12:51 pm)
If you have TGB you already have a good chunk of the Torque Game Engine and Torque Network Library's networking code! Well, the bits that are compatible!The only downside to TGB networking is that you have to subclass a type if you want to make clean networking.
All that is required is that you modify the GameConnection class and change t2dSceneObject to be derived from NetObject instead of SimObject. (Then you just subclass the type you're using and add mNetFlags.set(Ghostable); in the construction.)
I suggest that you at least try your hand with using the existing code, as its considerably cheaper and not too hard to get started. (A lot easier than implementing TNL!)
The link above states that TGE is required to get TGB to network correctly, this is simply not true. They have done extremely over the top networking, that is hacky at best. If you have the datablocks both clientside and serverside, then creating TGB networking isn't hard to set up at all.
If you're interested, I can send you some of my modified TGB. Though I'm not sure how much of it is still compatible, I've changed a lot. I've created a way of information being sent back to the server for TGB as it was missing, and stuff like that.
-- Ricky
Torque 3D Owner Chris Jorgensen
Cascadia Games LLC
www.garagegames.com/mg/forums/result.thread.php?qt=43745