DXX-Rebirth Forum

Full Version: vsync
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Hi. pretty new to this forum so hope i'm posting this correctly. Seem to have an unusual problem with vsync. using windows 58.1 for descent 1. i'm on windows xp sp3,  amd athlon with with 1.99ghz chip and 256 ram. my video card is asus radeon 9200Se. i was running d1 with a frame cap of 40. below that , when scanning certain textures, they become blurry at high speed strafe. then I noticed a red textured section with white lights vertically between the panels of red textures. as I scan my mouse left to right, I get frame tearing. Not the dotty line tears I'm used to seeing on other games, but more of a frame lag kind of blur/choppyness. sorry hard to explain. anyway. the game is set to run at 848x480 with trilinear filtering. as I've mentioned the frame cap by using the.ini file is set to max 40. Ok, 1 more thing. my comp is set desktop at 800x600 85 refresh rate, and I play full screen, which affects my opengl settings.

the 848x480 also runs at 85 refresh rate, as verified by my monitor. when I put frame counter on /in game I get the expected 40 fps.,,now... if I put vsync on, it immediately removes the choppy tearing effect mentioned above, but now the frame rate is 60. so even though I have frame cap of 40 in the ini file, my own refresh rate for 848x480 is set to 85... using vync in game I now get 60 fps, with no tearing. ok. so I take off vync, it goes back to 40 fps. I change max frame rate to 60, in the ini file, and I'm getting tearing at 60. I even get tearing above that. but with vsync, and frame rate of 60 , I get no tearing.

the strange thing about this is why it runs itself at 60fps? when all my resolutions for my video card are set for 85 refresh. The tearing is definitely a vync problem , rather than a too low frame rate set. Is there a way to change the vsync to work at 40fps? I doubt if I could set my refresh rate for 40, but as shown, even when set  at 85, it still causes the game to vync at 60. Is this a bug with rebirth's vync? or possibly my video card? sorry for this lengthy explanation, but it's confusing to me, and I'm new to this software. any input would be appreciated.
It's normal, that VSync will ignore all custom FPS settings. To get rid of the tearing, your game needs to render with an FPS count that is matching your refresh rate or a multiple or a fraction (i.e. refresh*2, refresh*3, refresh/2, etc.). So you could not render at 40FPS without tearing.

Why the game however goes to 60 in your case, I could not say. It's not a limit coded into Rebirth itself but rather something done by SDL and your video card/driver. Even tho it kinda makes sense since CRT monitors usually have different refresh rates on different resolutions. So if 800x600 uses 85Hz, I would expect that 800x480 would have a different refresh rate. At least as far as I can recall. Might be worth knowing what monitor you have and I might be able to confirm this.

All in all, as long as the tearing is gone and the game is smooth, VSync seems to do it's job right. The question for me is: Why do you want the game at 40FPS so bad?
Hmm strange indeed, I wouldn't probably touch this game with 40fps Wink
As for vsync - I've got the same pretty much. No matter what refresh rate I would set (usually it's 85) vsync - ON is always 60 fps and jerky video (especially when flying into new area)- so I just don't use vsync at all - seems buggy or I don't know.
With no vsync AND no ini fps cap - its OK - mostly 200fps except some strange cases when it goes down as low as 30 but that's level dependant. 200 (uncapped) is less visually consistent with hits and collisions, but best option for me since it's smooth - no tearing at all. I'm also 'happy' Radeon 9550 user.

PS blame SDL - it is piece of **** but it's free and handy allright.
First of all, let me apologize for not checking through other posts to the forum. There were some related to vsync, which I should have checked "before" posting, according to the rules. In any case... thankyou so much for the intelligent responses.

monitor: sony trinitron 15"-multiscan E100 series. 848x480 is set up to run at 85hz, and it does, all the time, and in game, as verified by the monitor itself, during the game.(actually I only use this res with opengl games, not desktop. seems to give better view size. plus, the vsync problem occured in software mode too, not just opengl-forgot to mention that last time). It has a switch(the monitor does) which shows resolution, and refresh rate. I've set all the resolutions , that I use to 85. best on the eyes. even 75, bothers me sometimes. what confuses me , unless I'm not understanding this correctly, is in order for a display to be "in" vsync, the refresh rate, ,must match the frame rate?  so how could it be in vsync if my refresh is 85, and the frame rate is 60?(and I can certainly tell the difference between a 60 refresh and an 85) but as you said, zico, if it runs smoothly with vsync, at 60 , why look a gift horse in the mouth. right? and it is ABSOLUTELY smooth-running with vsync on.

Being a bit crazy probably, but I thought at 40 frame rate, with hamer build 1, the homers were easier to handle. but now I'm using hamer build 2, with vsync on, frame rate locked at 60, and I seem to be doing fine. Although, I have improved, after 10 levels of apocalyptic factor.

as far as the matching frame rate and refresh rate, oddly enough when I set frame cap to 85, with vsync off, I still get tearing. weird.

