Game Development Community

Lag

by Andrew Van Orden · in Torque Game Engine · 05/02/2007 (9:13 am) · 1 replies

Not sure if this is in the right spot but I have a question about objects in a level. When I have my custom objects loaded into my level, it makes the game lag. I realize that it could be any number of things but I believe that it is the objects themselves. The computer that I am running it on is decent and I am trying to get it to run on that machine. Does anyone have any tips on how to reduce the lag in the level without recreating the objects? If you need me to elaborate more than please let me know. Thanks.

#1
05/02/2007 (9:23 am)
Elaborate more please.

General network performance tips:

- Use smaller texture resolutions.
- Use lower poly models.
- Torque Script is slow, code as much game functionality in source code as you can.
- Don't overuse "commandToServer/commandToClient" commands or use them when not necessary.
- Only run code when it needs to be ran (e.g. looping functions).
- Alter network preferences to suit the PC and internet connection:
$pref::Net::PacketRateToClient = "32";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "450";