Optimization strategies
by Travis Hartwell · in Torque Game Engine · 03/16/2006 (12:05 pm) · 2 replies
We're nearing completion of the feature set of our game and it is coming time to start working on optimizations. The two main areas I want to focus on are:
1) Mission loading time
2) Memory Usage
The game will be run in a controlled environment with identical set-ups for each machine it will run on, so I think that gives us some liberties that aren't available elsewhere.
One of the biggest things I know will effect both of these is the amount of objects we have loaded. Currently, the datablocks for all objects in our game are being loaded for every mission, even though they aren't necessarily being used for that particular mission. Someone had mentioned to me that on a prior project he only loaded those that were necessary. Is this something that I can do with Torque Script at runtime or am I going to have write an external program that will parse my .mis files and then generate a .cs file that gets loaded before the .mis and loads what is necessary?
Are there any other ways to speed up level load times? I've already increased my packet rate and packet size. Is there an easy way to short circuit the datablock loading times?
Any other general suggestions?
Thanks!
1) Mission loading time
2) Memory Usage
The game will be run in a controlled environment with identical set-ups for each machine it will run on, so I think that gives us some liberties that aren't available elsewhere.
One of the biggest things I know will effect both of these is the amount of objects we have loaded. Currently, the datablocks for all objects in our game are being loaded for every mission, even though they aren't necessarily being used for that particular mission. Someone had mentioned to me that on a prior project he only loaded those that were necessary. Is this something that I can do with Torque Script at runtime or am I going to have write an external program that will parse my .mis files and then generate a .cs file that gets loaded before the .mis and loads what is necessary?
Are there any other ways to speed up level load times? I've already increased my packet rate and packet size. Is there an easy way to short circuit the datablock loading times?
Any other general suggestions?
Thanks!
About the author
Torque Owner Paul /*Wedge*/ DElia
You could try to look at the chain of exec'ed files, split up your mission specific datablocks into their own sections and only exec those sections when those missions are selected. However I think this would still lead to a buildup going between missions on a server.
Datablocks don't usually jam up mission loading times so much as the amount of objects in a mission (i.e. interiors can't be instanced and can give high load times with a lot of them), so I'd check if it's the datablocks or the objects themselves causing the issues.