Page 1 of 1

### Tracking monitor refresh rate?

Posted: Mon Jun 06, 2016 11:21 pm
So I've been testing my game on high refresh rate monitors with more than 60hz, and it breaks some sections of my game due to the delta time. In this example a wind pushing the player back with the expression "playerbox.X-WindForce*(60*dt)" is pushing too hard due to the dt being faster on these monitors. Any way for me to track the monitor Hz so that the expression could be changed to "playerbox.X-WindForce*(MonitorHz*dt)"?

Thanks

### Re: Tracking monitor refresh rate?

Posted: Mon Jun 06, 2016 11:45 pm
i don't think there is such a thing maybe have an option in the beginning for both rates? and save it to a variable upon choice

### Re: Tracking monitor refresh rate?

Posted: Mon Jun 06, 2016 11:49 pm
I'm unsure why you need the 60* in the first place.. dt in itself should eliminate the need?

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 8:30 am
@Eisenhans , because otherwise the "WindForce" variable should be a value 60 times larger?

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 12:05 pm
Let's take a step back and look at this for a second..

Player.X - Windforce * dt

Let's assume the windforce is supposed to be linear, 100 pixels per second. With the above expression this should give the player an identical pixel per second speed, independent of the refresh rate. With higher screen Hz you have more, shorter steps, but the movement (per second, not per frame!) should be the same. Delta time *is* the refresh-rate tracker.

Unless I have totally not understood the problem or I'm missing something.

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 12:24 pm
@Eisenhans @eli0s Yes I included the "60" in order to make it a lot easier for me to read the variable values. If that proves to be a bad solution I might have to tweak the entire game. At this point, so close to finishing up I don't really see it happening. I guess maybe the solution to this problem is for me to make an "avarage dt tracker" that dynamically adjusts the 60 to for instance 144.

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 12:32 pm
@Tinimations

Btw., out of context: I have not had the chance to play it at a convention or anything, but your game looks quite awesome.

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 12:56 pm
@Eisenhans - You saw his game, can you give me a link. I like to see games made with C2 .

@Tinimations ?

### Re: Tracking monitor refresh rate?

Posted: Tue Jun 07, 2016 1:03 pm