Tracking monitor refresh rate?

0 favourites
  • 10 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • 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

  • 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

  • I'm unsure why you need the 60* in the first place.. dt in itself should eliminate the need?

  • Eisenhans , because otherwise the "WindForce" variable should be a value 60 times larger?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

  • Eisenhans - You saw his game, can you give me a link. I like to see games made with C2 .

    Tinimations ?

  • check out the trailer:

    Subscribe to Construct videos now
  • OMG. That was very amazing! Very professional and artistic. Nicely Designed!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)