Game Development Community

Issue: Net Prefs Packetsize are still for TGE

by Steve Acaster · in Torque 3D Professional · 05/09/2009 (6:37 pm) · 7 replies

So there I've been, wondering for days, why my AI lag like hell if I've 10 or more of them running around. The way it happened made me suspect it was something wrong with updating their position in world space. I thought it odd that the AI lagged but my fps didn't drop.

And to cut a long, rambling tale of woe, struggle and eventual triumph over forgetfulness short ... the packet-rates are still too low when the prefs.cs autogenerates.

I've no idea what the maximum settings for these things are, but this is what I've changed.

//basic net prefs when they autogenerate
$Pref::Net::LagThreshold = "400";
$pref::Net::PacketRateToClient = "10";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "200";
$pref::Net::Port = 28000;

//what I have on my old TGE AI demo and have now updated T3d
$Pref::Net::LagThreshold = "400";
$pref::Net::PacketRateToClient = "32";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "450";
$pref::Net::Port = 28000;

I now have 50 AI all running about with high rate of fire weapons and the only lag is when they move right to the edge of the screen and my CPU determines the transition point as to whether or not they should be rendered, and that can be measured in ms.

So, I'd like to put in a request for the autogeneration of net package prefs to generate higher. As T3D is aimed at more modern PCs, this increase shouldn't have any negative effect on what systems can run it.

#1
05/09/2009 (10:31 pm)
There used to be a "Network Options" resource that let you adjust those settings with sliders and text boxes (it might have also had some presets for different networks -- or that could have been Tribes). Might be useful to dig that thing up. I think the old settings were for dial-up connections or something -- which is certainly annoying nowadays!

I know there was a thread topic about those settings (several) and how to optimize them... and if that busted search function wasn't annoying me so much I would continue trying to find it ;)
#2
05/09/2009 (11:07 pm)
Actually, it's been the same through TGEA as well (at least 1.7.1). AFX sets it to your values though afaik.
#3
05/10/2009 (4:57 am)
After a bit of searching, a net packet_rate_to_client of 10 seems designed for a 14K modem.

I'm hardly a networking genius but as a default setting I'd say technology has moved on. I doubt that the sort of computer with a 14K modem or 2 papercups and a bit of string is gonna run T3D.

#4
05/10/2009 (11:31 am)
I don't know, what with this drive to be able run Torque 3D on a comp with Intel graphics it may as well still support something as archaic as a dial-up modem ;)

That was one of the threads I remembered! And Network Preferences Tab Add-On for Options GUI is similar to the Gui resource I was thinking of -- though after looking at it I think you would want to leave some of those options out.
#5
05/10/2009 (11:53 am)
Quote:
with this drive to be able run Torque 3D on a comp with Intel graphics it may as well still support something as archaic as a dial-up modem ;)

Hmmmm, yeah, maybe. Some sort of built in code that seperates singleplayer (AIclients on same box) and multiplayer (networked) settings might be good for general use. Mind you, a bit of simple scripting could probably do that.

[psuedoscript]
if(serverConnection.singleplayer == true)
{load sp net packetsize settings}
else
{load mp net packetsize settings}
[/psuedoscript]
#6
05/10/2009 (1:40 pm)
In that case I think it would best to have a couple of presets ready, which are loaded based on client machine configuration i.e. something along the lines:
56k Modem
256k
512
1M DSL
2M DSL
LAN
etc....
which can be easily gathered using some trial or error or (a better option :)) calculated based on some basic assumptions. No need for some fancy auto analysis :). You can easily deduce what group the client machine falls into using some ping timings and quick bandwidth measurements upon startup. I've used a similar approach before with very nice results.
#7
05/11/2009 (4:39 pm)
Logged as THREED-435