The Big VSync Test!

Miscellaneous Forums/General Discussion/The Big VSync Test!

Hi, I know I said I wasn't going to do any more BlitzMax PC graphics testing, but I'm compelled to do this one:

http://www.greyaliengames.com/misc/vsync.zip (578K)

0) Shut down any other tasks. If you feel like doing a second test later with "normal" tasks running, then fine.

1) Make sure your graphics card does not have VSync Disabled in the driver. If it does, by all means report those test results, but also please test with VSync On or App Controlled.

2) Please run this exe and report back if you can see *any* vertical tearing or jerks at all on the rectangle as it moves. Hopefully you'll see none, but I'm not sure that will be the case on all hardware, hence the "Big Test".

3) Really your desktop should be 1024x768 so that the window fills the screen. If it doesn't fill your screen, please either a) change desktop res temporarily, or b) move the window to the top of the screen and check for tears, then move it to the bottom of the screen and check for tears (so that you've checked the whole screen). Thanks

4) Please post system specs.

Thanks loads!

Runs smooth and fast here - no jerks or tears.

I still get tears on the topmost part of the rectangle for about the first 50 or so pixels with vwait enabled, disabled and app controlled on my GeforceTI4600 XP system.

Jason.

Tested native resolutions and 1024, and all that jazz:

No tearing under any circumstances:
Windows XP: Dual Core 4800X2 slightly overclocked with Radeon X1900XT

Tearing badly:
Windows 2000: P2-400mhz, nVidia TNT.

I can't test this as my monitor can't do 1024x768.

ok, mixed results, thanks. Keep going ... I make a special 800x600 versoin later.

Here's the 800x600 version Big10p:

www.greyaliengames.com/misc/vsync2.zip (574K)

Vertical tearing in *one* place, but only say twice a second, randomly. Also, the movement jerks. I have that problem with everything on my computer :)

thanks. Oh dear. Cyg: remind me of you card, it's a Geforce right? So far in this thread all the Radeons are fine, and the Geforces aren't... This is the code btw:

Strict

Local DesktopRefreshRate = GetDeviceCaps(GetDC(0),VREFRESH)
Local w = 800, h = 600
Graphics (w,h,0,DesktopRefreshRate)

Local x = 0, y=0
While Not KeyDown(KEY_ESCAPE)
	Cls
	DrawRect (x,y,200,h)
	Flip
	x = x + 10
	If x > w Then x = 0
Wend

BUT I have Skidracer's VSync tweak in d3d7graphics.bmx. Just wondered how many machines it worked on.

With all background tasks off, I get frequent tearing at the top of the display. Movement is smooth, though.

win98SE Athlon 1Ghz GeForce2 GTS 32MB

ok, thanks for doing that. So a no go there too then...

I'm guessing this actually potentially tears on all cards but you don't notice due to the sheer speed on some systems.

I'm guessing this actually potentially tears on all cards but you don't notice due to the sheer speed on some systems.

Or, its an nvidia specific problem, but people are not posting their hardware...

Geforce 6800.

> I can't test this as my monitor can't do 1024x768.

Really? Christ, how old is it?

Really? Christ, how old is it?
It's not it's age that's the problem. Let me explain...

My dev PC started life as a dedicated MAME box. As such, I bought a second hand Hantarex 21" monitor that has a TV grade tube (i.e. massive dot pitch). This gives MAME games an authentic arcade look. It can only do a max of 800x600 60Hz. This is great for playing old arcade games - not so great for everything else. :/

Get a new monitor then dude.

Sure, if you're payin'. :)

Why you...! :)

I'm guessing this actually potentially tears on all cards but you don't notice due to the sheer speed on some systems.p
Yeah, if you mean that some cards/CPUs? are able to blit the backbuffer onto Windows whilst the scanline is still off-screen, and others are too slow, thus resulting in a visible scanline tear, you are correct. However, other complications are the fact that some cards' drivers simply can't return decent info to allow a VSync in the first place. I'm just trying to find out how wide spread the problem is.

Also what's best?

a) Some cards being 100% fine and others having a fixed tear

or

b) using flip 0 so all cards have random tearing.

Question: Does random tearing look "better" than a tear in a fixed place i.e. because is less persistent and annoying? If so I might have to ditch the Vsync code and just do with flip 0 in windowed mode, lame hey... Also the same applies to full-screen as some people are getting tearing even with Flip -1! So maybe I should just make things flip 0 all across the board (like OEJs last demo) so that everyone gets a consistently bad display instead of some elite few having a perfect display and others having a dire one.

