Advanced Question [SOLVED]Is it possible to lock framerates in Orbiter2010

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,605
Reaction score
2,327
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Only the first one (dividend). Infinity is "true", too, and 0.0 / 0.0 returns infinity.

Unless you get an exception there, yes, you can enable this in your compiler settings.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Code:
SetTimer(hWnd, 1, 50, NULL);
		t0 = oapiGetSimTime();
		return FALSE;
	case WM_DESTROY:
		KillTimer(hWnd, 1);
		return 0;
	case WM_TIMER:
		if (wParam == 1) {
			t1 = oapiGetSimTime();

But not the frame rate issues is when thrust is applied I get a certain max speed but on a faster pc that rate is greater
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,605
Reaction score
2,327
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Code:
SetTimer(hWnd, 1, 50, NULL);
        t0 = oapiGetSimTime();
        return FALSE;
    case WM_DESTROY:
        KillTimer(hWnd, 1);
        return 0;
    case WM_TIMER:
        if (wParam == 1) {
            t1 = oapiGetSimTime();
But not the frame rate issues is when thrust is applied I get a certain max speed but on a faster pc that rate is greater

...... That's something for the gold card customer support. WTF?! :facepalm:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Ok. LEt me spell it out and see if It make sense:
Sets touchdown at -8.5. This is when you add the vessel.

Code:
void TRIATHLETE::clbkPostCreation(void)
{
	//SET TOUCHDOWN TO START
	SetTouchdownPoints(_V(0, -8.51, 1), _V(-1.6, -8.51, -1), _V(1.6, -8.51, -1));;
}

in the constructor i set
Code:
oldy1 = -8.51;//touchdown point at start

Code:
void TRIATHLETE::clbkSetClassCaps(FILEHANDLE cfg)
SetTouchdownPoints(_V(0, oldy, 1), _V(-1.6, oldy, -1), _V(1.6, oldy, -1));;
{
if in mode 1 or 2 and if oldy is not equal to oldy1 then you may change the touchdown points.
Code:
oldy = (arm_tip[0].y);
	if (oldy > -.01) oldy = -.01;
	if ((MODES == 1 || MODES == 2) && (oldy1 != oldy)){
		 { SetTouchdownPoints(_V(0, oldy, 1), _V(-1.6, oldy, -1), _V(1.6, oldy, -1));; }

		oldy1 = oldy;

	}

this is saved and loaded at the end/beginning of scenario
Code:
	sprintf(cbuf, "%0.4f", oldy);
	oapiWriteScenario_string(scn, "TOUCH_7", cbuf);
Code:
if (!_strnicmp(line, "TOUCH_Y", 7)) {
					sscanf(line + 7, "%lf", &oldy);

	SetTouchdownPoints(_V(0, oldy, 1), _V(-1.6, oldy, -1), _V(1.6, oldy, -1));;


				}
and then touchdown points are set at the beginning
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
Don't set the touchdown points in clbkPostCreation. This is called after both clbkSetClassCaps and clbkLoadStateEx and will overwrite anything you set there.

attachment.php
 

Cras

Spring of Life!
Donator
Joined
Apr 13, 2011
Messages
2,215
Reaction score
0
Points
36
Location
Los Angeles
Website
www.youtube.com
The D3D9 client's frame rate limiter is toggle-able inside the sim via the Debug control window.

It is a very useful thing to use if you have a machine capable of very high frame rates. Orbiter 2010p1 presents a lot of strangeness trying to do certain things at very high frame rates. UMMUs are drunk and like to fall down and skip around, it becomes very hard to get a flying vessel to make contact with a runway and thus makes braking near impossible. Also in certain circumstances a vessel that is in flight will not change its status upon hitting the ground and stopping to LANDED and strangeness ensues.

By toggling the in sim frame rate limiter you can all of a sudden rid your sim of these oddities, so you dont have to keep leaving the sim and rebooting it up if your want the frames cut down. I wrote a post about it a while back and posted it in the bug section when I found it near impossible to get the XR-2 to stop while flying under very high frame rates. Dr Martin went to work on the new collision system and these oddities will no longer appear in the new version of Orbiter, but in the meantime, the in game toggle of the limiter is just another reason in my book why D3D9 client should be seen as THE only way to fly in Orbiter at the moment.
 

Michael_Chr

New member
Joined
Jul 16, 2013
Messages
153
Reaction score
0
Points
0
Location
Virklund
The D3D9 client's frame rate limiter is toggle-able inside the sim via the Debug control window.
:thumbup:
How to implement and use the DX9 FPS limiter via the D3D9Client.cfg file in orbiter root dir is described by kuddel on page 1 in this thread.
However I really appreciate that you directed my attention to the D3D9 Debug control - Had infact forgotten all about it.
Just a quick "how to" for others concerning the use of the DX9 debug function. In the launchpad click on >>video<< and then click on >>advanced<<. Check the box >>Enable mesh debugger<< and click >>OK<<.
The DX9 debug is now accessible in sim by CRTL-F4. Checking >>FPS limiter<< will Cap the FPS to the value set in the "Framerate" entry in the D3D9Client.cfg file.
Happy Capping :)
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
Good :thumbup:

Can you please edit the thread's title, adding something like [SOLVED], so as to let other users know they will find a solution in here?
(edit your first post and then click on "Go Advanced")
 

Michael_Chr

New member
Joined
Jul 16, 2013
Messages
153
Reaction score
0
Points
0
Location
Virklund
Good :thumbup:

Can you please edit the thread's title, adding something like [SOLVED], so as to let other users know they will find a solution in here?

Done...
However please note that the original problem that caused this thread is still under investigation...therefore inputs to the programming questions that Gattispilot raised in this thread are still welcome.
But since the question in the headline to this thread has been solved then I have put that up :thumbup:
 
Top