Game Development Community

Hosting Torque game server

by Funky Diver · in Torque Game Engine · 05/30/2004 (11:01 am) · 13 replies

Greetings,

I've just got these questions which seem quite important to many of us:

1) Is server part of a Torque based game can be run on a Xeon server with 2 or more processors. Does it worth to have more then 1 CPU, or the code does not support it?

2) Can I show the traffic size on a client HUD (like: in bytes/out bytes)? Is there some kind of network statistics variables I can access and show the values? Any tips? The same I would like to do for the server part, but log it into a file.

Thanks.

#1
05/30/2004 (11:08 am)
3) Did anybody try to host a Torque based server for about 100 players? What is the traffic size for 1 hour of a game?
#2
05/30/2004 (12:10 pm)
For Tribes I generally worked on 4 kb/s/player, so:

4 kb /s /player = 4 * 100 * 3600 ~= 1.5 gigs = *not* cheap.
#3
05/30/2004 (8:08 pm)
1. The server is single threaded. A dual-xeon would probably run it better than a single-xeon but not by a huge amount.
2. You can probably dig this information up. It's not exposed by default.
3. Ian's answer is as good as mine.
#4
05/31/2004 (2:11 am)
Thanks a lot for the info!

Ben, what is the best class for the traffic counter to place in? NetConnection? And what are the main functions that send/receive network data for a client/server?

It seems quite expensive to host a game, well, probably I need to decrease the amount of data passing to the clients (cut off some features/objects)...
#5
05/31/2004 (7:48 am)
Only if you need to host 100 players...

dnet.cc and NetInterfact/NetConnection are the places to look.

You're not going to be able to get the bandwidth much lower. You can change the packet rate, though.
#6
06/01/2004 (6:13 am)
Thank you.

Just another question popped up. Does server send to a client all the map objects on the map each teak, or only those are in the client's frustum (and nearest)?
#7
06/01/2004 (6:23 am)
@Alexander it's a bit more involved, the torque networking layer pays attention to both scope of objects, and priority for delivery.

The short answer to your question is: only what "makes sense" to be updated is, not -everything- in a particular environment every time. Of course, the scope, criticality, and even the entire framework can be changed if you have the need and skills.
#8
06/01/2004 (7:16 am)
@Stephen
thanks a lot. It's a good news :) I was worried that ALL the objects could be sent, the priority is important, but i'm concerned about traffic size more, not the optimizations.
#9
06/01/2004 (8:01 am)
If you need less traffic, you can trade update frequency and precision for bandwidth. If you're doing an MMO, all you need to do is send a goal position every so often, so that the client knows where guys are marching to. Along with getting rid of moves, that along would save you a HUGE amount of bandwidth.
#10
06/01/2004 (9:21 am)
@Ben/Alex: Perfect example: projectile movement. In the gamestyle "stock" Torque aims at (FPS), a projectile is an object that is updated every tick because in an FPS environment, you want the players to be able to see a projectile, predict it's path, move to avoid that predicted path, and still have the projectile moving in the (original) direction when all is said and done.

In many (non-FPS focused) MMOG's, a projectile's "success" is determined before the client is really even aware of the projectile's existence, and cannot be avoided directly by player action. This is a place where instead of sending the updates for the projectile's position every tick, you can simply send a command to the client to say "animate a projectile that hits object_x", and be done with it--no more tick updates really needed. Each client knows the projectile, it's launch point, and it's target, and can animate/display the hit (or miss).

This requires some development of course, but it's one area of bandwidth optimization that is "outside" of scope and packet status, but an easy one to optimize.
#11
06/01/2004 (2:01 pm)
You can send events for a lot of attack/defense actions if you're doing a more P&P vein game, too. That saves LOADS of bandwidth.
#12
06/01/2004 (3:02 pm)
@Ben: Yeah, there may be a lot of areas we haven't even glimpsed at yet. I'm trying to figure out right now if having the server control camera objects is "needed" for our gameplay genre. It all comes down to what style of game you are implementing I think, and a responsible method of categorizing what the server currently controls, and what your game needs.
#13
06/02/2004 (2:09 am)
Stephen and Ben

Good points, gentlemen!
The example of a projectile speaks by itself.
Exactly, the sword fightings do not neet to be updated every tick and lot's of objects can be animated only by a client.
Now I know the direction of my research. ;)

I've just made some calculations for 2 kb/s traffic and a 2xXeon/2Gb RAM server ($1299 value per month).
My humble results per server:
* Max players per server(not all of them at once, ofcause) = 3500
* Traffic per month = about 60000 Gb
* If we have about $0.19 per Gb, we have about $11400 per month to pay our traffic.
* Well... Check how much do you want to charge a player, but $5.95 will bring you about $8000 in profit per server after paying for bandwidth and the server...

Sounds encouraging, but there are always lots of invisible sharks in the water... 8-/ You need an administrator and atleast 2 gamemasters per server...