Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Frames delta time

    General Discussion
    switch delta time
    3
    4
    248
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MinikPL last edited by

      Does FUZE have something like delta time between frames? ( Like Time.deltaTime in Unity )
      It would lead to better games with speed independent of framerate ( tried some examples and haven't found something like that, and because of that any frame drop result in a speed decrease )

      1 Reply Last reply Reply Quote 0
      • M
        Maxwello F last edited by

        There's something called that in the tutorials in fuze but I haven't touched that. Why not have a read?

        1 Reply Last reply Reply Quote 0
        • M
          MinikPL last edited by

          Found that one, time() works fine, haven't noticed it because I thought it just returns seconds, anyway, it works fine ( but anyway it could also be just a global predefined variable, it would be simpler this way, because now You have to do some calculations every game loop )

          1 Reply Last reply Reply Quote 0
          • spikey
            spikey F last edited by spikey

            If I understood it right:
            deltaTime() is the amount of time between a frame.
            1/deltaTime() gives you the frame rate.
            Its mentioned in the example here https://fuzearena.com/help/view/lerp
            Also, I think there is an update needed for the example:
            I was starring at the line:

            t += deltaTime() // duration
            

            ...until I had the idea, that it maybe would make more sense like this:

            t += deltaTime() * 1 / duration
            

            Not tested, but this should make the lerp-ing last for 5 secs, if the duration is set to 5.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post