DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

New TT Admin Script? AND/OR TT Community Stat Tracker

Modding questions, answers, help.....

Moderators: Warfare, Admin, Moderator

User avatar
ishbuu
New Brainjar
New Brainjar
Posts: 14
Joined: Fri Feb 16, 2007 7:27 pm

Post by ishbuu »

Another fix for this is to increase the packet movement between server and client. At medium level pings this is a godsend. Check this code.

Stock TT has 3 settings pertaining to net code

Code: Select all

$pref::Net::PacketRateToServer = 32;
$pref::Net::PacketRateToClient = 10;
$pref::Net::PacketSize = 200;
You can up the packet rate to client and the packet size. The packet size tops off at 450, any higher and it would eliminate low end MTU's. At least.... When the engine was invented it would. Avg. mtu then was like 550, so 450 was a healthy max. Anyway....

32 is the max for rate to server/client, you can up it. Don't go crazy with it all though.

// ishy
Image
NUTS!
Veteran Light
Veteran Light
Posts: 1187
Joined: Wed Dec 27, 2006 9:18 pm
Location: Wisconsin

Post by NUTS! »

I agree, did this for psl http://nutstank.googlepages.com/changingthepref.cs you could always tell the people who didn't change there prefs. They were always the last to spawn.
User avatar
ishbuu
New Brainjar
New Brainjar
Posts: 14
Joined: Fri Feb 16, 2007 7:27 pm

Post by ishbuu »

Quick adventure to the topic of net connects. The NetConnection class has a few commands, I don't know if they're all in TT, but they're worth checking out.

NetConnection related stuff:

Code: Select all

checkMaxRate()

Purpose
Use the checkMaxRate method to retrieve the current maximum packet rate for this connection.

Returns
Returns an integer value representing the maximum number of packets that can be transmitted by this connection per transmission period.

Notes
The period may not neccesarily be one second.
To adjust packet rates, see the preference variables above.

Code: Select all

clearPaths()

Purpose
Use the clearPaths method to mark this connection as NOT having received any paths.

Returns
No return value.

Code: Select all

connect( remoteAddress )

Purpose
Use the connect method to request a connection to a remote server at the address remoteAddress.

Syntax
remoteAddress – A string containing an address of the form: “A.B.C.D:Port”, where A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536.

Returns
No return value.

Code: Select all

connectLocal()

Purpose
Use the connectLocal method to connect the current client-side connection to a local NetConnection, that is to create an internal connection from this client to the internal server. This is accomplished through the use of a back door mechanism and has an extremely high bandwidth.

Returns
No return value.

Code: Select all

getAddress()

Purpose
Use the getAddress method to get the address and port that this NetConnection is currently attached to.

Returns
Returns the address and port that this NetConnection is currently attached to, where the addres will be of the form: “A.B.C.D:Port”. A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536.

If the connection is local, the string “local” will be returned.

If a this NetConnection is not currently connected the method will return a NULL string.

Code: Select all

getGhostsActive()

Purpose
Use the getGhostsActive method to determine how many ghosts are active on a particular connection.

Returns
Returns an integer value between 0 and inf, specifying how many objects are being ghosted to a client on the other side of a specific connection.

Code: Select all

getPacketLoss()

Purpose
Use the getPacketLoss method to determine the current packetLoss count for this connection.

Returns
Returns an integer value between 0 and inf, indicating the number of packets that have been lost to date on this net connection.

Code: Select all

getPing()

Purpose
Use the getPing method to determine the round-trip travel time from this connection to the agent on the other end and back again.

Returns
Returns an integer value representing the total time in milliseconds it takes for a ping request to travel to the agent on the other end of a connection and back to this agent.

Code: Select all

setSimulatedNetParams( packetLoss , delay )

Purpose
Use the setSimulatedNetParams method to force a connection to experience a certain degree of packet-loss and/or latency. This is a debug feature to allow us to see how a distributed game will behave in the face of poor connection quality.

Syntax
packetLoss – A floating-point value between 0.0 (0%) and 1.0 (100%) dictating the percentage of packets to be artificially lost.
delay – An integer value specifying the number of milliseconds to insert into transmission latencies.
Returns
No return value.
Now not sure if all of these will work, as these are from TGE and god knows what BT ripped out of TT and left in. Using the time system it could be possible to determine the avg. packet loss per second. Average ping and such should be easy using this too. Cheers.

// ishy
Image
User avatar
Cadc
Veteran Light
Veteran Light
Posts: 1173
Joined: Thu Dec 28, 2006 9:17 pm
Location: Lafayette

Post by Cadc »

Wow, Sup Ishy!! :shock:

Man I haven't seen or heard from you in ages! good to see you again man 8)
User avatar
ishbuu
New Brainjar
New Brainjar
Posts: 14
Joined: Fri Feb 16, 2007 7:27 pm

Post by ishbuu »

Heya :)

OK now on to what I was posting about. I'm working on integrating my code into dash's admin script (warfare's chat logger version) and expanding the logger a bit. Most of dash's old code is ending up rewritten (just my style vs him/warfare, I think mine is easier to read) but hopefully it'll be done later.

// ishy
Image
NUTS!
Veteran Light
Veteran Light
Posts: 1187
Joined: Wed Dec 27, 2006 9:18 pm
Location: Wisconsin

Post by NUTS! »

@Ishy
I have looked at a lot of those functions. I know we were able to get a packet check to go but it would drain/lag the server. I like the maxcheckrate one though. Should be able to do a quick check when he client is being sent the information when they first join the server. If the max rate is not 32, ban them for life, HA!
User avatar
ishbuu
New Brainjar
New Brainjar
Posts: 14
Joined: Fri Feb 16, 2007 7:27 pm

Post by ishbuu »

Yeah most of those aren't meant to be called a lot. I generally try to call as little as possible, and do as little as possible. Torquescript is TERRIBLY slow from a C++ perspective, I've seen code moved from Torquescript to C++ and result in fps boosts of 200+ fps. Anyway...

I've got not else to say. Fin'd porting my stuff, relatively painless, anybody should be able to streamline it in quickly.

http://premium1.uploadit.org/Ishbuu//timeLoggerRev.zip
Updated time logger code (not else though)

// ishy
Image

Who is online

Users browsing this forum: Baidu [Spider], ClaudeBot [Bot] and 0 guests