Game Development Community

1.4 Torgue Engine FPS Demo Becomes Choppy

by Joseph Delekto · in Torque Game Engine · 01/05/2006 (5:29 pm) · 12 replies

Greets,

I've recently purchased the 1.4 Torque engine, and while I have not yet begun to delve into the code, I did notice a problem that I had when just running the FPS demo.

In either Windowed, or full-screen mode, everything starts out just fine, but within a few minutes of running around, the play goes from very smooth to extremely choppy (almost unplayable) and starts thrashing quite a bit. The problem goes away if I shut it down and restart, but then comes back again, almost making me wonder if there is some type of resource leak.

I've tried both OpenGL and DirectX (9.0c) and both exhibit the same behavior; I've also tried various screen resolutions. I've even updated my video drivers which were posted on Dell's site late November of 2005 and fiddled with various performance settings both for OpenGL and DirectX. Still, I haven't been able to find the right combination to alleviate the problem. Below are the specifications for the system on which the engine is being run:

Dell Inspiron 600m
1.7GHz Centrino
100GB Hard Drive
1GB RAM
ATI Mobility Radeon 9000 (64MB non-shared)
ATI Drivers: 11/10/2005 version 8.20.0.0
Windows XP Professional w/ SP2

Is there any type of logging or trace information that can be turned on (without a re-compile of the engine) that could help identify whether or not this may be a hardware/resource issue without needing to set up a lot of performance monitoring or special engine builds?

Regards,

Joe

About the author

Recent Threads


#1
01/06/2006 (7:28 am)
Hi,

I've got a 1.7 GHz Inspiron 9200 with a radeon 9700 and the TGE 1.4 demo works perfectly on it. However the TSE demo gets choppy when doing the transition to the outdoors scene. My machine is slightly under specified for TSE (needs 2GHz) which probably accounts for that transient choppiness. So perhaps your machine is slightly under specified for TGE, mayhap the video card?
#2
01/06/2006 (3:04 pm)
Greets,

Well, I understand that it is slightly under the specifications for the engine; however, I don't think that is what is causing the problem. When running the FPS demo, for the first few minutes (even the outdoor scenes) everything is fluid. (Running in full-screen mode 32-bit color, 1480 x 1024.)

After a few minutes, the game gets so choppy that just changing the point of view goes from a smooth transition to extreme 'chop'. To describe it, it's like opening your eyes and looking forward, closing them, turning your head forty-five degrees and then opening them again. When I hit 'ESC' to get to the menu to exit, even the mouse cursor is horribly choppy just moving it around on the screen.

Now, if I close the demo, then restart it, it is fluid once more (even on the outdoor scenes around the countryside) until a few minutes later when the problem manifests itself again. For some reason, I tend to think that there is some type of resource leak or perhaps several 'delete' calls are being made to free allocated memory that is becoming badly fragmented on the heap.

I will probably do an engine build and see if I can do some profiling; I'm still trying to see if there is some facility the engine provides to at least log resource usage. Thank you for the reply!

Regards,

Joe
#3
01/06/2006 (3:11 pm)
You are most likely getting ahead of your video card's ability to handle all the texture swapping, but that's just an uninformed guess. Your resolution is also pretty high for a card of that memory size I'm guessing.
#4
01/06/2006 (4:19 pm)
Greets,

That's where I'm still scratching my head. I can understand that happening, but when I escape from the game and even the mouse cursor is really choppy? That is what makes it a real boggler. I did try several resolutions, including 640 x 480 with a bit depth of 16 and the same thing still happens after a few minutes.

Exiting the demo (with the choppy mouse cursor) back to the title screen returns the cursor to normal; I just can't explain it without investigating it further.

Regards,

Joe
#5
01/06/2006 (5:54 pm)
The only other thing I can point you towards is a historical issue with many video card driver's poor compliance with OpenGL...latest versions believe it or not tend to not always be the best idea, because the testing process appears at least to be only "on reported errors" for OpenGL before things get fixed.

In other words, try one generation older drivers...it might isolate the issue. Otherwise, while your system isn't perfect, there isn't anything obviously missing that should cause this issue.
#6
01/06/2006 (7:32 pm)
Greets,

Actually, I don't think it's a video card issue, but instead something a little more interesting. (This happens in both OpenGL and DirectX BTW...)

