Windowed - 60 FPS, Full scr - 30 FPS

Blitz3D Forums/Blitz3D Programming/Windowed - 60 FPS, Full scr - 30 FPS

Jager(Posted 2003) [#1]
hmmm, very strange. When I play my game in windowed mode, I get 60 FPS but when I switch to full screen I get 30 FPS??

why is it so????

I cannot figure this one out.


Shambler(Posted 2003) [#2]
Change

Flip


to

Flip false


Blitz is locking to your monitors vertical sync in full screen mode.


Rottbott(Posted 2003) [#3]
That shouldn't halve it down to 30fps!?


Koriolis(Posted 2003) [#4]
You can have an fps reduced by a ratio of up to 1/2.
It's simple: vertical sync will make your fps be an integer fraction of the monitor refresh rate. Let's say this rate is 60, and your raw fps is 50.9, then your fps, once synced will be of 30, a close to 1/2 ratio. And if the raw fps was 29.9, once synced you would get a fps of 60/3. And so on.
To sum up with vertical sync on you can only get an fps of R, R/2, R/3, R/4... where R is the monitor refresh rate (and assuming the raw fps is stable).
In windowed mode, you get no vsync, which explains the difference.


Ice9(Posted 2003) [#5]
one way to test that theory is to change the refresh rate.
I think it is something else and could be the drivers of the video card causing the problem.


AbbaRue(Posted 2003) [#6]
Thanks Shambler for that tip. My frame rate never went above 101 fps and I was wondering how to change that.
Now I can see how fast I am really rendering.
I have 10,000 3D Trees on a 128,000 X 128,000 Terrain.
Now it varies from 102 to 220 fps instead of always saying 101 fps.


Jager(Posted 2003) [#7]
thanks also shambler, I'm now getting 67 FPS for Windowed and 70! for fullscreen. (I have an old monitor, maybe that's part of the problem?)

Any more hints to crank up the speed? .. anyone?


Shambler(Posted 2003) [#8]
Of course the downside to using Flip False is that you will get tearing since the image onscreen is being redrawn at the same time the monitor is refreshing the picture.

The reason for using Flip is to avoid this problem.

@AbbaRue 10000 trees is alot of wood =) What kind of visibility culling do you have in place?
Perhaps by not drawing those trees that are not in view because they are behind the player or far away will give you a better speed up.


Rottbott(Posted 2003) [#9]
I've never found VSync to affect any of my framerates at ALL, except to cap them at 75 (since my monitor has a 75Hz refresh rate). And I hate tearing.

Jager, can't your monitor do more than 60Hz? 60Hz refresh rate gives me a headache 'cos it flickers so much. If it can manage 70-75Hz use that.

Also wasn't there a problem with DirectX forcing 60Hz refresh rate in fullscreen mode even if Windows was set to a higher refresh rate?


AbbaRue(Posted 2003) [#10]
I use a varing camera range when I am walking around Have camera range set to 10,000 and when I stop to look around for more then 200 frames I have it go to 100,000.
I also hide all entities not in view and only update that when I turn left or right by at least 1 deg. so I don't get any jerkyness while walking around everything is nice and smooth. Maybe these ideas can help someone else.


Jager(Posted 2003) [#11]
damn, how in the hell do you get 200 FPS? I thought B3D maxed out around 60-75? but I suppose smooth animation is the key, not max FPS.

My monitor is set up as a Plug and play monitor, at 60 Hertz. P&P can go up to 85. I suppose I could fine tune my monitor to higher rates but if I wanted to distribute my game, I'd have to use a standard refresh rate. BTW, what is that these days?

I've just check my monitor, it has a max horz sync rate of 70 ... so I'll just crank it up ... hmmmm, that looks clearer .. and my eye's aren't flickering as much! :) Will check my game later.


Mustang(Posted 2003) [#12]
60Hz refresh rate gives me a headache 'cos it flickers so much.


60??? Jesus... that will kill you. Most monitors made in this century can do way better, I use 85Hz on my home setup, although it could go even 120Hz in the rezz I use it (1152*864*32). It's 19" but I don't like to go all the way and use 1280*769, I think that this is more pleasant rezz to look at.


Koriolis(Posted 2003) [#13]
I suppose I could fine tune my monitor to higher rates but if I wanted to distribute my game, I'd have to use a standard refresh rate
There is no standard frame rate! You can easily cope with any kind of framerate: just multiply any game value that is realted to the time (like a move) by the amount of time that passed since the last frame.

Oh, and that's true, how can you work with a 60Hz refresh rate?!? I'd get the eyes of a dwarf rabbit with that.


Jager(Posted 2003) [#14]
I'm now getting 200 FPS .. when nothing is in view! :)


soja(Posted 2003) [#15]
Shambler: Of course the downside to using Flip False is that you will get tearing since the image onscreen is being redrawn at the same time the monitor is refreshing the picture. The reason for using Flip is to avoid this problem.


Rottbott: I've never found VSync to affect any of my framerates at ALL, except to cap them at 75...And I hate tearing.


I have a suspicion that mark uses the ONE_OR_IMMEDIATE flag when presenting the display, so that the game will still render synchronized with the vertical refresh unless the framerate drops -- at which point you may see tearing. Of course this would all be related to video card and drivers, so it may be that while one person sees no artifacts or abnomalities, another may, using the same code on different computers.