in response to aqqman, if I keep frame rate unlimited, and use a monitor refresh of 85, game frame rate tried to remain at 200, but does drop of course during high animation sequences, but no tearing. but I truly don't see any difference between 200 and 60 frames. the vsync really works for me.

I have also experimented with double buffering on and off, and 4x sampling. I like the 4x sampling on, but double buffering makes no difference in tearing, which I thought it might, but doesn't so I turned it off in the ini.  I use transparency, and colored lighting. so , thanks once again for your input, and glad to know it's not a bug.
It may very well be SDL responsible for this error. After all the Sync flag is obsolete and during the transition to SDL2, things will change. But it may also be related to AMD drivers. Honestly, those guys OpenGL support sometimes is downright awful.

A workaround might be checking if Vsync can be forced via the graphics driver options and leaving the setting OFF in the game.

And you are right, denny. If the game runs at 60FPS, it is not in sync with your display. For all I know, there should be tearing. But chances are you are not seeing it or somehow SDL manages to still render 60 FPS with different pauses between each frame so each frame rendered would be in sync with the display. But somehow I doubt that.

About -doublebuffer:
I have no idea why this is still in there. Since the event system, this flag is obsolete and does absolutley nothing. But it was only meant for debugging anyways. If it would work, all you'd get is either a flickering or completely black screen. Smile

Multisample should also not affect this - it's just one of many Antialiasing methods. However I am not sure how you tested the Software renderer. In this build - if you compiled it - there should be no VSync option whatsoever. Since VSync only works with OpenGL in the first place. So I am a bit confused about that. Do you mean you just switched off Texture Filtering? Cause that would still be OpenGL rendering.

And no, you cannot simply reach VSync by setting the game to 85FPS either (-maxfps 85). The ingame FPS setting only works with a VERY limited accuracy. You can make this a bit more precise by setting -nonicefps with it, but it's still not precise enough to match your refresh rate. As aqqman implied, if you can't get VSync, it's probably better to unlock FPS completely. Then you get a multitude of FPS required and chances for tearing become smaller as well. Still it's not AS GOOD as true VSync. Like I said, if you can, check your GPU options and see if you can force VSync on in your video settings. If that works, you should have the best setup and no problems.
I tried turning off vsync in game and setting it "always on" on my video card. Doesn't seem to affect anything.

maybe sdl is pausing the display somehow, because as I've mentioned when in game vsync is applied the tearing stops, even though frame rate is 60, as opposed to my refresh of 85.

you are right, I only turned off texture filtering. was not running in software.

so in conclusion, I think I'll run it with vsync @ 60, with my refresh @85, because this one runs very smoothly. Will continue using hamer build 2 for descent 1, until there's an update. I think that keeps the hamers at 30fps even though the game frame rate is 60. Unless I misunderstood that , too .

one more thing.. straight from the twilight zone

I made 2 demos to demonstrate what I am considering "tearing". maybe it's something different?

the first demo, is vsync on which runs at 60frames due to the vsync, the second "vsync off" which runs at 40 frames due to frame cap. HOWEVER.. YOU MUST TURN OFF VSYNC IN "YOUR" MENU while playing the demos, otherwise you don't get the tearing in "vsync off" demo. Well, at least on my machine playback that is.

You can probably not accurately simulate tearing with demos. Those things are always recorded with a maximum of 20 images per second. Then when you play them back, they will be interpolated to whatever FPS setting your game runs at. Additionally the demos format saves space with some other tricks which makes the playback a bit choppy. Sometimes, toggeling VSync changes the playback a bit - depending on how VSync plays together with the interpolation. I.e. if GameFPS / 20 = integer -> smoother playback - in theory (theory because demos only record at AVERAGE 20FPS depending on your game FPS which in turn are average, too (unless VSync) since the timers in SDL count in full milliseconds. Now of course I hear you ask: "Does that now mean if I set 60 FPS and the game says 64 - will my game run faster or slower than it should?". No it does not. It means the game runs at 64FPS - period. Technically speaking there is never such a thing as perfect accuracy but it's enough for Descent - after all this isn't the LHC. Wait.. where were we? Oh yeah! Demos!

So long story short: Demos will not accurately represent the performance of the actual game. 
windows XP has something of a refresh rate bug... itll always choose 60hz in-game if available.

unless... 85hz is the only refresh rate to choose from!
download REFORCE to modify/limit your available refresh rates.
(its a very easy simple stand alone program)
Right... I forgot about that since it's been a pain some years ago and it stopped buggin me with current setup (in all other games). But I guess it is still present for Dxx for some reason. Thanks for suggesting that.
thugsrook: you are correct. been there done that, and already have reforce. Have all useable resolutions, set for 85hz refresh rate. One of the reasons I can't understand why rebirth tries to sync at 60, while at the same time the monitor refresh remains a steady 85. Wasn't aware it was a bug with xp. Thanks for the info.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25