twitchy graphics
Moderators: winston, another_commander, Getafix
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: twitchy graphics
Nightly 0b97d57 should be out with a timer change slightly different to what was discussed above. Could someone please re-run the universe profiling checks and let us know whether this build does anything about the stutter issues?
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: twitchy graphics
A very quick test, with a full OXP load-out:
No stutter seen as yet - I'll run a longer test when I've had coffee.
Code: Select all
11:37:49.874 [universe.profile.update]: Begin update
11:37:49.874 [universe.profile.update]: update:entity
11:37:49.876 [universe.profile.update]: updating linked lists
11:37:49.876 [universe.profile.update]: collision and shadow detection
11:37:49.876 [universe.profile.update]: clean up
11:37:49.876 [universe.profile.update]: JS Garbage Collection
11:37:49.876 [universe.profile.update]: Update complete
11:37:49.876 [universe.profile.draw]: Begin draw
11:37:49.876 [universe.profile.draw]: Begin opaque pass
11:37:49.878 [universe.profile.draw]: Begin translucent pass
11:37:49.878 [universe.profile.draw]: Begin HUD
11:37:49.879 [universe.profile.draw]: End drawing
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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: twitchy graphics
New build, just downloaded & compiled.
I think I got the twitchy part in the log now (when animation is smooth, you get 14-18 ms between "End drawing" and "Begin update", but here you see only 3 ms followed by 27 ms - clearly visible twitch in game:
I think I got the twitchy part in the log now (when animation is smooth, you get 14-18 ms between "End drawing" and "Begin update", but here you see only 3 ms followed by 27 ms - clearly visible twitch in game:
Code: Select all
14:48:07.083 [universe.profile.update]: Begin update
14:48:07.083 [universe.profile.update]: update:entity
14:48:07.083 [universe.profile.update]: updating linked lists
14:48:07.083 [universe.profile.update]: collision and shadow detection
14:48:07.083 [universe.profile.update]: clean up
14:48:07.083 [universe.profile.update]: JS Garbage Collection
14:48:07.083 [universe.profile.update]: Update complete
14:48:07.083 [universe.profile.draw]: Begin draw
14:48:07.083 [universe.profile.draw]: Begin opaque pass
14:48:07.083 [universe.profile.draw]: Begin translucent pass
14:48:07.083 [universe.profile.draw]: Begin HUD
14:48:07.084 [universe.profile.draw]: End drawing
14:48:07.099 [universe.profile.update]: Begin update
14:48:07.099 [universe.profile.update]: update:entity
14:48:07.099 [universe.profile.update]: updating linked lists
14:48:07.100 [universe.profile.update]: collision and shadow detection
14:48:07.100 [universe.profile.update]: clean up
14:48:07.100 [universe.profile.update]: JS Garbage Collection
14:48:07.100 [universe.profile.update]: Update complete
14:48:07.100 [universe.profile.draw]: Begin draw
14:48:07.100 [universe.profile.draw]: Begin opaque pass
14:48:07.100 [universe.profile.draw]: Begin translucent pass
14:48:07.100 [universe.profile.draw]: Begin HUD
14:48:07.100 [universe.profile.draw]: End drawing
14:48:07.103 [universe.profile.update]: Begin update
14:48:07.103 [universe.profile.update]: update:entity
14:48:07.103 [universe.profile.update]: updating linked lists
14:48:07.103 [universe.profile.update]: collision and shadow detection
14:48:07.103 [universe.profile.update]: clean up
14:48:07.103 [universe.profile.update]: JS Garbage Collection
14:48:07.103 [universe.profile.update]: Update complete
14:48:07.103 [universe.profile.draw]: Begin draw
14:48:07.103 [universe.profile.draw]: Begin opaque pass
14:48:07.103 [universe.profile.draw]: Begin translucent pass
14:48:07.103 [universe.profile.draw]: Begin HUD
14:48:07.104 [universe.profile.draw]: End drawing
14:48:07.131 [universe.profile.update]: Begin update
14:48:07.131 [universe.profile.update]: update:entity
14:48:07.131 [universe.profile.update]: updating linked lists
14:48:07.131 [universe.profile.update]: collision and shadow detection
14:48:07.131 [universe.profile.update]: clean up
14:48:07.131 [universe.profile.update]: JS Garbage Collection
14:48:07.131 [universe.profile.update]: Update complete
14:48:07.131 [universe.profile.draw]: Begin draw
14:48:07.131 [universe.profile.draw]: Begin opaque pass
14:48:07.132 [universe.profile.draw]: Begin translucent pass
14:48:07.132 [universe.profile.draw]: Begin HUD
14:48:07.132 [universe.profile.draw]: End drawing
14:48:07.148 [universe.profile.update]: Begin update
14:48:07.148 [universe.profile.update]: update:entity
14:48:07.148 [universe.profile.update]: updating linked lists
14:48:07.148 [universe.profile.update]: collision and shadow detection
14:48:07.148 [universe.profile.update]: clean up
14:48:07.148 [universe.profile.update]: JS Garbage Collection
14:48:07.148 [universe.profile.update]: Update complete
14:48:07.148 [universe.profile.draw]: Begin draw
14:48:07.148 [universe.profile.draw]: Begin opaque pass
14:48:07.148 [universe.profile.draw]: Begin translucent pass
14:48:07.148 [universe.profile.draw]: Begin HUD
14:48:07.149 [universe.profile.draw]: End drawing
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: twitchy graphics
Yep, the stutter is still there - on a rotating Coriolis, and when I frag a Viper.
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!
And any survivors, their debts I will certainly pay. There's always a way!
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: twitchy graphics
Seems that there was a slight mistake with commit 0b97d57 and the intended fix did not go in. Those who can build from source, please go ahead and update to commit 925a403, otherwise hold for tomorrow's nightly.
Re: twitchy graphics
Updated, but alas, the jittering seems to have only increased. Visible in the log too (same 3 ms followed by a whopping 29 ms now ):
Code: Select all
15:27:07.589 [universe.profile.update]: Begin update
15:27:07.589 [universe.profile.update]: update:entity
15:27:07.589 [universe.profile.update]: updating linked lists
15:27:07.589 [universe.profile.update]: collision and shadow detection
15:27:07.589 [universe.profile.update]: clean up
15:27:07.589 [universe.profile.update]: JS Garbage Collection
15:27:07.589 [universe.profile.update]: Update complete
15:27:07.589 [universe.profile.draw]: Begin draw
15:27:07.589 [universe.profile.draw]: Begin opaque pass
15:27:07.589 [universe.profile.draw]: Begin translucent pass
15:27:07.589 [universe.profile.draw]: Begin HUD
15:27:07.590 [universe.profile.draw]: End drawing
15:27:07.605 [universe.profile.update]: Begin update
15:27:07.605 [universe.profile.update]: update:entity
15:27:07.605 [universe.profile.update]: updating linked lists
15:27:07.605 [universe.profile.update]: collision and shadow detection
15:27:07.605 [universe.profile.update]: clean up
15:27:07.605 [universe.profile.update]: JS Garbage Collection
15:27:07.605 [universe.profile.update]: Update complete
15:27:07.605 [universe.profile.draw]: Begin draw
15:27:07.605 [universe.profile.draw]: Begin opaque pass
15:27:07.605 [universe.profile.draw]: Begin translucent pass
15:27:07.605 [universe.profile.draw]: Begin HUD
15:27:07.606 [universe.profile.draw]: End drawing
15:27:07.609 [universe.profile.update]: Begin update
15:27:07.609 [universe.profile.update]: update:entity
15:27:07.609 [universe.profile.update]: updating linked lists
15:27:07.609 [universe.profile.update]: collision and shadow detection
15:27:07.609 [universe.profile.update]: clean up
15:27:07.609 [universe.profile.update]: JS Garbage Collection
15:27:07.609 [universe.profile.update]: Update complete
15:27:07.609 [universe.profile.draw]: Begin draw
15:27:07.609 [universe.profile.draw]: Begin opaque pass
15:27:07.609 [universe.profile.draw]: Begin translucent pass
15:27:07.609 [universe.profile.draw]: Begin HUD
15:27:07.610 [universe.profile.draw]: End drawing
15:27:07.639 [universe.profile.update]: Begin update
15:27:07.639 [universe.profile.update]: update:entity
15:27:07.639 [universe.profile.update]: updating linked lists
15:27:07.639 [universe.profile.update]: collision and shadow detection
15:27:07.639 [universe.profile.update]: clean up
15:27:07.639 [universe.profile.update]: JS Garbage Collection
15:27:07.639 [universe.profile.update]: Update complete
15:27:07.639 [universe.profile.draw]: Begin draw
15:27:07.639 [universe.profile.draw]: Begin opaque pass
15:27:07.639 [universe.profile.draw]: Begin translucent pass
15:27:07.639 [universe.profile.draw]: Begin HUD
15:27:07.640 [universe.profile.draw]: End drawing
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Re: twitchy graphics
Weird: recording a short video with FRAPS cures the twitchiness, during recording and after recording(!) : smooth.
Quit the game, quit FRAPS, launch the game - jittering again.
Quit the game, quit FRAPS, launch the game - jittering again.
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: twitchy graphics
Zieman, if you just launch Fraps before Oolite and run Oolite without recording anything, is it smooth or jittery? Also, can you please confirm that resetting the animation timer back to 0.01 in GameController.m generates universe profile logs like the first ones you posted, where the frame sync delay appeared in the middle of a frame process, even with Fraps running in the background?
The stutter logged in your last post looks like a driver caused sync problem. 29ms is very close to the sum of the sync delay time for two frames, right? So it looks like for some reason one frame was sent for display too early. Then the frame was displayed and the driver started waiting for sync delay. But instead of acknowledging an "oh, shoot! I sent that one too early" moment and waiting for one frame's sync delay (approx. 14ms), then continue, it did all the waiting for both the frame before the one that was sent too early, plus the waiting for the early frame, possibly because those two waits were already scheduled internally. Of course I could be completely off with this theory, but 27 and 29 ms fit pretty close and I don't think they are just accidental values.
I believe Fraps uses a driver of its own to tap an already running OpenGL/DX application and do its thing. If this is correct, then maybe Oolite is not at fault here, in the sense that there could be nothing in its code that would specifically cause the stutter we witness. What may probably be missing is code that specifically avoids it. Maybe we should look into a v-sync implementation internal to Oolite, that only starts processing frames when the game itself confirms through its running timers that it is OK to do so?
One more thing: Is there anyone who plays Oolite without witnessing any stuttering at all at this moment? When I was at the Elite Meet in the UK in November, I remember the (high-end) machine where Oolite was running and I remember it because it was all so smooth and nice and it seemed to me there was no stutter at all. So I'd be interested to hear from people who don't witness any jitter, stutter or twitch, if there are any. If there are, system specs would be most welcome.
The stutter logged in your last post looks like a driver caused sync problem. 29ms is very close to the sum of the sync delay time for two frames, right? So it looks like for some reason one frame was sent for display too early. Then the frame was displayed and the driver started waiting for sync delay. But instead of acknowledging an "oh, shoot! I sent that one too early" moment and waiting for one frame's sync delay (approx. 14ms), then continue, it did all the waiting for both the frame before the one that was sent too early, plus the waiting for the early frame, possibly because those two waits were already scheduled internally. Of course I could be completely off with this theory, but 27 and 29 ms fit pretty close and I don't think they are just accidental values.
I believe Fraps uses a driver of its own to tap an already running OpenGL/DX application and do its thing. If this is correct, then maybe Oolite is not at fault here, in the sense that there could be nothing in its code that would specifically cause the stutter we witness. What may probably be missing is code that specifically avoids it. Maybe we should look into a v-sync implementation internal to Oolite, that only starts processing frames when the game itself confirms through its running timers that it is OK to do so?
One more thing: Is there anyone who plays Oolite without witnessing any stuttering at all at this moment? When I was at the Elite Meet in the UK in November, I remember the (high-end) machine where Oolite was running and I remember it because it was all so smooth and nice and it seemed to me there was no stutter at all. So I'd be interested to hear from people who don't witness any jitter, stutter or twitch, if there are any. If there are, system specs would be most welcome.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: twitchy graphics
Do you recall who owned that machine? It might pay to get in touch with them..another_commander wrote:When I was at the Elite Meet in the UK in November, I remember the (high-end) machine where Oolite was running and I remember it because it was all so smooth and nice and it seemed to me there was no stutter at all.
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
Re: twitchy graphics
Jittery.another_commander wrote:Zieman, if you just launch Fraps before Oolite and run Oolite without recording anything, is it smooth or jittery?
Not anymore, no difference in the logs.another_commander wrote:Also, can you please confirm that resetting the animation timer back to 0.01 in GameController.m generates universe profile logs like the first ones you posted, where the frame sync delay appeared in the middle of a frame process, even with Fraps running in the background?
This is worth investigating, IMHO.another_commander wrote:The stutter logged in your last post looks like a driver caused sync problem. 29ms is very close to the sum of the sync delay time for two frames, right? So it looks like for some reason one frame was sent for display too early. Then the frame was displayed and the driver started waiting for sync delay. But instead of acknowledging an "oh, shoot! I sent that one too early" moment and waiting for one frame's sync delay (approx. 14ms), then continue, it did all the waiting for both the frame before the one that was sent too early, plus the waiting for the early frame, possibly because those two waits were already scheduled internally. Of course I could be completely off with this theory, but 27 and 29 ms fit pretty close and I don't think they are just accidental values.
I believe Fraps uses a driver of its own to tap an already running OpenGL/DX application and do its thing. If this is correct, then maybe Oolite is not at fault here, in the sense that there could be nothing in its code that would specifically cause the stutter we witness. What may probably be missing is code that specifically avoids it. Maybe we should look into a v-sync implementation internal to Oolite, that only starts processing frames when the game itself confirms through its running timers that it is OK to do so?
I'm beginning to wonder if this is OS specific problem? How is it wit Linux / Mac ?another_commander wrote:One more thing: Is there anyone who plays Oolite without witnessing any stuttering at all at this moment? When I was at the Elite Meet in the UK in November, I remember the (high-end) machine where Oolite was running and I remember it because it was all so smooth and nice and it seemed to me there was no stutter at all. So I'd be interested to hear from people who don't witness any jitter, stutter or twitch, if there are any. If there are, system specs would be most welcome.
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: twitchy graphics
Smivs is on Linux, and he sees the stutter too.Zieman wrote:I'm beginning to wonder if this is OS specific problem? How is it wit Linux / Mac ?
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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: twitchy graphics
Ok, I did some testing, and got results too. I've uploaded a bunch of Latest.logs to box: https://app.box.com/s/4n0jmuo1at5t0il2g6em
File names should explain what way I've done the tests.
One interesting thing I noticed:
commenting out in MyOpenGLView.m did not get rid of V-sync, but changing the line to did the trick. Combined with in GameController.m I finally got results I expected, FPS-wise with V-sync OFF:
Another interesting thing I noticed that once I got Oolite to have no V-sync, NVidia Control Panel settings (General or Oolite.exe separate or together) have no effect on it. At least Oolite & FRAPS both report stable 99 FPS with in GameController.m. Well, I have no problem with that, since the graphics are smooth as silk and I notice no tearing on screen. Normal entity-related hiccups still occur though, very occasionally.
File names should explain what way I've done the tests.
One interesting thing I noticed:
commenting out
Code: Select all
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
Code: Select all
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0);
Code: Select all
NSTimeInterval ti = 0.001;
Another interesting thing I noticed that once I got Oolite to have no V-sync, NVidia Control Panel settings (General or Oolite.exe separate or together) have no effect on it. At least Oolite & FRAPS both report stable 99 FPS with
Code: Select all
NSTimeInterval ti = 0.01;
Last edited by Zieman on Sat Jan 18, 2014 11:52 pm, edited 1 time in total.
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: twitchy graphics
cim is on Linux and the stutters occur there too. I'd really be interested to hear our Mac users. If Mac users say they don't see this problem, maybe it could be SDL related, since Win and Linux ports both run under SDL.Cody wrote:Smivs is on Linux, and he sees the stutter too.Zieman wrote:I'm beginning to wonder if this is OS specific problem? How is it wit Linux / Mac ?
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Re: twitchy graphics
I'm on a Mac, and I get a stutter too. This is under strict mode, watching the Lave Coriolis:
Normal:
Stutter:
Normal again:
Normal:
Code: Select all
21:02:28.785 [universe.profile.update]: Begin update
21:02:28.785 [universe.profile.update]: update:entity
21:02:28.785 [universe.profile.update]: updating linked lists
21:02:28.785 [universe.profile.update]: collision and shadow detection
21:02:28.785 [universe.profile.update]: clean up
21:02:28.785 [universe.profile.update]: Update complete
21:02:28.786 [universe.profile.draw]: Begin draw
21:02:28.786 [universe.profile.draw]: Begin opaque pass
21:02:28.786 [universe.profile.draw]: Begin translucent pass
21:02:28.787 [universe.profile.draw]: Begin HUD
21:02:28.793 [universe.profile.draw]: End drawing
Code: Select all
21:02:28.805 [universe.profile.update]: Begin update
21:02:28.805 [universe.profile.update]: update:entity
21:02:28.812 [universe.profile.update]: updating linked lists
21:02:28.812 [universe.profile.update]: collision and shadow detection
21:02:28.812 [universe.profile.update]: clean up
21:02:28.812 [universe.profile.update]: Update complete
21:02:28.812 [universe.profile.draw]: Begin draw
21:02:28.812 [universe.profile.draw]: Begin opaque pass
21:02:28.898 [universe.profile.draw]: Begin translucent pass
21:02:28.899 [universe.profile.draw]: Begin HUD
21:02:28.900 [universe.profile.draw]: End drawing
Code: Select all
21:02:28.905 [universe.profile.update]: Begin update
21:02:28.905 [universe.profile.update]: update:entity
21:02:28.906 [universe.profile.update]: updating linked lists
21:02:28.906 [universe.profile.update]: collision and shadow detection
21:02:28.906 [universe.profile.update]: clean up
21:02:28.906 [universe.profile.update]: Update complete
21:02:28.906 [universe.profile.draw]: Begin draw
21:02:28.906 [universe.profile.draw]: Begin opaque pass
21:02:28.907 [universe.profile.draw]: Begin translucent pass
21:02:28.907 [universe.profile.draw]: Begin HUD
21:02:28.909 [universe.profile.draw]: End drawing
Re: twitchy graphics
My guess, since the "stutter" is generally in between "Begin opaque pass" and "Begin transparent pass" that some object is taking an unusually long time to draw. The likely reason for that is that it's a new object and it needs to load the textures in, but the texture loader hasn't finished and so the game has to wait for it. If you were playing on a computer with a lot of RAM it might be able to keep all of them pre-loaded and not have that happen.
There may be things which can be done to optimise it further, perhaps.
There may be things which can be done to optimise it further, perhaps.