Plan for Phil Carlisle
by Phil Carlisle · 05/11/2004 (9:58 am) · 4 comments
Weeel. Myself and Beffy are workin away on the AI. But I hit a snagette in that for some reason I get some huge spikes in performance at odd times. Sometimes it doesnt happen, other times it does.
So in order to track it down, I needed to do some profiling, but no the "dump" type profiling of stock TGE fame :)
I needed to do some realtime "move around and does the time change" profiling.
So I decided to hack up the TGE profile a bit, so that it can dump itself into a gui control on the fly. The idea being that the gui control will then display a bunch of raster meters (coloured bars to you and me) to show the %age of the total frame time consumed by the given profile function.
Anyway, thats kind of semi-almost-working right now. I guess I really should try and figure out what it is the profiler is actually telling me (it gets confusing, so I'm going to wait for justin to give me the skinny), then I'll know if its lying to my gui control :)
On the upside, it does actually appear to work, although it doesnt draw the pretty bars yet. It gets the non-sub time and the total time, and the number of invocations (how many times that particular profiling route has been hit).
I've made it so it only draws the items you tell it
for example.
Rather than drawing ALL the profile entries.. some of which arent too useful when youre trying to narrow down your bottleneck.
So hopefully I'll get this finished and out there as a resource in short time.
So in order to track it down, I needed to do some profiling, but no the "dump" type profiling of stock TGE fame :)
I needed to do some realtime "move around and does the time change" profiling.
So I decided to hack up the TGE profile a bit, so that it can dump itself into a gui control on the fly. The idea being that the gui control will then display a bunch of raster meters (coloured bars to you and me) to show the %age of the total frame time consumed by the given profile function.
Anyway, thats kind of semi-almost-working right now. I guess I really should try and figure out what it is the profiler is actually telling me (it gets confusing, so I'm going to wait for justin to give me the skinny), then I'll know if its lying to my gui control :)
On the upside, it does actually appear to work, although it doesnt draw the pretty bars yet. It gets the non-sub time and the total time, and the number of invocations (how many times that particular profiling route has been hit).
I've made it so it only draws the items you tell it
enableProfiling(true);
profilegui.resetProfiles();
profilegui.addProfile("glFinish");
profilegui.addProfile("MainLoop");for example.
Rather than drawing ALL the profile entries.. some of which arent too useful when youre trying to narrow down your bottleneck.
So hopefully I'll get this finished and out there as a resource in short time.
About the author

Associate Paul Dana
I have a spike i cant explain but it seem's like its only right after joining the game, just the once. A profile of averages might not catch it.
good job