31
General / Re: I'm losing my mind implementing a fixed frame rate.
« on: February 07, 2024, 04:28:36 pm »
No, you're right.
The previous position can be created and copied from the current position at the start of each loop as I suggested here as it's a small variable; it can be const actually!
The Kairos example, however, is based on the idea that when it is scaled up, most likely would be better to be created once.
For example, if, instead of a single position, you were to store every position of everything as well as everything's rotation, colour, size and many other things (including things involving statistics or other information) in one place (as you likely would when using the "time state" idea), this should probably be only created once and updated often. (you would have two of these objects: current and previous; maybe three with one having all interpolated values for that frame)
Since you already found Kairos, why are you not using it?
The previous position can be created and copied from the current position at the start of each loop as I suggested here as it's a small variable; it can be const actually!
The Kairos example, however, is based on the idea that when it is scaled up, most likely would be better to be created once.
For example, if, instead of a single position, you were to store every position of everything as well as everything's rotation, colour, size and many other things (including things involving statistics or other information) in one place (as you likely would when using the "time state" idea), this should probably be only created once and updated often. (you would have two of these objects: current and previous; maybe three with one having all interpolated values for that frame)
Since you already found Kairos, why are you not using it?