Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / 60 FPS Lock - test unlock

Author
Message
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Aug 2009 01:25
Many machines running newer windows operating systems experience a 60 fps lock - i.e. no matter what they set the syncronization rate to in DBC, the program always runs at 60 fps.

There are methods to unlock it detailed here

but I wanted to try another test that's similar to one listed in the above link.

Could anyone that experiences the 60 FPS lock try out the following two programs and report back what FPS they get after running each?

Thank you

Program 1:


Program 2:


Enjoy your day.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Aug 2009 02:07
Snippet 1 - alternating between 62/63/64

Snippet 2 - alternating between 63 and 64

TDK

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Aug 2009 03:08
Thanks TDK.

One more thing, could you place the attached setup.ini file in the same folder as the DB.exe, or open the setup.ini file that is there and change blitflipmode=0 to blitflipmode=1 ?

Thank you

Enjoy your day.

Attachments

Login to view attachments
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 5th Aug 2009 07:00
Well this is wierd. for some reason my lock is gone now apperently lol. i got bout 350 on both loli know it was there before weird

New Site! Check it out \/
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Aug 2009 12:36
I didn't actually have a blitflipmode entry in my ini file. So I added it set to 0 and got a steady 60 for both snippets.

When it's set to 1 I get 63/64 for both.

TDK

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Aug 2009 13:29 Edited at: 5th Aug 2009 13:31
Ok. That's good to know. I was hoping that any call to winmm.dll would break the lock, it may not based on your results. Oh well.

However, the blitflipmode=1 will help to correct any flashing if you have that problem still - so in general it's a good idea to keep it at 1 and distribute it with any exes.

TDK, I don't know if you've had time to try any of the tips listed in the link, but could you run Program 1 (the one without the DLL call), but include at the top

load music "<an mp3 file>",1

where you are loading a playable .mp3 file. You don't have to play it, just include the load music command with it.

Since you had so much trouble with the 60 fps cap in the past, I'm hoping that this will be a solution for you as it has been for others that have tried it. Also make sure blitflipmode=1 when you run it.

Thank you

@Caleb1994
Anything change? New graphics card, new drivers, old Direct X ? Windows 7?

Enjoy your day.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 5th Aug 2009 18:28
I updated to the newest directX other then that Nope

New Site! Check it out \/
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Aug 2009 22:52
Quote: "I don't know if you've had time to try any of the tips listed in the link"


Yes I have - without success unfortunately.

