20fps increase in tge but one problem
by Skylar Kelty · in Torque Game Engine · 07/25/2006 (9:55 am) · 17 replies
Hi,
I managed to increase overall fps in my game by doing this:
Now that increases the fps by 20, which is very good, but then if i loaded another mission it wont work will it? Beacuse the loadinggui has been demolished.
My question is: How would I recreate the loadinggui on mission exit?
I managed to increase overall fps in my game by doing this:
function onMissionDownloadComplete()
{
if(isObject(LoadingGui))
LoadingGui.delete();
}Now that increases the fps by 20, which is very good, but then if i loaded another mission it wont work will it? Beacuse the loadinggui has been demolished.
My question is: How would I recreate the loadinggui on mission exit?
About the author
#2
Your path may vary, yadda yadda, but that should then reload it for you.
07/25/2006 (10:38 am)
You should be able to do:exec("~/client/ui/loadingGui.gui");Your path may vary, yadda yadda, but that should then reload it for you.
#3
@ Cliff - Thanks, I tried that before but it didnt work
07/25/2006 (10:54 am)
@ Clint - Yep certain@ Cliff - Thanks, I tried that before but it didnt work
#5
07/26/2006 (1:05 am)
@ Tim - thanks but that doesnt give the performance increase, ill just take out the code and find some other way to increase performance
#6
07/26/2006 (10:53 am)
What about using the exec, and then the Canvas.add?
#7
07/26/2006 (11:10 am)
Thanks Cliff, I had tried that but it didnt work :(
#8
07/26/2006 (11:22 am)
That's weird... I've have thought that would have worked for rediplaying the GUI. huh.
#10
Thanks!
07/26/2006 (1:09 pm)
@James: An increase that big would seem to indicate that there is a problem that needs to be solved. Have you tried profiling to track down the source of the slow-down and if so, what's causing it and where?Thanks!
#11
07/26/2006 (1:46 pm)
To be honest I dont know how to profile/debug
#12
As for profiling, there is actually a Profiler class. I haven't had the need to use it yet so I can't tell you how to use it, but it looks pretty straight-forward. Check out www.garagegames.com/docs/tge/engine/classProfiler.php
Hopefully, we (or someone) can figure this out... =)
07/26/2006 (5:47 pm)
Hmm, not that I don't believe that you're seeing the results that you've mentioned, but with no definite proof of where the slow down occurs... Makes it hard to know if there is really an issue worth pursuing, ya know?As for profiling, there is actually a Profiler class. I haven't had the need to use it yet so I can't tell you how to use it, but it looks pretty straight-forward. Check out www.garagegames.com/docs/tge/engine/classProfiler.php
Hopefully, we (or someone) can figure this out... =)
#13
[u]With loadgui.delete[/u]
www.sphyxgames.com/with.log
[u]Without loadgui.delete[/u]
www.sphyxgames.com/without.log
Your help is greatly appreciated
07/27/2006 (1:22 am)
I've done some profiling but i dont understand the results[u]With loadgui.delete[/u]
www.sphyxgames.com/with.log
[u]Without loadgui.delete[/u]
www.sphyxgames.com/without.log
Your help is greatly appreciated
#14
Edit: Is this in a Debug build or a Release build?
07/28/2006 (1:35 am)
Cool. I don't make any promises, but I'm really curious why it would do this, so I'll dig into it a bit and see if anything pops out at me. =)Edit: Is this in a Debug build or a Release build?
#15
07/28/2006 (3:41 am)
Release, thanks for the help
#16
I've dug into it a bit, but I'm just not seeing anything in particular... It needs some in-depth attention, but I feel like with my current schedule, I simply can't take the time. Someone with more engine experience would probably be better able to determine what may be happening here anyway. Sorry, man!
Anyone else want to take a look at it? I'd be interested in any findings... Thanks!
08/02/2006 (6:26 pm)
Hey James, I've dug into it a bit, but I'm just not seeing anything in particular... It needs some in-depth attention, but I feel like with my current schedule, I simply can't take the time. Someone with more engine experience would probably be better able to determine what may be happening here anyway. Sorry, man!
Anyone else want to take a look at it? I'd be interested in any findings... Thanks!
#17
08/03/2006 (5:44 pm)
I cant really see why "unloading" a gui can increase fps that drasticly. I have tried it aswell, and i haven't noticed any difference.
Torque Owner Clint S. Brewer