TGB Perfomance and Memory Problems: URGENT
by Sean Dugan · in Torque Game Builder · 07/18/2007 (3:36 pm) · 2 replies
Hey all, our company has a meeting with a potential partner tomorrow morning, so a pretty quick answer for this problem would be extremely helpful. It is not necessary for us to have something to show right now, but it would be very beneficial.
Anyway, we've been having performance issues with our sidescroller. One of the problems lies in the loadtimes, with levels taking up to two minutes to load, an unnecessarily long time. In addition to the inconvenience of the wait, once the level has loaded the player seemingly warps through the ground and drops towards infinity. We have guessed that the player object somehow begins falling before the level is fully loaded, thus appearing below the floor. The level is reloaded every time the player falls, and thus it goes into a memory hogging loop of death. We are at a loss to understand what the problem could be.
We have tried to fix this problem by not turning gravity on until the engine believes everything has loaded, by asking if the character is existing yet with isObject, and this worked for some time. This seemingly stopped working when we recently reinstalled TGB, and the problem has reappeared.
We have attempted turning gravity for the object off completely, and this does fix that error. BUT, the character proceeds to fall to the ground, though much more slowly. Does the engine have some sort of default downward force upon the objects?
We are using gigantic background images and many lengthy animations, so our suspicions is that all of our problems lie with video memory. Is there any way to adjust our game to perform better?
We are running v1.1.3, and can't prepare 1.5 in time for the meeting. We have the INDIE license at the moment (we may be forced to upgrade), so any fixes would have to be source code free.
Sorry if our problem wasn't explained very well. We're getting a little frantic here, after working so hard to have something prepared for tomorrow.
Anyway, we've been having performance issues with our sidescroller. One of the problems lies in the loadtimes, with levels taking up to two minutes to load, an unnecessarily long time. In addition to the inconvenience of the wait, once the level has loaded the player seemingly warps through the ground and drops towards infinity. We have guessed that the player object somehow begins falling before the level is fully loaded, thus appearing below the floor. The level is reloaded every time the player falls, and thus it goes into a memory hogging loop of death. We are at a loss to understand what the problem could be.
We have tried to fix this problem by not turning gravity on until the engine believes everything has loaded, by asking if the character is existing yet with isObject, and this worked for some time. This seemingly stopped working when we recently reinstalled TGB, and the problem has reappeared.
We have attempted turning gravity for the object off completely, and this does fix that error. BUT, the character proceeds to fall to the ground, though much more slowly. Does the engine have some sort of default downward force upon the objects?
We are using gigantic background images and many lengthy animations, so our suspicions is that all of our problems lie with video memory. Is there any way to adjust our game to perform better?
We are running v1.1.3, and can't prepare 1.5 in time for the meeting. We have the INDIE license at the moment (we may be forced to upgrade), so any fixes would have to be source code free.
Sorry if our problem wasn't explained very well. We're getting a little frantic here, after working so hard to have something prepared for tomorrow.
About the author
#2
07/18/2007 (4:21 pm)
In addition to the good advice above, if you have very large images, especially backgrounds--sometimes loading smaller image maps and then adding them to a tile layer can improve performance.
Torque Owner Ehrlich
when you use GIGANTIC images, TGB tends to use WAY TOO MUCH RAM for preloading... the same happens when you have way too many imagemaps to load at once... basically, your problem its a RAM problem, so a quick way of gettin the levels to load faster (at least for the preview) would be adding some more ram to your rigg, and test again...
now, my advice for later would be, make smaller imagemaps for everything, OR make a couple big ones, that contains info for quite a few things at once... like say, the backgrounds, you could make them with several small imagemaps, and tiling them, theres no real need to put a huge imagemap for the background, when you can tile or even link smaller ones and get the same result (with way less memory to work with).
try it... and let us know.