Game Development Community

Demos playing way too fast?

by Reverend · in Torque Game Builder · 03/28/2006 (11:27 pm) · 5 replies

Hey there.

Just got my SDK tonight after having been convinced of it's all-encompassing coolness at GDC last week.

One snag I've run into already - the sample apps that ship with it all seem to run at blindingly fast speeds. The fish are barely visible and the scrolling shooter is unplayable, just a mass of projectiles and ships flying by.

I just bought a pretty wicked gaming rig, but is there any way to normalise the FPS so I can play the demos at a realistic pace?

About the author

Recent Threads


#1
03/28/2006 (11:35 pm)
Do you have a dual core system? Pentium D or Athlon X2? I've seen reports in the past of problems with dual core systems.
#2
03/29/2006 (12:29 am)
It could simply be that by default, this is not on but you can tell any t2dSceneGraph to simulate a constant FPS. To activate this for the space-scroller, go to the "games\spacescroller\gameScripts" directory and edit the "initializeT2D.cs" file.

After the following code block...
// Create t2dSceneGraph.
   new t2dSceneGraph(spaceSceneGraph2D);
   // Tag Scene.
   spaceSceneGraph2D.tag = "spacescene";
... add ...
spaceSceneGraph2D.setScenePhysicsFPSActive(true);
   spaceSceneGraph2D.setScenePhysicsTargetFPS(100);

The first line activates a constant FPS (note that this isn't your actual frame-rate but rather the simulation rate). The second lines specifies the target FPS you require, the higher the better. Note that if you set this too high and your rig cannot achieve it, TGB will do some internal magic to try to achieve this and whilst it does a good job, it isn't a good as putting in a realistic FPS.

At some point, we'll be setting this as active by default. You can actually change this default in the C++ source easily. Look in the "t2dSceneGraph.cc" file for the block...
// Physics Constraints Defaults.
static const F32 scmScenePhysicsLimitFPS = 0.5f;
static const F32 scmScenePhysicsTargetFPS = 80.0f;
static const U32 scmScenePhysicsMaxIterations = 3;
static const bool scmScenePhysicsFPSActive = false;

Change Target/Active as appropriate.

Also, don't forget to look up these functions as well as the other associated ones in the reference doco.

Hope this helps,

- Melv.
#3
03/29/2006 (11:57 am)
Jason - Yep, I have an Athlon dual-core. This may be another case of that problem

Melv, I'll try out the script solution tonight, but seems like that may do the trick, thank you.

Man, now I wish I had my aging 1.4GHz machine back :)
#4
03/29/2006 (1:13 pm)
Have you installed the Processordriver from AMDs page? It is needed to make sure that it does not calculate "crap" due to wrong stepping assumption (unless you set it in bios not to use cool'n'quiet)
#5
03/31/2006 (9:35 am)
Eeeexcellent. The processor driver fixed it. Thanks Marc.