twitchy graphics

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: twitchy graphics

Post by Diziet Sma »

JazHaz wrote:
Diziet Sma wrote:
Now that development of GB has been taken over by Razer ("High-performance gaming hardware, software and systems. For Gamers. By Gamers.") I would expect it to get even better, although I haven't tried a Razer version myself yet.. something I must do, now I have a Win7-64bit install again..
I use the current Razer GB version. It's good, but I feel that the performance increase isn't as good as with the Iobit versions.
I have an older Iobit GB2.4 installer stashed away in my box account if anyone wants to try it..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: twitchy graphics

Post by cim »

Interesting. It seems to be related to the way your graphics card does vsync.

Mine - and yours under FRAPS - places the "wait for vsync" between "end drawing" and "begin update". Yours normally, however, places it between "begin draw" and "begin opaque pass". I wonder if that means there's then a bad interaction between the 60Hz cycle of your display and the 100Hz cycle of the Oolite main event loop that means occasionally one just misses the other.

In src/Core/GameController.m

Code: Select all

- (void) startAnimationTimer
{
	if (timer == nil)
	{   
		NSTimeInterval ti = 0.01;
try changing 'ti' to 0.005 (and if that doesn't help, 0.001) and see if that makes a difference. It might not do anything, but it's worth a try.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

cim wrote:
Interesting. It seems to be related to the way your graphics card does vsync.

Mine - and yours under FRAPS - places the "wait for vsync" between "end drawing" and "begin update". Yours normally, however, places it between "begin draw" and "begin opaque pass". I wonder if that means there's then a bad interaction between the 60Hz cycle of your display and the 100Hz cycle of the Oolite main event loop that means occasionally one just misses the other.

In src/Core/GameController.m

Code: Select all

- (void) startAnimationTimer
{
	if (timer == nil)
	{   
		NSTimeInterval ti = 0.01;
try changing 'ti' to 0.005 (and if that doesn't help, 0.001) and see if that makes a difference. It might not do anything, but it's worth a try.
0.005 made this happen:

Code: Select all

01:16:17.784 [universe.profile.update]: Begin update
01:16:17.784 [universe.profile.update]: update:entity
01:16:17.784 [universe.profile.update]: updating linked lists
01:16:17.784 [universe.profile.update]: collision and shadow detection
01:16:17.784 [universe.profile.update]: clean up
01:16:17.784 [universe.profile.update]: JS Garbage Collection
01:16:17.784 [universe.profile.update]: Update complete
01:16:17.784 [universe.profile.draw]: Begin draw
01:16:17.784 [universe.profile.draw]: Begin opaque pass
01:16:17.784 [universe.profile.draw]: Begin translucent pass
01:16:17.785 [universe.profile.draw]: Begin HUD
01:16:17.785 [universe.profile.draw]: End drawing
01:16:17.799 [universe.profile.update]: Begin update
01:16:17.799 [universe.profile.update]: update:entity
01:16:17.799 [universe.profile.update]: updating linked lists
01:16:17.799 [universe.profile.update]: collision and shadow detection
01:16:17.799 [universe.profile.update]: clean up
01:16:17.799 [universe.profile.update]: JS Garbage Collection
01:16:17.799 [universe.profile.update]: Update complete
01:16:17.799 [universe.profile.draw]: Begin draw
01:16:17.799 [universe.profile.draw]: Begin opaque pass
01:16:17.799 [universe.profile.draw]: Begin translucent pass
01:16:17.800 [universe.profile.draw]: Begin HUD
01:16:17.800 [universe.profile.draw]: End drawing
01:16:17.815 [universe.profile.update]: Begin update
01:16:17.815 [universe.profile.update]: update:entity
01:16:17.815 [universe.profile.update]: updating linked lists
01:16:17.815 [universe.profile.update]: collision and shadow detection
01:16:17.815 [universe.profile.update]: clean up
01:16:17.815 [universe.profile.update]: JS Garbage Collection
01:16:17.815 [universe.profile.update]: Update complete
01:16:17.816 [universe.profile.draw]: Begin draw
01:16:17.816 [universe.profile.draw]: Begin opaque pass
01:16:17.816 [universe.profile.draw]: Begin translucent pass
01:16:17.816 [universe.profile.draw]: Begin HUD
01:16:17.816 [universe.profile.draw]: End drawing
:D :D :D
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: twitchy graphics

Post by Diziet Sma »

:shock: Wow.. that looks solid as a rock!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: twitchy graphics

Post by cim »

Zieman wrote:
0.005 made this happen:
1ms to complete the main game loop? That's some impressive hardware you've got there. Right, that change can go into 1.79 source when I get a moment, then.

While you're here with that hardware ... could you try the anti-aliasing hidden setting in 1.79? (In GNUStepDefaults, key "anti-aliasing", boolean value "1") It'll be interesting to see how much time that adds to the loop on a high-end PC.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

cim wrote:
While you're here with that hardware ... could you try the anti-aliasing hidden setting in 1.79? (In GNUStepDefaults, key "anti-aliasing", boolean value "1") It'll be interesting to see how much time that adds to the loop on a high-end PC.
Ok, I'll check that out tonight.
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: twitchy graphics

Post by another_commander »

Although I am fine with the change in the animation timer going in, I must report that it does not have the same effect for me. I can now reach 150fps in windowed mode with Griff's ships in, but still getting the main loop delay between the opaque and translucent passes and not at the start of the frame update, as Zieman's log shows. Additionally, the occasional stutter is still there. It is maybe not as evident as before, but this could be just my impression.

Could we somehow force the game to wait for refresh before starting a new frame? If so, maybe that could be the solution that works for all?

For reference, this is what I am getting with the animation timer set to 0.005 and Griff's ships, watching the station rotating in front of me:

Code: Select all

09:31:58.023 [universe.profile.update]: Begin update
09:31:58.023 [universe.profile.update]: update:entity
09:31:58.024 [universe.profile.update]: updating linked lists
09:31:58.024 [universe.profile.update]: collision and shadow detection
09:31:58.024 [universe.profile.update]: clean up
09:31:58.024 [universe.profile.update]: JS Garbage Collection
09:31:58.024 [universe.profile.update]: Update complete
09:31:58.024 [universe.profile.draw]: Begin draw
09:31:58.024 [universe.profile.draw]: Begin opaque pass
09:31:58.039 [universe.profile.draw]: Begin translucent pass
09:31:58.040 [universe.profile.draw]: Begin HUD
09:31:58.041 [universe.profile.draw]: End drawing
Edit: Tried also to set the animation timer to 0.016666 (almost exact 60fps equivalent), just to cover the case of the game loop timer somehow missing the refresh rate, but it did not seem to change anything.

Edit2: For one reason or another (gfx card drivers most likely), it seems to work as it does for Zieman in full screen mode. The game appears to play smooth indeed, but I'd really like to hear the opinion of others once the animation timer change goes in.

Code: Select all

...
14:00:13.626 [universe.profile.draw]: End drawing

14:00:13.636 [universe.profile.update]: Begin update
14:00:13.636 [universe.profile.update]: update:entity
14:00:13.637 [universe.profile.update]: updating linked lists
14:00:13.637 [universe.profile.update]: collision and shadow detection
14:00:13.637 [universe.profile.update]: clean up
14:00:13.637 [universe.profile.update]: JS Garbage Collection
14:00:13.637 [universe.profile.update]: Update complete
14:00:13.637 [universe.profile.draw]: Begin draw
14:00:13.637 [universe.profile.draw]: Begin opaque pass
14:00:13.641 [universe.profile.draw]: Begin translucent pass
14:00:13.641 [universe.profile.draw]: Begin HUD
14:00:13.642 [universe.profile.draw]: End drawing

14:00:13.652 [universe.profile.update]: Begin update
14:00:13.652 [universe.profile.update]: update:entity
14:00:13.653 [universe.profile.update]: updating linked lists
14:00:13.653 [universe.profile.update]: collision and shadow detection
14:00:13.653 [universe.profile.update]: clean up
14:00:13.653 [universe.profile.update]: JS Garbage Collection
14:00:13.653 [universe.profile.update]: Update complete
14:00:13.653 [universe.profile.draw]: Begin draw
14:00:13.654 [universe.profile.draw]: Begin opaque pass
14:00:13.657 [universe.profile.draw]: Begin translucent pass
14:00:13.657 [universe.profile.draw]: Begin HUD
14:00:13.658 [universe.profile.draw]: End drawing

14:00:13.669 [universe.profile.update]: Begin update
...
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

Did I apply the hidden setting right?
.GNUstepDefaults:

Code: Select all

{
    NSGlobalDomain = {
    };
    oolite = {
	"Jameson-humbletrash" = "-29624";
	"anti-aliasing" = 1;
	"debug-settings-override" = {
	};
	fullscreen = YES;
    };
}
also tried it as:

Code: Select all

{
    NSGlobalDomain = {
    };
    oolite = {
	"Jameson-humbletrash" = "-29624";
	"anti-aliasing" = YES;
	"debug-settings-override" = {
	};
	fullscreen = YES;
    };
}
Both ways the results are similar:

Code: Select all

19:16:32.533 [universe.profile.update]: Begin update
19:16:32.533 [universe.profile.update]: update:entity
19:16:32.533 [universe.profile.update]: updating linked lists
19:16:32.533 [universe.profile.update]: collision and shadow detection
19:16:32.533 [universe.profile.update]: clean up
19:16:32.533 [universe.profile.update]: JS Garbage Collection
19:16:32.533 [universe.profile.update]: Update complete
19:16:32.533 [universe.profile.draw]: Begin draw
19:16:32.533 [universe.profile.draw]: Begin opaque pass
19:16:32.533 [universe.profile.draw]: Begin translucent pass
19:16:32.533 [universe.profile.draw]: Begin HUD
19:16:32.534 [universe.profile.draw]: End drawing
19:16:32.549 [universe.profile.update]: Begin update
19:16:32.549 [universe.profile.update]: update:entity
19:16:32.549 [universe.profile.update]: updating linked lists
19:16:32.549 [universe.profile.update]: collision and shadow detection
19:16:32.549 [universe.profile.update]: clean up
19:16:32.549 [universe.profile.update]: JS Garbage Collection
19:16:32.549 [universe.profile.update]: Update complete
19:16:32.549 [universe.profile.draw]: Begin draw
19:16:32.549 [universe.profile.draw]: Begin opaque pass
19:16:32.549 [universe.profile.draw]: Begin translucent pass
19:16:32.550 [universe.profile.draw]: Begin HUD
19:16:32.550 [universe.profile.draw]: End drawing
19:16:32.565 [universe.profile.update]: Begin update
19:16:32.565 [universe.profile.update]: update:entity
19:16:32.565 [screenshot]: Saved screen shot "oolite-003.png" (1920 x 1080 pixels).
19:16:33.053 [universe.profile.update]: updating linked lists
19:16:33.053 [universe.profile.update]: collision and shadow detection
19:16:33.053 [universe.profile.update]: clean up
19:16:33.053 [universe.profile.update]: JS Garbage Collection
19:16:33.053 [universe.profile.update]: Update complete
19:16:33.053 [universe.profile.draw]: Begin draw
19:16:33.053 [universe.profile.draw]: Begin opaque pass
19:16:33.053 [universe.profile.draw]: Begin translucent pass
19:16:33.054 [universe.profile.draw]: Begin HUD
19:16:33.054 [universe.profile.draw]: End drawing
19:16:33.068 [universe.profile.update]: Begin update
19:16:33.068 [universe.profile.update]: update:entity
19:16:33.068 [universe.profile.update]: updating linked lists
19:16:33.068 [universe.profile.update]: collision and shadow detection
19:16:33.068 [universe.profile.update]: clean up
19:16:33.068 [universe.profile.update]: JS Garbage Collection
19:16:33.069 [universe.profile.update]: Update complete
19:16:33.069 [universe.profile.draw]: Begin draw
19:16:33.069 [universe.profile.draw]: Begin opaque pass
19:16:33.069 [universe.profile.draw]: Begin translucent pass
19:16:33.069 [universe.profile.draw]: Begin HUD
19:16:33.069 [universe.profile.draw]: End drawing
19:16:33.084 [universe.profile.update]: Begin update
19:16:33.084 [universe.profile.update]: update:entity
19:16:33.084 [universe.profile.update]: updating linked lists
19:16:33.084 [universe.profile.update]: collision and shadow detection
19:16:33.084 [universe.profile.update]: clean up
19:16:33.084 [universe.profile.update]: JS Garbage Collection
19:16:33.084 [universe.profile.update]: Update complete
19:16:33.084 [universe.profile.draw]: Begin draw
19:16:33.084 [universe.profile.draw]: Begin opaque pass
19:16:33.084 [universe.profile.draw]: Begin translucent pass
19:16:33.084 [universe.profile.draw]: Begin HUD
19:16:33.085 [universe.profile.draw]: End drawing
19:16:33.099 [universe.profile.update]: Begin update
19:16:33.099 [universe.profile.update]: update:entity
19:16:33.099 [universe.profile.update]: updating linked lists
19:16:33.099 [universe.profile.update]: collision and shadow detection
19:16:33.099 [universe.profile.update]: clean up
19:16:33.099 [universe.profile.update]: JS Garbage Collection
19:16:33.099 [universe.profile.update]: Update complete
19:16:33.099 [universe.profile.draw]: Begin draw
19:16:33.100 [universe.profile.draw]: Begin opaque pass
19:16:33.100 [universe.profile.draw]: Begin translucent pass
19:16:33.100 [universe.profile.draw]: Begin HUD
19:16:33.100 [universe.profile.draw]: End drawing
19:16:33.115 [universe.profile.update]: Begin update
19:16:33.115 [universe.profile.update]: update:entity
19:16:33.116 [universe.profile.update]: updating linked lists
19:16:33.116 [universe.profile.update]: collision and shadow detection
19:16:33.116 [universe.profile.update]: clean up
19:16:33.116 [universe.profile.update]: JS Garbage Collection
19:16:33.116 [universe.profile.update]: Update complete
19:16:33.116 [universe.profile.draw]: Begin draw
19:16:33.116 [universe.profile.draw]: Begin opaque pass
19:16:33.116 [universe.profile.draw]: Begin translucent pass
19:16:33.116 [universe.profile.draw]: Begin HUD
19:16:33.116 [universe.profile.draw]: End drawing
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

What I don't understand, is why V-sync seems to be ON no matter what settings I use in MyOpenGLView.m or NVidia control panel.
Does Oolite have a hidden .GNUstepsDefault setting for V-sync too?
Or maybe Oolite reads monitor refresh rate & forces that to be used?
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: twitchy graphics

Post by cim »

Anti-aliasing settings look fine. I'm impressed that it seems to have no effect whatsoever on rendering times for you...
Zieman wrote:
What I don't understand, is why V-sync seems to be ON no matter what settings I use in MyOpenGLView.m or NVidia control panel.
Does Oolite have a hidden .GNUstepsDefault setting for V-sync too?
Or maybe Oolite reads monitor refresh rate & forces that to be used?
Nothing like that, so far as I know. That line SDL_GL is the only one where Oolite sets vsync, and if I turn that off and the Nvidia settings to off, I get no vsync.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: twitchy graphics

Post by Cody »

Same here... if V-sync is off in the Nvidia control panel, it's off in-game.
Zieman... you have given that build its own profile in the Nvidia control panel, yes?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

Cody wrote:
Same here... if V-sync is off in the Nvidia control panel, it's off in-game.
I would have thought so. For every other game this is true.

Cody wrote:
Zieman... you have given that build its own profile in the Nvidia control panel, yes?
Yes I have. And I have tried setting both that profile and the global settings to no V-sync, to no avail. I even tried to rename my 'regular' Oolite folder to something else, in case it interferes. And applying same V-sync off settings to all Oolite executables' profiles.
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: twitchy graphics

Post by another_commander »

Zieman wrote:
Cody wrote:
Same here... if V-sync is off in the Nvidia control panel, it's off in-game.
I would have thought so. For every other game this is true.
Does "every other game" include games running under OpenGL or only ones running under DirectX? Your driver issue could be OpenGL-specific.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

another_commander wrote:
Zieman wrote:
Cody wrote:
Same here... if V-sync is off in the Nvidia control panel, it's off in-game.
I would have thought so. For every other game this is true.
Does "every other game" include games running under OpenGL or only ones running under DirectX? Your driver issue could be OpenGL-specific.
Yes it does, FooBillard for example (Free OpenGL billiard game).
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: twitchy graphics

Post by Zieman »

Might still be OpenGL / NVidia issue, OpenGL -stuff behaves differently than DirectX -stuff.

DirectX:
- benchmarks can reach up to 1000+ FPS
- older games can have ridiculous FPS too (like Rally Trophy - biggest number I saw in the menus was over 6000 FPS, game engine seems locked at 250 FPS max)
- even Elite: Dangerous goes up to several hundred at times.

OpenGL:
- Oolite seems to be locked to 56-63 FPS (FRAPS reports almost stable 60, very rarely drops to 59)
- FooBillard seems to be locked at 90 FPS (FRAPS, might vary similarly to Oolite, but FRAPS doesn't refresh often enough to show that)
- FurMark 1.12.0 shows 70 FPS (1920x1080 preset with no AA, min 70 & max 72)
- FurMark 1.12.0 shows 110 FPS (1280x720 preset with no AA, min 109 & max 112)
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
Post Reply