Game Development Community

Using Torque Network Library with a different backend

by Ryan · in Technical Issues · 03/02/2005 (11:42 am) · 19 replies

Wondering the feasibility of this, having the Torque Network library running on the client side, and a completely different network backend such as the rakkarsoft library on the server(obviously the game would be using a client/server setup)..

Our server side stuff is going to be with rakkarsoft as I don't think that TNL is made to handle what we want it to well enough, so what our options here are having the client be integrated with the rakkasoft library, or have the server side stuff stay rakkarsoft and have the client side stuff be done with TNL and get the client side TNL to communicate with the server side Rakkarsoft.

I think it would probably be easier to have TNL on the client side and rakkarsoft on the server side and setting all the client side networking stuff up with torque scripts instead of trying to implement the rakkarsoft stuff into the torque engine itself. However I do not know how feasible it is having the client with TNL communicate to the server with Rakkarsoft.

So any input would be greatly appreciated.. thanks

#1
03/02/2005 (11:50 am)
It sounds possible but perhaps not a great idea?

Some one else with more netwrking knowldge that me should pipe in.

My question would be...why the requirement for rakkarsoft stuff on back end? Maybe if you give a bit more context the question will be easier to answer.
#2
03/02/2005 (12:04 pm)
Rakkasoft on the backend because it is designed to handle higher connectivity more efficiently than TNL, or at least from what I have read.. From reading through the forums I have found that the general opinion is that the TNL is great for a Quake Deathmatch scenario, however handling a few hundred people in a larger level it isn't the best choice, hence the rakkarsoft engine..

The client would be communicated everything about the player to the server, position, health, items they are carrying, weapons fire, experience points, etc etc
#3
03/02/2005 (12:10 pm)
From reading through the Rakkarsoft forums? You have to expect opinions might be a little biased there. ;) Of course, opinions are probably biased here too, but I can say with great confidence that TNL is very well suited to handling server-side communications / backend processing scenarios. Rakkarsoft seems like a nice lib, but it is hardly as time-tested and proven a technology as TNL, so it should take an awful lot of hard data to convince anyone it's better for this kind of processing than TNL is.
#4
03/02/2005 (12:15 pm)
Also...isn't it possible trying to "mix" them would remove some advantages from both libs? Wouldn't both libs tend to work better all by themselves rather than bolted onto one another?
#5
03/02/2005 (12:25 pm)
Josh, no I was refering to my reading of the GG forums for using TNL for a backend for an online persistant world actually.. I haven't asked this question on the rakkarsoft forums yet.. Not sure if mixing them would reduce thier performance, I wouldn't think so if you could just get TNL on the client-side to communicate with rakkarsoft on the server side..

I am not saying that TNL isn't capable, however it isn't what it was designed to do from what I've read.. Where as I think rakkarsoft might have been designed with a few things that I need in mind..
#6
03/02/2005 (12:34 pm)
Quote:
Rakkasoft on the backend because it is designed to handle higher connectivity more efficiently than TNL, or at least from what I have read.. From reading through the forums I have found that the general opinion is that the TNL is great for a Quake Deathmatch scenario, however handling a few hundred people in a larger level it isn't the best choice, hence the rakkarsoft engine..

The client would be communicated everything about the player to the server, position, health, items they are carrying, weapons fire, experience points, etc etc
Ryan, this may sound a bit rude and that is not my intention. I think it is entirely possible that the people on the Rakkarsoft forums have no idea how TNL works. I also think that you need to get a bit more versed in the concepts regarding TNL before you judge how appropriate it is. The italicised part of your post leads me to believe this. What you are talking about there is regarding net scoping. Transmitting, or not transmitting this information has nothing to do with TNL and everything to do with how you construct updates and how you do your scoping. Regarding integrating TNL and Rakkarsoft, I think that would be a very poor use of development time, to put it mildly.
#7
03/02/2005 (12:45 pm)
Like I said above, I am not judging ANYTHING here at all, all I am saying is that from the posts I have read it seems the general opinion of the people in the posts were that TNL was not an appopriate library for what the things I described.. However some of these posts could be from as far back as 2002 and therefor outdated..