I really need some kind of large survey about "normal people's" PCs so that I can decide on the solution that benefits the most by working out the ratio of elite versus bad. I could then possibly start with Flip 0, and have an option called "VSync" which switches on the advanced stuff and will either make it better or worse on some systems. I just know that most casual users won't check this ... What does everyone else think?

Grey Alien,

The vsync test ran smooth on the following setup
GeForce 7800GS Athlon 64 3000+ CRT
GeForce 7600GT Athlon 64 X2 3800+ LCD
Radeon 9800Pro Intel 1.7 CRT

Tearing at the top on
GeForce 5700 Intel 1.7 LCD

No other application in the background

Fabulous info thanks assari. We know it's not a Geforce problem now and that CPU type makes no difference. Were all PCs XP?

Not knocking your code, but this is the first time ever I have seen tearing with any Blitz made code, game or demo and I have been with Blitz since the beginning. And I still get the jerking too, which so far is unique to your examples.

GeForce2 MX 400
GeForce FX 5200
GeForce4 MX 4000

Just a heads up - I plan to use Flip -1, mainly as a sanity check, don't want rendering out of control on laptops.

Laptops which render faster than the display (hey, you don't know with macs - right?) burn electricity quite quickly and I don't want a nice bird getting upset with me in bed.

I mean playing my thing in bed.

Kuron: thanks for the info, lots of cards there. Same on them all hey, tearing AND jerking? Do any have TFTs and what are the CPUs? Thanks. Also did you check if VSync On/Off in the drivers? btw, if you see my code above that I posted it so simple it has no timing functions so it's not at all similar to my Game Framework demo, in fact it's much more like that BMax zombie killer example (oh wait just remembered, the zombie example is full-screen and this is windowed mode). The tear is because I'm trying to Vsync and perhaps that also generates jerks on your cards/systems for some reason too? Maybe you have some common software (virus killers) etc running on all 3 eating system time? Anyway thanks for the info, it means that my Game Framework timing or the lag fix ISN'T causing the jerks on your systems, because none of that is in this VSync test, worth knowing (for me at least).

OEJ: Hmm, did you read my stuff about about which is best/worse and using Flip 0 etc. This thing about laptops buring power with flip 0, is that 100% proven? I mean it sounds logical ... but I wonder what other games do and how much battery power it really uses compared to CPU or HD etc?

I'm wondering if it's worth making a BlitzPlus and Blitz3D version of the same code to see how that works on people's systems.

Grey, mine were all XP SP2

Do any have TFTs
No TFTs

and what are the CPUs?

GeForce FX 5200 128MB - Celery 1Ghz, 512MB RAM
GeForce4 MX 4000 64MB - Athlon 1.2Ghz, 1GB RAM
GeForce2 MX 400 64MB - Intel 500Mhz, 384MB RAM

Also did you check if VSync On/Off in the drivers?
I never mess with that, its set to "off or app controlled" on all systems.

Maybe you have some common software (virus killers) etc running on all 3 eating system time?
I only run Virus software on my internet machine, the FX 5200. My other two machines are not connected to the net and do not run AV or Firewall software.

Sorry to bear bad news and not be any help :c(

Grey, yep it's proven. Mobile graphics chipsets only use power when they draw stuff.

A 15 and 30fps update might be desirable for some, even. However, I think laptop battery life is set to explode soon with some exciting technologies coming.

I have an ATI Radeon card and a TFT monitor - no problems whatsoever and never have had - draw your own conclusions. ;-)

assari: thanks!

Kuron: no, it's all good info thanks. You have a wide range of cards (although all Geforce) and a wide range of CPUs. Mind you they aren't that fast. Also no common software, so I can rule that out. The ones with VSync off won't do any syncing so you WILL see a tear somewhere or at random, really it should be ON or app controlled for this test. I'm preparing a Flip 0 version of my Game Framework, any chance you can test it if I post a link in minute?

OEJ: OK, but I might still got with flip 0, the clincher will be how Kuron gets on with my flip 0 Game Framework demo.

I just ran it as normal, didn't bother with shutting down stuff and it was as smooth as a virgins thigh :)

oh how I love those thighs... uh back on topic:

here's another Game Framework demo using Flip 0. I'm keen that two people test this:

http://www.greyaliengames.com/aotmg/aotmg5.zip (4.06Mb)

Big10p: to see if, although the sound works, there is any latency i.e. when you press Z to fire is the sound effect immediate of delayed, the same with explosions. Thanks if you can do this :-)