My typical motif for testing the FPS Demo was by constantly running around, my finger on the 'E' key the whole time to constantly move around; I noticed a pause now and then, but thought it was because my finger slipped. After a few minutes of just running around (note, I didn't take my finger off the key the whole time, but just changed my point of view and kept running around), I noticed that releasing the key and then trying to move again caused the choppiness to start.

I rebuilt the engine in debug mode using VS.NET 2003 and ran the demo; it was a bit slower (obviously with unoptimized code); however, it was still fairly smooth to play at 1280 x 1024 with bit depth set to 32-bit.

Now, I don't know what this means exactly, but I tested playing the demo again, running around a bit, then releasing the key --nothing. I played again, waited until the game hit a pause, then released the key and started again --nothing. After a few pauses while still holding down the key to constantly move around the game, eventually at one point when I let go of the key, pressing it again to start moving caused the extreme chop to start.

Is there anything timing related in the game loop that may have something to do with keyboard input? (Please pardon my ignorance, I am extremely new to this engine.)

I have currently played several different 3D games on this same machine (Morrowind, Half-Life 2, Doom3) with somewhat slow performance (only slight chop in very busy or largely rendered scenes), both in DirectX and OpenGL for half an hour or more, so I don't think that my specs are too far below those required for this engine.

If the video card was not able to keep up with the engine, shouldn't sitting still for some time doing nothing improve things? Exiting the demo and restarting kept it smooth as silk until the chop kicked in. It almost seems random as to when it occurs exactly, but I'm trying to be consistent in what I'm doing to try and duplicate it.

I apologize if it seems I am trying to be difficult; this may very well be a hardware or driver issue specific to some feature I'm using with the engine. I'm intrigued on trying to figure out exactly what it is.

Regards,

Joe
#7
01/06/2006 (9:50 pm)
I think too that its your video card driver that is the problem, I had the same problem with warhammer Dawn of war even if my machine surpassed the required spec.

I had to downgrade my Radeon Catalyst driver down to 5.6 to correct the issue, the new 5.11 corrected the problem tho.
#8
01/06/2006 (11:55 pm)
It's the card hardware... 9000 is like directx 7 era GPU.

Wait nevermind I just saw that ATI says it's fully 8.1 compatible. Therefore I guess it should be a driver
issue. My bad...
#9
01/07/2006 (6:27 am)
He was running on OpenGL (almost no support from any ATI cards) and DirectX9c. So maybe you were right.
#10
01/07/2006 (9:13 am)
Greets,

I think have found out the problem the hard way, perhaps by some ironic twist of luck. There doesn't seem to be somethiing wrong with the engine from what I can tell, but it seemed that it was some application always being run at boot-up which installed a global windows hook. It was probably a keyboard hook of some sort, since it seemed to make it quirky at times.

I don't tend to think it's the video card, yet that's one of the "usual suspects" when it comes to the "blame game"; of course, I don't prescribe to that methodology, since I really want to know who, what, when, where, why and how. :)

I reinstalled a fresh copy of Windows XP and ran the FPS engine again using my same tactics, I have not yet run into the 'chop' problem.

I think I'm going to ferret out any running process, application or service that intends on installing any type of global Windows hook, to determine if it is for nefarious purposes and if not, whether they have crappy code in the hook procedure. First step is looking at all running processes and using a tool like "Dependency Walker" to see what it calls. Anything calling SetWindowsHook() or SetWindowsHookEx() (or any counterpart using such) is going up on the block for a right chopping if it has no business doing so.

I have nothing wrong with hooks that are legitimate, but if they use them illegitimately or contain buggy code that leaks like a sieve, they need to be nipped.

Sometimes it helps to take a look at the "big picture".

Regards,

Joe
#11
01/07/2006 (9:52 am)
Good catch man...that was a hard one to figure out! Glad that it's working for you--we were pretty much grasping at straws because this is not a common issue.
#12
01/07/2006 (2:46 pm)
Greets,

Yeah Stephen, this one almost left me pulling my hair out. It's amazing how much the operating system lets one get away with behind the scenes, making scenarios like this the most difficult to track down because they are, for the most part, invisible to the casual user.

Just as much as buggy hardware (a la FDIV) or poorly written drivers can cause problems outside of the realm of normal user mode code, so can other poorly written user mode drivers or hooks. It took a little effort by examining all the running processes using SysInternal's Process Explorer to see what DLLs were loaded by all of the running processes. Fortunately, global hook DLLs can run, but they can't hide.

I don't install any music CD-ware, so I know it wasn't the infamous DRM rootkit. (bleh!)

Thanks everyone for the help and suggestions!

Regards,

Joe