Are you saying that in its current state TNL could handle a persistant world with 500+ players, and multiple servers without a major overhaul to the network library?
If so then that is nothing but good news for me.
#8
03/02/2005 (1:15 pm)
Here is a very direct answer. Neither Torque or TNL would not be compatible with Rakkar.

Neither TNL or Torque support MMP games out of the box. Torque cannot support 500+ players over multiple servers out of the box.

Josh is working on pulling together a MMP starter kit, but we don't have a definite deliver date yet.
#9
03/02/2005 (2:31 pm)
In it's current state, Torque can not support a persistant world.

However, TNL is just a network library...it is not a server solution. So saying, "Does TNL support 500+ players and multiple server?" is like saying, "Does C++ support database development?"
#10
03/02/2005 (8:41 pm)
Ah, thanks for the direct answer Jeff, that is exactly what I was looking for.
#11
03/02/2005 (10:20 pm)
Working on an MMP kit? I've been tryin for a year to build one am nearly complete and you guys are going to just make a starter kit... It makes me wonder why they call it goin postal rather than goin coder :)

Hey thats great news BTW, the day that MMP kit comes I'm buyin, heck if you'll let me I'll pre-order.

As to the original question, On a single properly configured box AMD 2200+XP 1 gig of RAM running Gentoo, we decided to do a load test for fun and had as many friends and family try to connect at once as possible, to starter.fps

We managed to get 219 people in that zone simultaneously. But honestly after 50 players most peoples framerates began to drop, interestingly enough though when you looked away from areas where players were framerates would shoot back up. At 219 people we had 45% CPU Utilization and 70% RAM Utilized Serverside.

This was a Gentoo box, built ONLY with the mimimum needed to run a dedicated server. So in short, there was no bloat :) I can pretty much guarantee your mileage would be less. But my point is that is still a LOT of people logging on at once. And we aren't talking about some $5000 rack server here. We are talking about a $399 Walmart special, with a ram upgrade.

Anyways I hope that helps... TNL is a heck of a Network Engine and TGE is an excellent place to begin building a game from, anything it's missing can usually be added pretty quick.
#12
03/02/2005 (10:29 pm)
If the MMP kit is within my budget, count me in as EA ;-)
#13
03/03/2005 (12:51 pm)
Just to contradict everyone here:

1. TNL is the Torque Network Library. It is a bit of network middleware that helps flow data between the server and the client. It performs (approximately) the same role RakNet might, although it includes quite a few features for network bandwidth optimization that RakNet does not. So using TNL on the client and RakNet on the server would make no sense -- use one or the other.

2. TNL should EASILY be able to handle several thousand clients from a single server. It would be an ideal solution for a MMP game - packing data from server to client and vice versa. We're using it as a back end solution for the community/authentication server, as well as for game traffic.

3. Torque (the Torque Game Engine) is a full client/server game engine with graphics and networking, etc, etc. You could, in theory, use just the rendering portion of Torque with RakNet to do the client/server network traffic, but this would be a major undertaking. Torque, out of the box, has rendering performance issues when you get a huge number of players on the screen. It would have to be optimized for a "many visible actor" world to be used in a 500 player game.

Hope this clarifies something for somebody :)
#14
03/06/2005 (8:49 pm)
I figured i haven't thrown my 2Cents in enough since i started visiting these forums.. So here is what i know from my VERY limited time with torque, (in a very simple "What i know" followed by what im unsure of/ what i would like to know how to change)

the netcode built into torque is very effective at what it does...
However im not sure how it trims out the useless people, like how do i prevent it from updating someone across the map IF AND ONLY IF my bandwidht is low.. [or how to trim down the range of the other players a client see's. i figure one way to remove distance hacks, is to just not let the client know where people are it can't see]

now this is one thing many people seem to miss. Torque net code is designed for an FPS, it sends all kind of data important to a FPS, bullets, missles, foot steps.. in a mmo [any kind other than fps] you really dont need this data sent, hell you dont need to send much data at all. In my humble oponion if you have hte patience to do a serious re-vamp of torque network code, and rip out most of the combat related stuff, you have an INCREDIBLY lean netcode that should be able to handle hundreds of people. You then need to re-impliment combat in a new sort of rpg based system, where hits are baised on skills not on if that person is in your sights.

please post and let me know if im off on any of this.
#15
03/07/2005 (3:40 pm)
Hey Pauliver,

