Is there a fail-safe on the hertz setting?

BlitzMax Forums/BlitzMax Beginners Area/Is there a fail-safe on the hertz setting?

Uber-nerd(Posted 2006) [#1]
Well you know, wouldn't want to burn a friends house down because of a high refresh rate assuming they had an old monitor :D How much can you exceed the refresh rate without your monitor exploding anyway?


Chris C(Posted 2006) [#2]
i'd have thought if you tried setting the hz to 1000 the graphics command would fail...

I'll have to test!

I've noticed if your using a canvas as a context the refresh rate is 0 which is a pain it you need calculare time steps


JazzieB(Posted 2006) [#3]
A monitor wouldn't explode, it would just display a load of rubbish or the safety would cut in and just put the monitor into standby (like modern monitors do).

Provided a user has the correct drivers installed for their monitor they should only report safe refresh rates back. You can use the various graphics mode checking commands to determine what is available and make a selection from those.

Or the safest thing to do is default to 60hz and allow the user to change it if they wish, either within the program or via a config file.


JazzieB(Posted 2006) [#4]
Actually, thinking about it, I believe Max tries to set whatever refresh rate you want in hardware first and if that fails it emulates it in software, but setting a safe refresh rate for the display.

As for the hertz coming back as 0 in some cases (mentioned above), you shouldn't be relying on a particular rate for timing purposes anyway.


ImaginaryHuman(Posted 2006) [#5]
Ahhhhhhhhhh gone are the days of only 50hz or 60hz for a whole continent ;-D


Uber-nerd(Posted 2006) [#6]
The downside of user selection is that the person will probably be sitting there staring at the screen muttering "wtf does hertz mean?" Screw the user, they'll just have to do it manually :P

Lcd screens, the way of the future! ... just had to do that.


JazzieB(Posted 2006) [#7]
How can they do it manually if you don't provide the option of changing it? It's not like monitors have controls to set it. Anyway, anyone that actually wants to fiddle with game settings will more than likely know what hertz means. Even if they don't, you do provide instructions with your games, don't you? ;o)

Also, you don't have to use the word "hertz". You could use "monitor refresh rate", for example.


joncom2000(Posted 2006) [#8]
You have to give most gamers a bit more credit, if you had played a few modern PC games you would notice that most offer selectable refresh rates. But as JazzieB mentions they normally say "Monitor Refresh Rate" and the you can select 60hz,75hz,85hz etc

Just default to 60hz and the let them choose to change it, that way if they have no idea what it is they will most likely leave it well alone :)


Robert Cummings(Posted 2006) [#9]
Why not default to the refresh rate? Blitz will do that if you choose 0. Then if their monitor is 85hz the game will attempt to match it afaik.

Then roll a proper timing solution.


JazzieB(Posted 2006) [#10]
Other people have said this about selecting 0 for hertz, but every time I've tried it I get 60hz even though I run my monitor at 85hz. Don't know if this is driver related or whether Blitz is supposed to use your current settings, but it seems unreliable, so probably best to use 60hz and allow the player to change it if they want.


Robert Cummings(Posted 2006) [#11]
I don't think so. You see that in commercial AAA games? Shabby, 1990's style practises.


JazzieB(Posted 2006) [#12]
No. I'm talking about my own BlitzMax games, of course.

What I currently do is pull a list of all the available graphics modes that are suitable for the game and default to a hertz setting of 85hz or the nearest that is available. The list is for the user should they decide to change it, which I allow via in-game menus.

The downside to doing this is that you're relying on the drivers reporting the correct availability of hertz settings AND that the user has the correct drivers installed for their monitor in the first place. It's for this reason that an initial setting of 60hz is recommended.


Robert Cummings(Posted 2006) [#13]
Well plug and play does a damn good job of figuring out most monitors these days.


Kuron(Posted 2006) [#14]
Other people have said this about selecting 0 for hertz, but every time I've tried it I get 60hz even though I run my monitor at 85hz.
60Hz is usually the default DX setting (and often OpenGL setting) unless you manually over ride it with DXDiag or use the advanced options of your drivers, they will usually let you "force" a "Hz" for DX.