Jump to content
  • Advertisement
Sign in to follow this  

NEED HELP WITH TIMERS

This topic is 4682 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Something bizarre is going on here I left this question in beginner section but no reply. DXtimer, Threadedtimer and fasttimer components no longer work properly after I reinstalled my OS months ago. They will not run at anything faster than an interval of 10. In otherwords they cannot achieve 100-1000th of a second which I need desperately to work again. Weird thing is, when I open DXDiag (from run)or get the actual program to play music the timer works at the proper resolution???! regardless the compiled exe will not run at proper intervals on other peoples computers no matter what. It is not the fault of delphi/delphix from what I can see. It seems to be a computer/OS problem. Any ideas please really need help.

Share this post


Link to post
Share on other sites
Advertisement
looks like i am out of luck....question 2 however

how the hell do i stop labels flickering when they are being updated as regular intervals...its getting annoying now.

question 3. is there anywy to make my usb joypad work with force feedback, it just will not work with delphix :(

thanks

Share this post


Link to post
Share on other sites
Answer to 2: there can't be done much about it. As you are regulary updating it, is has to redraw. You can try to make it update slightly less (once per second).

Answer to 3: Try to use the DirectInput libray for force feedback.

Share this post


Link to post
Share on other sites
There is a way to stop flickering in windows GDI, but however, available in delphi I don't know, easy to accomplish anyway? no...

I've tried but never truly succeeded, I know in VB there was this little neat trick of locking the window buffer, that did it, not perfect, but stopped the worse flickering at a marginal cost, haven't seen this somewhere else those.

Share this post


Link to post
Share on other sites
To resolve the flickering issue, you might want to look into Layered Windows (UpdateLayeredWindow() is the API function. Only available on XP and 2k, I believe).
Basically they replace the standard window drawing mechanism with a back buffer you can draw on any way you like, and then call the API function to draw it on the screen.

Share this post


Link to post
Share on other sites
tested the app on other computers same thing. (i tested the app, i am more than certain if i loaded my project in delphi on another machien, the built app would then work)

intervals of 1-10 are running at 100th of a sec and not their individul speeds.

intervals of 10-20 are running at what 20 should be alone and so on.

in otherwords: only the 10's intervals are working properly. intervals inbetween like 1-9 and 41-49 are running at 10 and 50 respectively, its very very weird. maybe an os/directx problem?

-------
on the directinput library, I am hardly expret, any examples anywhere.

Thanks alot all those who replied, much appreciated

Daniel

I will check out that flickering solution, however in answer to someone earlier, once a second update is way too little for a stopwatch updating once every 100th a second.

Share this post


Link to post
Share on other sites
This most certainly feels like the low-resolution timers commonly used in Windows, which has intervals at about 9-10ms by default, which can be "temporarily" improved all down to 1ms using a simple command (can't remember right now though).

However, you shouldn't rely on that, there must be some real high-resolution timer for Delphi? Such as the performance timer which is generally used when available.

Share this post


Link to post
Share on other sites
for those that don't know I figured out 1 problem. The flickering can be stopped by this code.

Mainfm.Doublebuffered:=true; You must do that for things like tabs too.

Dunno about those other things I mentioned though

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!