Torque and TNL both use a fixed amount of bandwidth per client, and objects that are far away will be updated at a much lower frequency than objects near the "camera".

As far as the Torque network code being designed for an FPS -- the Torque net code was designed to make maximal use of available bandwidth for pretty much any 3D networked simulation. The fact that an FPS has bullets, missles, etc has NOTHING to do with the underlying network architecture. As far as "ripping out the combat related stuff" - there is no combat related stuff in the Torque netcode. And we've already done the work of ripping the network code out of the engine itself. We license it as the Torque Network Library - you can read about it at http://www.opentnl.org - the docs might answer some of your questions.

As it stands, TNL should easily be able to handle hundreds (thousands) of connected clients.
#16
03/12/2005 (11:38 pm)
Coming in on the tail end of this discussion but I actually spent over a year working with the rakkarsoft libraries so I'll give you my own opinion on it.

Rakkarsoft is awesome. A great network transport. Yes it could potentially support a very large scale MMO.. but uh.. not out of the box =). There is no "out of the box" with Raksoft. You will need to code it for your needs. It's simply a middleware network library. And a damn good one.

TNL.. Well I am out of my element here because I am definitely not a TNL pro yet but let me tell you after spending 10 months looking very carefully at TNL and doing seriously months of internal testing I will tell you that although Torque might not support an MMO "out of the box", the TNL middleware is a gift from heaven as a starting point for your network layer.

If you are like me, and coding is not your forte, I can tell you hands down that with a couple weeks of tweaking and testing you can optimizing TNL to easily handle the traffic generated in any of the current crop of mainstream MMOs.

Let me narrow that down a bit for you. In EQ2 for example, SOE still uses zones (As do I) and a zone pop ranges anywhere from 20-100 (at least on the 2 servers I play on). I do not know obviously the design or infrstructure you are planning on but running 100-200 connections on TNL is VERY possible. Artifex is claiming he's tested for over 300 simultaneous connects on a single server with his tuned up TNL code for Santus Legacy.

EDIT START: Just inserting here after reading Mark's post above re-rendering issues. That is going to be your number one problem btw. I am an oldschool network geek so I often forget that alot of people don't discern between datastream problems and rendering issues. You need to spend alot, and I mean ALOT, of time carefully designing your datastream no matter what network layer you choose. Think about what happens when a new player onject enters another players sphere of influence.. Their player object info for each other are updated more frequently causing a decent increase in datastream activity. Now compound that by 50 people all entering your SOI(sphere of influence) nearly simultaneously... Yeah, not a pretty thoguth right? Not only is your poor old server screaming to get all the player object updates out but every single player is potentially getting slammed with 50+ object updates.. Add to that some detailed object mountings and combat... chat... You can see real easily how this could destroy your client performance.

Plan carefully. Extensive use of LOD for player objects is essential and for MMOs, one of the most critical points of server / client stress. BTW, LoD is not a turnkey solution either =) I simply mentioned it here to give you something to seriously look at for help but you are going to need to implement a very customized LOD system based on YOUR player/NPC models, animations, mountpoints etc. There is no simple "use these settings" solution for this unfortuantely. Testing testing testing.. ;) GL

END EDIT:

Bottom line?

Use what you want but for me, TNL is bundled with Torque, it's got support, it's commercially proven in a many player enviro (Tribes1 and 2) and it's just a hell of a great middleware. =)

Good luck to you

Mark
#17
03/16/2005 (6:17 am)
Hey Mark,

I'm an sdk owner and my post was written from the point of view of someone useing the FPS start kit.
Thanks for your responce :)

Paul

*edit* and im sure you dont have to rip it out, just not send data over it.. however removing unused code is neater in my oponion.
#18
03/16/2005 (7:04 am)
Back on topic...

i would love to see some sort of open source version of Torque using

ogre3d & tnl

www.ogre3d.org
www.opentnl.org
#19
05/08/2005 (9:45 pm)
The only reason I even suggested it is because I was under the impression that Raknet was built with MMO optimization in mind.. However after reading mark's post, a person with a lot of experience, I get the feeling that TNL would perform equally well under those situations, which leads me to believe that Raknet wasn't specifically built for an MMO server setup as I had initially thought.

Thanks for the tips, I really appreciate it, we are seriously considering changing gears and going with the TNL here.