But... I went into my GFX card settings (nVidia) and set Force VSynch mode to Force Off and programs which gave me 60fps suddenly ran at hundreds of fps (can't remember exactly what the fps values were now - I can only remember that the program was a spinning cube).

But, it's since gone back to 60fps for everything and the VSynch is still set as it was when I got the extra speed. So, I've given up trying (or worrying about it).

I'll tell you what is strange though - occasionally my programs will go into 'turbo' mode for no aparent reason. Like the vehicle selection part of my program.

The other night, the cars suddenly started revolving about 20 times faster than normal. Too fast in fact, so I lowered the angle incrementing values.

A few minutes later it went back to normal and it was so slow I had to put the values back again.

I don't have a clue whether at the time I was doing anything that might have been responsible for the speed increase, but I might have been playing an MP3. If I was though, it would have been using Winamp as it's all I ever use.

I'll experiment a little...

TDK_Man

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 6th Aug 2009 04:04
Why not enable window mode and just resize it to cover the screen? When in FSEX mode (default), the frame rate is usually locked to your monitor's refresh rate, but this doesn't apply in windowed mode I believe.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Aug 2009 16:33
Quote: "the frame rate is usually locked to your monitor's refresh rate, but this doesn't apply in windowed mode I believe"


Yes, that's the strange thing - and what the thread is about.

Something appears to be unlocking the fps and we have just been trying to figure out exactly what that is.

More from curiosity than necessity really...

TDK

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Aug 2009 22:11
Quote: "I didn't actually have a blitflipmode entry in my ini file. So I added it set to 0 and got a steady 60 for both snippets."

That's usually the key that makes loading an mp3 unlock the the fps. For the DBC challenges, I was trying to find a way without distributing media to unlock the fps. The mcisendstring function used to play a midi file through the winmm.dll in the link example works, but it requires loading in actual media. I was hoping to sneak around that by calling a generic playsound as in the example above.

The fact that you, TDK, get 63/64 with blitflipmode=1 and a steady 60 when it is zero is encouraging. That means the sync is being influenced by blitflipmode=1 - even on your stubborn computer!

Quote: "Why not enable window mode and just resize it to cover the screen? When in FSEX mode (default), the frame rate is usually locked to your monitor's refresh rate, but this doesn't apply in windowed mode I believe. "

No dice - at least according to the tests that were run in the past with other users. The performance was the same if one didn't change blitflipmode to 1 and load sound media with the LOAD MUSIC command or using the winmm.dll to load and play midi.

Even though we've found ways to break the 60 FPS lock, there's just that little bit of inconsistancy, and that throws a little bit of a monkey wrench in the DBC challenges, unless we all agree to only run things at a sync rate of 60. I run all DBC code on windows 98, and I can set sync however I want without any work arounds. That leads me to believe it's something to do with the latest directx and/or windows. But then, Caleb1994 says the lock mysteriously disappeared. Was it the update to the newest directx and microsoft fixed something? Or was it something else?

TDK, you said sometimes it jumps into turbo mode unexpectedly, that may suggest a sleeping process that wakes up on some schedule to do something.

Anyway, this road has been gone down before, I was just hoping that the quick call to PlaySound would do the trick. But the only results reported for that are from TDK, who's computer won't break the 60 fps lock consistantly under any circumstances, and Caleb1994, who suddenly has no lock at all. So I really could use some other results from the test programs at the top of the post.

Anyone else want to try out the two test programs at the top with the blitflipmode=1 set in the setup.ini file and report back the results?

Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 7th Aug 2009 01:11
Snippet 1 - 99 fps
Snippet 2 - 99 fps

My computer locks at 99, why is that?


TheComet


Make the path of your enemies easier with Waypoint Pro!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 7th Aug 2009 01:26
GF9600 on Vista
-with default driver setting for (use settings for 3d apps):
uncapped FPS for both snippets, no matter what blitflip or windowed flags are set
-with forced vsync in the settings:
uncapped FPS for both snippets, if blitflipmode=1, capped FPS for both apps with blitflipmode=0 AND windowmode=0

Will try it with different cards when I find the time, because I think the results depend on the cards and their drivers.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Aug 2009 01:51
Thanks TheComet and Empty!

I'm pretty conviced that the call to winmm.dll and playsound has no effect (which is what I was really testing).

Quote: "My computer locks at 99, why is that?"

That's likely the Hertz of your monitor - the vertical refresh. And that's not a wierd number. The lowest common denominator is 60 - especially as the raster beam is vanishing with new technology - and most monitors will have that for media compatibility. My monitor refreshes at 119 hz in it's current resolution (though my max DBC fps is at about 999).

@empty
I guess this would be the goal without having to change the vsync:

Quote: "uncapped FPS for both snippets, no matter what blitflip or windowed flags are set"


Enjoy your day.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 7th Aug 2009 05:18
Got 300 and 301 for both, how exactly are you trying to uncap?

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 7th Aug 2009 07:30
Calling a function from winmm.dll

New Site! Check it out \/
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Aug 2009 15:15
The plot thickens...

My Acer flat panel monitor died and I swapped it for an OKI.

I ran the 'tilt on matrix' test program I'm trying to figure out for the DBC challenge entry and it was so fast I couldn't control it! (It was OK last night when I turned my machine off).

I added a line to print the fps to the screen and it said 599!

So, I thought it was the old monitor. But, I've run the exact DBC program again now and it's gone back to 63 fps again...

I've not changed any windows settings or run any other programs since starting Windows - other than DBC of course and Firefox to write this.

TDK

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Aug 2009 15:29 Edited at: 7th Aug 2009 15:33
What about Codecs? Can they control FPS? I know that DBC triggers some of them.

Anyway.. I get 330 with both programs.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Aug 2009 02:27
Quote: "What about Codecs? Can they control FPS? I know that DBC triggers some of them."

Could be. Because FPS can increase when running winamp, or windows media player - might be a codec.

@TDK
Well, that's just nutty! Perhaps you have a constant internet connection that wasn't on when you swapped monitors and is on now. Could it be that a network connection of some kind (not dial up) could have an influence?

@all
Thank you for testing, and I'm pretty sure that the particular call to "playsound" in the winmm.dll has no effect. That's what I wanted to know.

Enjoy your day.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 8th Aug 2009 03:36
Yeah, if i'm playing/testing a game while listening to music, the FPS Jumps,Go figure.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Aug 2009 14:08
Just shell execute windows media player before the game starts. Will that work?

TheComet


Make the path of your enemies easier with Waypoint Pro!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Aug 2009 20:20
Maybe, then that has to be available on each machine, and that means launching it and then switching back to DB. Loading an mp3 is a more desirable solution or calling a dll that should be installed on each windows machine. But then having to load actual media without supplying the media is part of the problem.

A function that could output a dummy mp3 would be great. That way the function could just be included with the code, and when called, it creates the fake mp3 then loads it into DBC as music. Then delete it. Maybe just a header and maybe .5 seconds worth of silence. Anybody know the mp3 format and could write or suggest how to write the function in DBC?

Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Aug 2009 20:42
Download the attachment. It has an empty mp3 file in it. Try to see if it will load into DarkBasic without any errors, since Windows media player gives errors.

TheComet


Make the path of your enemies easier with Waypoint Pro!

Attachments

Login to view attachments
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Aug 2009 03:16
Ok. I put together a dummy mp3 function that'll create a silent mp3 and load it in as DBC music then delete the music and the file. It should eliminate the need to include media for the FPS lock break.

Could someone experiencing the 60 FPS lock test this out please? The things to be sure of are:

1. You have a Setup.ini file in the same diretory as DB.exe
2. In the Setup.ini file, blitflipmode=1



Enjoy your day.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 20th Aug 2009 17:31 Edited at: 20th Aug 2009 17:33
kk, will test, and see what resaults I get.....

Edit)
Succcessssssss! You DId it Latch. I got 180 - 290 Fps.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2009 18:32
Failure.

DB still locks at 99 fps, and a standalone executable locks at 58 fps.

TheComet


Make the paths of your enemies easier with WaypointPro!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Aug 2009 19:12
@TheComet
For the stand alone exe, make sure a Setup.ini file is in the same folder as the exe (not DB.exe in this case - that won't make any difference). And also make sure the Setup.ini exists in the DB.exe (for running source directly) folder and in both cases the blitflipmode=1.

@DD
Good. At least there's a chance for the function to work without having to supply outside media.

Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2009 20:03
OK, done what you said. Here are the results:

-DB ---> 99 FPS
-EXE --> 99 FPS

I have a feeling my computer can't manage more...

TheComet


Make the paths of your enemies easier with WaypointPro!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 22nd Aug 2009 21:36
Quote: "I have a feeling my computer can't manage more..."


wonder why, cuz my comp sucks(and its really old) and i get like 240 or so.....

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )

Login to post a reply

Server time is: 2024-05-01 21:12:16
Your offset time is: 2024-05-01 21:12:16