Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
VSync #434097
12/12/13 13:05
12/12/13 13:05
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline OP
Member
TehV  Offline OP
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
Hi,
In a program of mine I'd like to synchronize certain events to the screen's update rate. To do this properly I would have to use the vsync signal from the graphics device. The problem I'm having with this is that I have no idea of how to do this. Could anyone help me with this?

Thanks in advance!

Re: VSync [Re: TehV] #434101
12/12/13 13:41
12/12/13 13:41
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Quote:
In a program of mine I'd like to synchronize certain events to the screen's update rate.

What do you want to achieve in particular?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: VSync [Re: Superku] #434103
12/12/13 14:49
12/12/13 14:49
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline OP
Member
TehV  Offline OP
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
Basically, I'm trying to measure a response time with an accuracy of only a few milliseconds. This requires me to show an image on the screen at a certain time and I need to know exactly when is is visible (not only within the application, but on the actual screen) so I know exactly when to start measuring.
The problem I'm having is that if I set my panel to VISIBLE in the program, it might take anywhere between 0 to 16.67 milliseconds for this change to happen on the screen. The problem is that I don't know the time it takes for this update to happen, and an uncertainty of 16.67 milliseconds is not acceptable for my purposes.
I'm thinking the simplest way to do this is to make my application frame rate be directly linked to the screen updates (which is what VSync does, right?).

Last edited by TehV; 12/12/13 14:50.
Re: VSync [Re: TehV] #434104
12/12/13 14:58
12/12/13 14:58
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
some easy calibration should do it

when calibrating let an image show up every second and everytime you see it you have to hit a button at exactly the moment when it shows up.
with this you should be able to calculate the input/output lag.


POTATO-MAN saves the day! - Random

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1