Kuron: same old demo, couple of tweaks, main one being using Flip 0. No music, just to rule that out.
1) How is this for you in full-screen and windowed mode (press F to change modes)
2) Try other Flip modes by pressing D for debug mode, then press I. You can see the Flip mode is either 0, 1, or -1 in the debug stats.
3) what's your FPS?
4) could try pressing A (for Lag Fix) on/off and see if that makes any difference.

I EAGERLY await your results ... :-D, many thanks in advance.

Only thing with flip 0 and very high FPS rates is there is no point having a fixed logic code, it might as well be delta timing. Actually that's not true because my fixed logic is set at 200Hz so if the display FPS drops below the fixed logic will keep going at 200Hz, so I take it back :-)

Flip 0 - I say again...

Do NOT turn vsync off by default - it causes tearing which is especially noticable on larger screens - make it an option and don't rely on it for timing. Seeing the screen redraw is a bad thing no matter how it ruins your timing method.

I wish people wouldn't do it to get a few extra frames - it's like the bad old days of the ZX Spectum for Gods sake - flickering is bad!

I don't like flip 0 either but if it works better on more PCs, it may have to be the way I go, much as I hate it.

On Geforce cards you mean? ;-)

maybe, I wonder if there's an easy way to detect Geforce cards? Anyway your setup is nearly identical to mine so no wonder my stuff is cool on your system:

P4 3.2GHz HT, 1GB RAM, ATI Radeon 9800XT, XP Home + minimal crap running.

Aah, hantarex monitors. I haven't heard that name for a while :)
I didn't even realise you could hook up them up PCs (or were even safe to use since they don't come with any outercasing usually)

Kuron: Hope you didn't test the AOTMG demo in the last 10 mins or so as that version had WAY to many UFOs due to flip 0. I just replaced it with a version that makes the same number UFOs as my original demo version.


no wonder my stuff is cool on your system



Perhaps Blitzmax should be for ATI cards only. ;-)

Yeah lol.

Steve, try this and see what you think:

www.greyaliengames.com/aotmg/aotmg5.zip (4.06Mb) (This version is a Flip 0 test version so you may see some tearing)

hmm, well I've just found out the timing is too imprecise with Flip 0 (it wasn't designed for this) if the framerate goes over 200FPS (which it does on fast cards) thus I may have to implement some averaging or something. I wish there was a more precise command then millisecs() !

and a wide range of CPUs. Mind you they aren't that fast.
Even with my 500MHz system it is more than quadruple the minimum requirements for D3D7 games and more than double the recommended requirements. ie, more than sufficient to handle BMax ;c)

weird, Antony's left a sig and no meaningful post ...

Kuron: I just really meant not that fast compared to a brand new PC and the other test ones, I'm not insulting them, I've had PCs since 486 days. It's nutty that D3D7 is supposed to run on a 100MHz PC lol. Did you get a chance to try this yet?


www.greyaliengames.com/aotmg/aotmg5.zip (4.06Mb) (This version is a Flip 0 test version so you may see some tearing)

I run my game ok on the 400mhz box. I wouldn't recommend lower than this for anything but basic games though.

The real problem isn't number of objects, its fill rate on these old cards...

yeah, they'll run d3d7 games, but just not very well at all.

Aah, hantarex monitors. I haven't heard that name for a while :)
I didn't even realise you could hook up them up PCs (or were even safe to use since they don't come with any outercasing usually)
Yeah, mines got a regular VGA input, as well as a load of BNC ones, or whatever they're called. These things are usually used in TV studios and such. My local Woolworth's uses them to display CCTV. Brand new, they are VERY expensive, but I contacted Hanatrex directly and asked if they had any reconditioned units knocking about. :)

Oh, and it's definately got a case - solid steel! This thing is a tank and weighs about the same as one, too. :/

Anyway, back on topic...

Flip 0 gives the smoothest results for me but i get no sound at all.
does around 930fps

good news thanks. Well I switched the music off in that demo but pressing Z should make a fire sound...

I've had 3 other people say flip 0 is the smoothest for them two and also saying they can't see the tearing (it is there, it's just very hard to see at 900fps when it's moving around randomly.